CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

OpenFOAM 2.2.2 source pack installation on Xubuntu 13.10

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By zordiack

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 23, 2013, 05:12
Default OpenFOAM 2.2.2 source pack installation on Xubuntu 13.10
  #1
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
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.
Code:
mkdir $HOME/OpenFOAM
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.
Code:
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).
Code:
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.
Code:
cd $HOME/OpenFOAM
Replace line 84 in file OpenFOAM-2.2.2/etc/bashrc
Code:
export WM_MPLIB=OPENMPI
with
Code:
export WM_MPLIB=SYSTEMOPENMPI
and load the configuration.
Code:
source OpenFOAM-2.2.2/etc/bashrc
6. Download Tecio (optional).
Code:
cd ThirdParty-2.2.2
wget http://download.tecplot.com/tecio/2009/tecio2009.zip
unzip tecio2009.zip
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.
Code:
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.
Code:
export WM_NCOMPPROCS=4
cd $HOME/OpenFOAM/OpenFOAM-2.2.2/
./Allwmake
9. Compile ParaView with MPI and Python support.
Code:
cd $HOME/OpenFOAM/ThirdParty-2.2.2
./makeParaView -mpi -python -python-lib /usr/lib/x86_64-linux-gnu/libpython2.7.so
10. Compile PV3FoamReader.
Code:
cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers 
wmSET 
./Allwclean 
./Allwmake
11. Add OpenFOAM and ParaView environmental variables in file $HOME/.bashrc. (NOTE! Replace the dir /home/zordiack with your own home directory.)
Code:
source $HOME/OpenFOAM/OpenFOAM-2.2.2/etc/bashrc
export ParaView_DIR=/home/zordiack/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc/paraview-3.12.0
        export PATH=$ParaView_DIR/bin:$PATH
        export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-3.12
12. You can now test your installation with a test script and by running a tutorial.
Code:
cd $WM_PROJECT_DIR/bin
./foamInstallationTest
mkdir -p $FOAM_RUN
cp -R $FOAM_TUTORIALS/incompressible/icoFoam/cavity .
cd cavity
blockMesh
icoFoam
paraFoam
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).
Code:
sudo apt-get install subversion
cd $HOME/OpenFOAM
svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/libraries/swak4Foam/
cd 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.
Code:
gunzip patch_swak2Foam_024_OF22x_49808a1c.gz
patch -p1 < patch_swak2Foam_024_OF22x_49808a1c
./Allwmake
14. Download and install alternative parallel OpenFOAM reader plugin for ParaView (for more info see http://openfoamwiki.net/index.php/Co...r_for_ParaView).
Code:
cd $HOME/OpenFOAM/ThirdParty-2.2.2
sudo apt-get install cmake-curses-gui
svn co https://of-interfaces.svn.sourceforge.net/svnroot/of-interfaces/trunk/vtkPOFFReader
mkdir build_offreader
cd build_offreader
ccmake ../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.
Code:
make
make install
15. Download and install PyFoam (for details see http://openfoamwiki.net/index.php/Contrib_PyFoam).
Code:
cd $HOME/OpenFOAM
sudo apt-get install python-numpy
wget http://openfoamwiki.net/images/3/33/PyFoam-0.6.1.tar.gz
tar zxvf PyFoam-0.6.1.tar.gz
cd PyFoam-0.6.1/
sudo python setup.py install
That's it! You now have a powerful set of opensource CFD in your hands
wyldckat and Thamali like this.

Last edited by zordiack; November 13, 2013 at 02:20. Reason: added openmpi1.6 package to apt-get command, mpirun won't work without it
zordiack is offline   Reply With Quote

Old   October 26, 2013, 13:08
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Pekka,

Many thanks for sharing this detailed installation guide!
I've added a link to this thread here: http://openfoamwiki.net/index.php/In...u#Ubuntu_13.10

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.org] OpenFOAM 2.1.1 installation on openSUSE 12.2 32 bit saturn_53 OpenFOAM Installation 13 February 1, 2015 04:17
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
OpenFOAM Installation Meisam OpenFOAM Installation 6 January 31, 2012 15:43


All times are GMT -4. The time now is 00:11.