Hi, I thought I'd share my experiences about installing the new OpenFOAM 2.2.2 from source on Xubuntu 13.10, because there was a nasty bug with compiling scotch. I always prefer installing from source, because I want my ParaView with MPI and Python support. This installation is for a 64bit system.
Let's go through the installation procedure.
1. Create OpenFOAM root directory if it doesn't exist.
2. Download the source packs OpenFOAM-2.2.2.tgz and ThirdParty-2.2.2.tgz from http://www.openfoam.org/download/source.php
and copy them to the OpenFOAM root directory $HOME/OpenFOAM.
3. Extract the source packs.
tar xzf OpenFOAM-2.2.2.tgz
tar xzf ThirdParty-2.2.2.tgz
4. Get the required dependencies and Python. I also prefer to use the system OpenMPI so we'll get that too (the built-in version should also work).
sudo apt-get install build-essential flex bison cmake zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libncurses-dev libxt-dev python python-dev
sudo apt-get install libopenmpi1.6-dev openmpi1.6
5. Edit the OpenFOAM configuration to use the system OpenMPI and source it.
Replace line 84 in file OpenFOAM-2.2.2/etc/bashrc
and load the configuration.
6. Download Tecio (optional).
7. Fix bug #1048, which is preventing the scotch library from compiling (for details see http://www.openfoam.org/mantisbt/view.php?id=1048
). Execute this in folder ThirdParty-2.2.2.
sed -i -e 's=-lz -lm -lrt=-Xlinker --no-as-needed -lz -lm -lrt=' etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-*
8. Compile OpenFOAM. As you propably have more than one processor core available let's use them. I have four but your mileage may vary.
9. Compile ParaView with MPI and Python support.
./makeParaView -mpi -python -python-lib /usr/lib/x86_64-linux-gnu/libpython2.7.so
10. Compile PV3FoamReader.
11. Add OpenFOAM and ParaView environmental variables in file $HOME/.bashrc. (NOTE! Replace the dir /home/zordiack with your own home directory.)
12. You can now test your installation with a test script and by running a tutorial.
mkdir -p $FOAM_RUN
cp -R $FOAM_TUTORIALS/incompressible/icoFoam/cavity .
If everything worked without errors you should now have a working OpenFOAM-2.2.2 installation :)
I'm also going to install some additional components which are not part of the basic installation. These steps are entirely optional and you can read on if you wish.
13. Download and install swak4Foam (for more info see http://openfoamwiki.net/index.php/Contrib/swak4Foam
sudo apt-get install subversion
svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/libraries/swak4Foam/
Fix timeset method compatibility issue with version 2.2.2. Download the patch from post http://www.cfd-online.com/Forums/ope...tml#post434217
and copy the patch into swak4Foam source directory and apply the patch. After patching compile the code.
patch -p1 < patch_swak2Foam_024_OF22x_49808a1c
14. Download and install alternative parallel OpenFOAM reader plugin for ParaView (for more info see http://openfoamwiki.net/index.php/Co...r_for_ParaView
sudo apt-get install cmake-curses-gui
svn co https://of-interfaces.svn.sourceforge.net/svnroot/of-interfaces/trunk/vtkPOFFReader
Then press c twice to configure (the default options should be correct) and press g to generate Makefiles and exit. Now compile and install.
15. Download and install PyFoam (for details see http://openfoamwiki.net/index.php/Contrib_PyFoam
sudo apt-get install python-numpy
tar zxvf PyFoam-0.6.1.tar.gz
sudo python setup.py install
That's it! You now have a powerful set of opensource CFD in your hands :)