Alberto Passalacqua

OpenFOAM 1.6.x on openSUSE 11.2 and VTK reader

Posted on | November 28, 2009 | 21 Comments

Installing OpenFOAM® on openSUSE 11.2 is very easy, and can be done using, at least in part, the system tools, to take advantage of the new compiler. The steps of the procedure are the following:

  • Use YaST to install
  • Create a directory called OpenFOAM in your home directory
    • mkdir ~/OpenFOAM
  • Enter the OpenFOAM directory
    • cd ~/OpenFOAM
  • Download the OpenFOAM sources from the GIT repository
    • git clone git://
  • Download the third party packages from the OpenCFD website
  • Extract the third party packages corresponding to your architecture in the ~/OpenFOAM directory
  • Rename the ThirdParty-1.6 into ThirdParty-1.6.x
  • Remove the following directories from the ThirdParty directory containing
    • cmake
    • gcc
  • Edit ~/OpenFOAM/OpenFOAM-1.6.x/etc/ to set
    • compilerInstall=System
  • Open your ~/.bashrc file in a text editor and add the line:
    • . $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc

    and source your ~/.bashrc file with the command (thanks to friesenjunge :-) )

    • source ~/.bashrc
  • Enter the ThirdParty-1.6.x directory
    • cd ~/OpenFOAM/ThirdParty-1.6.x
  • Rebuild Paraview with the following commands (you need qt4 development libraries installed in your system. Check the README file coming with OpenFOAM for a list of working versions)
    • rm -rf paraview-3.6.1/platforms
    • ./makeParaView
  • Enter the ~/OpenFOAM/OpenFOAM-1.6.x directory
    • cd ~/OpenFOAM/OpenFOAM-1.6.x
  • Rebuild OpenFOAM typing
    • ./Allwmake

This will rebuild the whole OpenFOAM and paraview, and provide you a fully working installation. However, the paraFoam reader might have some problem to properly show results in paraview. I could not solve them, however there is an alternative reader available on the OpenFOAM unofficial wiki, that can be compiled as follows. Note that the installation procedure assumes you have OpenFOAM 1.6.x installed and properly configured as explained above, and that paraview has been compiled successfully on your system.

  • Download the code from here.
  • Extract the archive in a directory of your choice. It is not important where, since the reader will be installed in your OpenFOAM tree. I will assume you extracted it in ~/vtkPOpenFOAMReader-r173-20090920
  • Create a directory where to build the reader. For convenience I will call it ~/vtkReader.
  • Open a terminal and enter that directory
    • cd vtkReader.
  • Type the command:
    • ccmake ~/vtkPOpenFOAMReader-r173-20090920
  • You will see a screen generated from cmake.  Simply press “c” to configure.
  • Another screen will appear with the following variables defined on the basis of your OpenFOAM installation
    • ParaView_DIR
  • Accept the proposal by pressing “g” to generate the configuration file and exit.
  • In the same terminal execute the commands
    • make
    • make install
  • Copy the file pvFoam in ~/vtkPOpenFOAMReader-r173-20090920/BSD/ into your ~/OpenFOAM/OpenFOAM-1.6.x/bin directory, to be able to run Paraview with pvFoam, exactly as done with paraFoam.
  • Refer to ~/vtkPOpenFOAMReader-r173-20090920/readerPanel.pdf for details on the reader interface.

Enjoy :-)

This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks.


