CFD,  Linux,  OpenFOAM,  openSUSE

Installing OpenFOAM 1.7.x on openSUSE 11.4

The installation of OpenFOAM® 1.7.x on the freshly released openSUSE 11.4 is straighforward, however some care is required to have a working ParaView. The ThirdParty package provided with OpenFOAM ships ParaView 3.8.0, which does not successfully build with Qt 4.7.

The steps for the installation on openSUSE 11.4 – 64 bit are summarized as follows:

  • Use YaST to install
  • Create a directory called OpenFOAM in your home directory
    • mkdir ~/OpenFOAM
  • Enter the OpenFOAM directory
    • cd ~/OpenFOAM
  • Download the source code: with the command:
    • git clone http://github.com/OpenCFD/OpenFOAM-1.7.x.git
  • Download both the OpenFOAM and ThirdParty packages from here and save them in your ~/OpenFOAM directory
  • Extract the ThirdParty-1.7.1.gtgz package with the command
    • tar xzf ThirdParty-1.7.1.gtgz
  • Rename the directory ThirdParty-1.7.1 to ThirdParty-1.7.x with:
    • mv ThirdParty-1.7.1 ThirdParty-1.7.x
  • Enter the directory ThirdParty-1.7.x
  • Remove the directory paraview-3.8.0
  • Download ParaView 3.10.0 from here and save it in the ThirdParty-1.7.x directory
  • Extract the content of the paraview .zip file in the same directory
  • Rename the directory ParaView-3.10.0 to paraview-3.10.0
  • Open the file ~/OpenFOAM/OpenFOAM-1.7.x/etc/apps/paraview3/bashrc in a text editor
  • Search for: ParaView_VERSION, and modify that line (should be line 54) so that it reads:
    • ParaView_VERSION=3.10.0
  • Save the file and exit the editor.
  • Open your ~/.bashrc file in a text editor and add the line:
    • . $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc

    and source your ~/.bashrc file with the command: source ~/.bashrc

  • Enter the OpenFOAM-1.7.0 directory with the command:
    • cd $FOAM_INST_DIR/OpenFOAM-1.7.x
  • Compile OpenFOAM with the command:
    • ./Allwmake
  • Build Paraview with the following commands:
    • cd $WM_THIRD_PARTY_DIR
    • ./Allclean
    • ./makeParaView
    • The build will fail at the Install stage because ParaViewLibraryDepends.cmake is not found. To solve this problem
      • cd ~/OpenFOAM/ThirdParty-1.7.x/platforms/build-linux64Gcc/paraview-3.10.0/
      • Edit cmake_install.cmake
      • Comment the line containing ParaViewLibraryDepends.cmake (comments are inserted with #)
      • Save the file
      • Execute: cd $WM_THIRD_PARTY_DIR
      • Execute: ./makeParaView -no-config -no-make -install
      • This should install paraview properly for OpenFOAM
  • Rebuild the PV3FoamReader as follows:
    • cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
    • ./Allwclean
    • ./Allwmake

At this point, OpenFOAM should be successfully built, together with paraview, and paraFoam should work properly. You can test it on the icoFoam tutorial.

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. Alberto Passalacqua is not associated to OpenCFD Ltd.

8 Comments

  • J N Hinckel

    Great recipe. Thanks!

    small correction change
    cd $FOAM_UTILITIES/postProcessing/graphicsPV3FoamReader
    to
    cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader

  • Matej

    I would just add a little comment on you great howTo. In 11.4 the python is in version 2.7 while the paraview needs 2.6 version. Therefore additionally I had to make a link: /usr/lib64/libpython2.7.so.1.0 to /usr/lib64/libpython2.6.so.1.0

  • JonW

    Thanks a lot, I am compiling now 1.7.x on my just installed openSUSE 11.4 (so far so good).

    Do you have similar post for the 1.6-ext and openSUSE 11.4 ?
    I have been trying to find usable stuff in cfd-online, but it is hard. (parsing through it now).

    • Alberto

      Hi,

      thank you for your comment! 🙂
      I do not currently use 1.6-ext, however the instructions should not be too different. The numbering is different from the official release, however it should be based on 1.7., or something close to it. The major difference is that the -extend project automated the management of the ThirdParty stack.

      Best regards

  • JonW

    Good news Alberto,
    I have now installed 1.6-ext on one opensuse114 computer (took some time, I tell you). And the installation appears to be 100%. At least ggi seems to be working. I am now installing opensuse 11.4 on another computer, and thereafter I will repeat the installation procedure I used. If successful I will post it on cfd-online 🙂