OpenFOAM: The Open Source CFD Toolbox

The OpenFOAM (Open Field Operation and Manipulation) CFD Toolbox can simulate anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics, electromagnetics and the pricing of financial options. OpenFOAM is produced by OpenCFD Ltd, is freely available and open source, licensed under the GNU General Public Licence.

OpenFOAM is basically a library to solve equations (ODEs and PDEs). Checkout the to get an overview of its features. It is probably the largest open source CFD package.

I'm quite a beginner with cfd stuff, and OpenFoam is the first cfd tool i've used. And i'm quite impressed. Have ran a few samples and created a few cases (OpenFoam projects for a single system are called 'cases'). For postprocessing you could use Mayavi or Paraview. For preprocessing you can try discretizer. Also there are netgen / tetgen / gmsh mesh/grid generators you may try. I've used netgen but not ran a case with netgen generated mesh. Also, if you are serious about it then you should also try to install Salome Platform. It is a powerful scriptable platform which includes a preprocessor with various import/export options and can be used with OpenFOAM.


I'm running to Fedora 12 and OpenFOAM 1.6.

Installation is not very difficult if you are on GNU/Linux. I don't know about other os (Note : search on the internet, you may find some instructions for other os, example windows binaries are available from disclaimer - i've never used them). Basically you just follow the instructions given on the OpenFOAM website.

Also in Fedora you'll have to make symlinks to a few libraries if you are using the prebuilt binaries. Check the terminal output for the missing libraries - this is mostly needed for parafoam not the solvers. What I did was create symlinks to those so files and put them in in a special directory so as to not to mess up with my system. Then i created a file ~/openfoam (symlink to OpenFOAM-1.6/etc/bashrc) to source all the required env variables only when i wish to run OpenFoam.

One suggestion : You can install OpenFOAM in /opt directory and create a symlink from there to your home directory so that same install can be used by all users on your system. Also I generally find it better to install all programs which are not from the repos into the /opt/ (many use /usr/local for the same purpose) directory. This way they are independent of the system and when i upgrade (which i like to do by formatting my root filesystem, /opt/ is on a different partition) i get to keep my other programs working.