21 Responses to “OpenFOAM 1.6.x on openSUSE 11.2 and VTK reader”

  1. Pradeep
    December 3rd, 2009 @ 11:04 am

    Hi Alberto,
    I am getting the following error while trying to install OpenFOAM. Can you give me some feedback. I have installed teh C++ pattern, cmake and libqt4-develop packages. I have done the git pull and followed the steps. When i try to make paraview i am getting the following error. Kindly help me out

    pradeep@linux-giny:~/OpenFOAM/ThirdParty-1.6.x> ./makeParaView
    did not find paraview- in these directories:

    abort build

  2. Alberto
    December 5th, 2009 @ 5:06 am

    Did you install the ThirdParty packages?

  3. Emanuele
    December 8th, 2009 @ 9:33 pm

    how long compilation process takes on a Intel Dual-Core 1.86 Ghz? I’d like to know if i can compile OpenFoam with my laptop. Regards

  4. Alberto
    December 8th, 2009 @ 10:26 pm

    Hi Emanuele,

    as a rough estimate, a couple of hours. However, yes, you can build it on your laptop. I do that too.

    With kind regards,

  5. Emanuele
    December 11th, 2009 @ 2:12 pm

    It works. If i wann update what i have to do? These two commands??
    git pull
    Thanks for your help.

  6. Alberto
    December 12th, 2009 @ 7:32 am


    yes, that’s correct. Sometime you might need to clean your installation before running ./Allwmake. In such a case you can use


    which might be sufficient, or


    and then ./Allwmake

  7. friesenjunge
    December 30th, 2009 @ 8:18 pm


    did not find paraview- in these directories:

    you forget to load the environment variables
    . /home/yourname/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc

    hope this helps


  8. Alberto
    December 30th, 2009 @ 10:52 pm

    Hi and thanks for your message. Actually the environment variables are set by the following step, which is essential to the build process:

    Open your ~/.bashrc file in a text editor and add the line:

    * . $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc

    This line is identical to what you suggested, but does not depend on the username.
    About paraview, if you install both the general and platform-specific third-party packages, you should have paraview in your ThirdParty directory.


  9. friesenjunge
    December 31st, 2009 @ 10:45 pm

    Hi Alberto,

    my solution was posted under the impression that you wanted to carry out all the actions in one terminal session. For your solution one would have to logout and than login again, which seems to have lead to the error in the first place. Maybe you could just add a line saying “you have to login (best you close the terminal and start a new one to carry on) again for changes to take affect”

    Cheers and a happy new year to you,

  10. Sebastian
    January 21st, 2010 @ 1:54 pm

    Hi Alberto!

    Thanks for your instructions. For me there is one question left:
    I ´m not sure what “Remove the following directories from the ThirdParty directory containing cmake gcc” actually means. In my case there is only a directory named “gcc-4.3.3″ inside ~/OpenFOAM/Third-1.6.x/. Is this the only one that has to be deleted?

    Thanks in advance!


  11. Alberto
    January 21st, 2010 @ 4:37 pm

    Hi Sebastian,

    yes, gcc is the only directory you have on 64 bit.


  12. Sebastian
    January 22nd, 2010 @ 9:50 am

    Thanks Alberto! Great work, the compilation was successful!

    Information for others:
    machine: 2 x AMD 2354 on Asus KFN32-D SLI 16 Gb RAM running with openSUSE 11.2

  13. Krishna Ravi
    February 2nd, 2010 @ 11:30 pm

    Sir Thank You very much for the detailed installation steps.I have also a remedy for paraview for the current installation

    First Installed paraview data from this site:

    Then I installed Paraview from this site

    Then I did the instructions given by you

    Than You very muchh for detailed steps and also best regards


  14. David
    April 12th, 2010 @ 12:47 pm

    Thank You so much for this guide. It works and solve my problems with working with the binary files.

    Great job


  15. Simon
    April 25th, 2010 @ 10:45 am

    Thanks a lot Alberto. Everything works fine now. I followed your guide, but had to do some extra work.

    After the Installation of OpenFoam I ran the FoamInstallationTest. The result was:

    WARNING: Conflicting installations:
    foam settings: /bin/gcc
    current path : /usr/bin/gcc

    To solve the problem I had to add “export WM_64=on” in the .bashrc file and “WM_COMPILER_DIR=/usr” after the “export WM_COMPILER_ARCH=” entry in the bashrc file in the OpenFOAM directory.

    Then when running paraFoam I got the error message: /home/OpenFOAM//OpenFOAM-1.6/bin/paraFoam: line 109: 22727 Abandon paraview –data=”$caseFile
    So besides your suggested VTK Reader I installed the PV3FoamReader according to the README of OpenFOAM. And now I have no error message and actually see results. Great! :)

  16. hector
    May 2nd, 2010 @ 6:45 pm

    when I do source ~/.bashrc
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/bin/foamCleanPath: No such file or directory
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/bin/foamCleanPath: No such file or directory
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/bin/foamCleanPath: No such file or directory
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/etc/ No such file or directory
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/etc/ No such file or directory
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/etc/apps/paraview3/bashrc: No such file or directory
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/etc/apps/ensight/bashrc: No such file or directory
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/bin/foamCleanPath: No such file or directory
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/bin/foamCleanPath: No such file or directory
    -bash: /root/OpenFOAM/OpenFOAM-1.6.x/bin/foamCleanPath: No such file or directory

    Is it ok ?

  17. Alberto
    May 3rd, 2010 @ 3:30 am

    Hi Hector,
    No it’s not correct :-)

    Why do you have OpenFOAM in a directory called /root ? It should be in /home//OpenFOAM or you should specify the installation directory as explained in the README file.

    I would also check if those files are present in the directory tree of OpenFOAM, after you extract the files.


  18. hector
    May 4th, 2010 @ 2:32 pm

    I have this problem to run foamInstallationTest
    gcc 4.4.1
    WARNING: Conflicting installations:
    OpenFOAM settings : /bin/gcc
    current path : /usr/bin/gcc

    gzip 1.3.12 /usr/bin/gzip
    tar 1.21 /bin/tar
    WARNING: Conflicting installations:
    OpenFOAM settings : /root/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/icoFoam
    current path :

  19. Alberto
    May 5th, 2010 @ 4:35 am

    You have a conflict in your installation according to that test. What happens when you try to run icoFoam on its tutorial?

  20. Michael
    June 24th, 2010 @ 7:03 pm

    Thank you Alberto for your installation guide, especially the one for paraview. I tried the whole day installing paraview with the openfoam’s own reader but it didnt work. Then I found your guidelines and the compilation worked with no problems.
    Greetings, Michael (old friend of Jaswi)

  21. Toni
    August 31st, 2010 @ 11:31 am

    I followed your instructions and successfully compiled OF.
    Unfortunately when I type “paraFoam” i get: /home/kressnt/OpenFOAM/OpenFOAM-1.6.x/bin/paraFoam: Line 133: paraview: commando not found.

  • openSUSE counter

  • Spread Firefox

    Spread Firefox Affiliate Button
  • Thunderbird

    Spread Firefox Affiliate Button
  • License