CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   OpenFOAM 1.6 package - CentOS 5.3 x86_64 (

linnemann July 30, 2009 07:58

OpenFOAM 1.6 package - CentOS 5.3 x86_64
Hello Foamers

Here is a prepackaged/precompiled version of OpenFOAM-1.6 and Paraview-3.6.1. Some extra mesh related programs have been put in the Thirdparty package.

All built from source, no prepackaged binaries, so optimal speed for CentOS.

The Thirdparty folder have been striped for any source-code and only the binary/lib files are remaining.

---------------- Included ----------------

- OpenFOAM 1.6 (flex, mpfr and gmp built from source)

- Paraview 3.6.1, Mpi support, ffmpeg support (export to avi), and parallezied support for decomposed cases.

- gmsh-2.3.1

- engrid-1.0.1

- meshlab-1.2.1

---------------- Install Instructions for the whole package ----------------

0. First you need to install gcc, c++, bison and ncurses-devel, which is shipped with CentOS 5.3 - (needed to compile/recompile OpenFOAM solvers, or your own solvers)
yum install gcc gcc-c++ bison ncurses-devel
1. Next steps are all done as root

2. Create a folder for OpenFOAM, the default in the bashrc is /usr/loal/OpenFOAM
mkdir /usr/local/OpenFOAM
3. unpack the content of OpenFOAM-1.6_CentOS-5.3_x86-64.tar.gz and ThirdParty-1.6_CentOS-5.3_x86-64.tar.gz to the folder
cd /usr/loal/OpenFOAM
tar -xvf /pathtothedownload/OpenFOAM-1.6_CentOS-5.3_x86-64.tar.gz
tar -xvf /pathtothedownload/ThirdParty-1.6_CentOS-5.3_x86-64.tar.gz
4. Fix any possibly wrong permissions
chmod -R 755 /usr/local/OpenFOAM
5. Next part is done as non-root (user)

6. Put this line in your .bashrc file.
. /usr/local/OpenFOAM/OpenFOAM-1.6/etc/bashrc
restart console or source the bashrc $ . ~/.bashrc

to check if it works try
$ which gcc
this should output the following
$ /usr/local/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/gcc
The Qt-4.5.2.tar.gz and vtk-5.4.2.tar.gz, in the non-essential folder at sourceforge, are extras, which is only needed if you consider recompiling paraview, or some other app which depends on Qt/vtk.

It is possible to install to another location other than /usr/local, all you have to do is to modify you own .bashrc file, the bashrc in OpenFOAM (/usr/local/OpenFOAM/OpenFOAM-1.6/etc/bashrc) to point to the new location of the install like in the regular OpenFOAM README.

---------------- Disclaimer ----------------
The package has been verified on a fresh minimal gnome install of CentOS 5.3 64bit

The package is "as is" and can only be guaranteed to work with a 64bit version of CentOS/RedHat/Scientific 5.3 (yum update is fine). Or if in a cluster environment Rocks 5.2 (based on CentOS 5.3).

If other distributions are used, I can't help you.

---------------- Download ----------------

I have made a sourceforge project for this which can be found at

---------------- BUGS ----------------

User wesoe reported an issue where the geometry is not shown, Takuya proposed putting the following into your .bashrc or run the command before paraFoam is run.
export LC_ALL=C
This is apparently a locale issue

An error related to paraview, if its not installed in /usr/local/OpenFOAM do this as root.
mkdir /pathtoopenfoam/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/lib

ln -s /pathtoopenfoam/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin /pathtoopenfoam/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/lib/paraview-3.6

lockan August 3, 2009 05:51

Does this include a parallel version of ParaView?

Thanks for your help.


linnemann August 3, 2009 06:38


Yes, forgot to mention, it is built with the OpenFOAM shipped version of openmpi.

The only extra I put in is the possibility to read decomposed cases.

you can still use the paraFoam command, but this will only work on reconstructed cases as far as I know.


downforce August 3, 2009 18:20

Can you provide access to the packages other than through depositfiles where you have to pay to download them (unless you want to wait 2 hours between downloads)?

linnemann August 4, 2009 01:40


I have tried many places, but I haven't found a decent place for it yet.

I will try to see if i can create a sourceforge project for it, but I cant promise anything.

If you don't want to wait 2 hours try the torrent.


downforce August 4, 2009 10:12

With regards to the Qt package, do you unpack it as well in the /usr/local directory? i assume then that if so that /usr/local/Qt-4.5.2 would need to be added to your path...

downforce August 4, 2009 10:23

Got everything downloaded from the torrent and installed and works great thank you. Saved me a lot of time...

linnemann August 4, 2009 11:29


Yes you would need to add Qt to your PATH, but it is not needed to run the binary pack.

It is only provided to those who would want a precompiled Qt-4.5.2 for their CentOS install.


linnemann August 6, 2009 01:46

I have made a sourceforge project for this and future packages at


wersoe August 7, 2009 11:28

Great work linnemann...
If you need any help in the future, I am not actually an expert in compiling stuff, anyway, I d like to support the project...

Regards, Sören

wersoe August 7, 2009 12:11

...well, just downloaded, unpacked OpenFOAM.tar.gz to /opt/OpenFOAM and run the icoFoam/cavity.
So, blockMesh and icoFoam run without error, paraFoam opens Paraview, however, I cant see the cavity file. The statistics options gives the correct cell number, but the display remains grey...
Has anybody something similar and could give me a hint?

Would appreciate very much, thanks


linnemann August 8, 2009 06:16

1 Attachment(s)
You need to choose some scalar which you want to show in the top.

First you need to use the arrows on top to get to the last time-step/iteration.

Then under display you can choose which scalar/property you want to show and you properly also have to rescale it using one of the first icons on the second row of the toolbar

linnemann August 8, 2009 06:18

I have restructured the files and added some extra mesh packages in the Thirdparty folder so from now on It will only be possible to download from the sourceforge project page

wersoe August 8, 2009 07:02

1 Attachment(s)
Hello linnemann,

thanks for your reply.
However, I have set all rite, so I think, couldnt see anything anyway.
The color scale is visible, but the geometry isnt...
One other thing, the time scale is not correct, since cavity is calculated up to 0.5s with step size of 0.01.
Something is really wrong, and I couldnt see it.
I will try at another system now, I get back with results...

Anyway, help is much appreciated.

Thanks, Sören

7islands August 8, 2009 08:01

Hi Sören,

I guess your ParaView (PV3FoamReader) is affected by a problem which is reportedly occurs only when ParaView built with Qt 4.5.x is run under certain locales [1]. Try running paraFoam after running "export LC_ALL=C". If it works, write the "export LC_ALL=C" line into somewhere in the paraFoam script for later convenience.

[1] See comments #55-#72 in a Gentoo tracker thread. The thread discusses the parallel reader under Gentoo but I know that the same thing applies to PV3FoamReader and other distros as well.

p.s. @linnemann: thanks about including the parallel reader!


wersoe August 8, 2009 08:23

Hi Takuya,

thanks for help. After exporting the variable, paraFoam works...

@linnemann, maybe you can bring the workaround to your installation instructions, since there are probably some German users out there...

Regards, Sören

linnemann August 8, 2009 08:31

Fix have been included in the installation instructions.


wersoe August 8, 2009 10:59

edited by wersoe

linnemann August 8, 2009 14:42

well I found an error related to paraview, apparently there needs to be a symlink to a folder, if its not installed in /usr/local/OpenFOAM do this as root.
mkdir /pathtoopenfoam/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/lib

ln -s /pathtoopenfoam/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin /pathtoopenfoam/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/lib/paraview-3.6

jploz August 16, 2009 17:46

@7islands: Do you know whether this 'export LC_ALL=C' bug is reported somewhere, so it can be fixed in the sources?


All times are GMT -4. The time now is 05:02.