Installation/Mac OS/Outdated/Howto install OpenFOAM 1.3 on Mac OS X
1 OpenFOAM on a Mac OS X
This is a quick How-To describing the installation of OpenFOAM pre-compiled binaries for Mac OS X.
You can download OpenFOAM disk images from Hrv's personal Mac page in the OpenFOAM-? directory. The release appears once the major bugs have been cleaned up and I get the time to spend with my Mac at home. Please note that you are downloading a Jasak-special, i.e. the release will be an enhanced version of the standard release (bug fixes, more applications and libraries, additional tutorial checking etc which did not necessarily make the standard release).
OpenFOAM will work without it, but in order to do paraview post-processing, you will need to install The X Window system for a Mac. The current release is OpenFOAM-1.3 compiled on a Mac OS 10.4.6 PowerPC laptop. I will attempt doing the universal binary compilation the next time around.
- Download the disk images and save them in a convenient place. There are two disk images to download: the darwin image, containing various (independent) utilities and pre-compiled Paraview used with the OpenFOAM compilation
- Mount the disk images (double-click the disk image file). This should produce a /Volumes/darwin and /Volumes/OpenFOAM-1.3 (or equivalent) directory
- Create a directory ~/OpenFOAM
- In the directory, make soft links to the disk images:
cd ~/OpenFOAM ln -s /Volumes/darwin . ln -s /Volumes/OpenFOAM-1.3 .
1.3 Configuring OpenFOAM
- Set up the environment in your bashrc/cshrc in the usual way:
cd ~ cp -r ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3 ~
- Into your .cshrc file add:
and you're done!
Note that by default Mac OS X uses the bash shell. However, I don't like having the disk images mounted all the time or editing the dot files every time I wish to use OpenFOAM. Therefore, I keep my OpenFOAM stuff under tcsh and in order to get to it first mount the disk images and then type tcsh to use it.
1.4 Doing Everything Yourself
Compiling everything from scratch is definitely an option, but not for the faint-hearted. The main issues are to do with handling the case-sensitive filing system for the OpenFOAM directory (make yourself a case-sensitive disk image) and compiling paraview. Because of the re-compilation of paraFoam, the pre-compiled paraview binaries for the Mac will not do. You will need XCode for your Mac, which can be downloaded free of charge.
1.5 Unresolved Issues
After some experience, everything apart from FoamX is operational. FoamX is a problem because the latest release of MICO (an implementation of Corba used by FoamX and some other utilities) does not compile on a Mac (at least I'm having a lot of trouble!). There exists a pre-compiled version but I haven't tried it yet.
The pre-compiled binaries should support parallel execution using lam. However, (due to some firewall issues?), I don't seem to be able to start lamboot on my machine, so this has not been tested. Any hints would be appreciated.
1.6 If you need to speak to me
... about any of the above, feel free to drop me a line.