Skip to content

How to compile and Install OpenFOAM 1.6

April 30, 2011

Step1:

To get the sources you will need to do the following

cd ~/OpenFOAM/
git clone http://repo.or.cz/r/OpenFOAM-1.6.x.git/
cd OpenFOAM-1.6.x
git pull

Step 2:

Download Third party source from http://space.dl.sourceforge.net/project/foam/foam/1.6/ThirdParty-1.6.General.gtgz

cd ~/OpenFOAM/
tar -zxf ThirdParty-1.6.General.gtgz

Step 3:

In ~/OpenFOAM/OpenFOAM-1.6.x/etc/settings.sh change the line (line no 98)

compilerInstall=OpenFOAM

to

compilerInstall=System

Step 4:

Next source the OF setting by

. ~/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc

Step 5:

Next step is to compile OF.

Set the number of processors to use, in this case 4

export WM_NCOMPPROCS=4

Compile the ThirdParty stuff

cd ~/OpenFOAM/
ln -s ThirdParty-1.6 ThirdParty-1.6.x
cd ThirdParty-1.6.x
./Allwmake

Assuming you have no errors, we can now compile OpenFOAM re-source the settings (to pick up newly created directories)

cd ~/OpenFOAM/OpenFOAM-1.6.x
. etc/bashrc

Then compile away

./Allwmake

Thats it. You have done.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: