Difference between revisions of "Installation/Mac OS/OpenFOAM 2.2.2"
Tidusuper91 (Talk | contribs) |
Tidusuper91 (Talk | contribs) |
||
Line 56: | Line 56: | ||
=== Creation of Case Sensitive .sparseimage === | === Creation of Case Sensitive .sparseimage === | ||
− | |||
− | + | First, we create a disk image with the Apple Disk Utility. Open <tt>/Applications/Utilities/Disk Utility</tt>. Click New Image: | |
− | [[File: | + | [[File:Howto install OpenFOAM v21 Mac-images-010.ppm.png|500px|none]] |
+ | |||
+ | It is important to set as <tt>Format: Mac OS Extended (Case-sensitive,Journaled)</tt>. The sparse image will grow with the place used inside the image. Create a sparse image with the following settings (examples, you could change the values): | ||
+ | [[File:Howto install OpenFOAM v21 Mac-images-012.ppm.png|500px|none]] | ||
+ | |||
Download OpenFOAM 2.2.2 sources from the [http://www.openfoam.org/download/source.php here] | Download OpenFOAM 2.2.2 sources from the [http://www.openfoam.org/download/source.php here] |
Revision as of 12:57, 15 November 2013
1 Introduction and Notes
This guide is derived from OpenFOAM 2.1.x Installation with some modifications derived thanks to help provided on this thread of CFD Online Forum . The format of the page is based on OpenFOAM 1.7.x Installation.
These compilation instructions have only been tested on the following system:
Macbook (version 6,2) Intel Core i7 2.66Ghz Mac OS X Mavericks (version 10.9)
These instructions may need to be tailored as required to fit your specific system if they deviate from the above; you would be able to ask support on this thread if you needed it.
Many thanks go to Bernhard Gschaider (a.k.a. gschaider) of CFD Online for maintaining the latest OpenFOAM Mac OS X patches and for the big help that he provided me.
2 Prepare your Mac OS X Environment
2.1 Macports
To install Macports you need to install xCode, you can find it on the App Store. After XCode you need to install the Command Line Tools. Installing Command Line Tools for Mavericks is different from what you would do with previous OSX versions.
2.1.1 Command Line Tools for OSX 10.9 "Mavericks"
To install CLT on OSX 10.9 open a terminal application (for example Terminal.app) and run
xcode-select --install
a window will be prompted where you can confirm installation.
2.1.2 Command Line Tools for OSX version < 10.9
In previous versions of OSX (and of xCode) you can download CLT directly from xCode Preferences > Downloads > Components
2.1.3 xCode License
Now you should accept the xCode License so run, always in the Terminal (this could be needed only on OSX 10.9)
sudo xcodebuild -license
and when asked type "agree" to accept the license. Now xCode "things" should work correctly.
2.1.4 MacPorts Installation
Now to install Macports you can download the pre-compiled package from the Official Website.
2.2 Build and Install the necessary software
To install all the tools we'll need run in Terminal:
sudo port selfupdate
Wait for the end of all operations then do:
sudo port install gcc46 openmpi boost cgal ccache flex bison
Now wait (a bit...)
3 OpenFOAM Building
3.1 Creation of Case Sensitive .sparseimage
First, we create a disk image with the Apple Disk Utility. Open /Applications/Utilities/Disk Utility. Click New Image:
It is important to set as Format: Mac OS Extended (Case-sensitive,Journaled). The sparse image will grow with the place used inside the image. Create a sparse image with the following settings (examples, you could change the values):
Download OpenFOAM 2.2.2 sources from the here