CFD,  OpenFOAM

Installing OpenFOAM 1.7 on openSUSE 11.3

The installations instructions for OpenFOAM 1.7.0 on openSUSE 11.3 are almost identical to those for openSUSE 11.2 reported here. However, one additional package is necessary. For the reader’s convenience, I report the whole procedure, highlighting in orange the differences with the installation on openSUSE 11.2.

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 both the OpenFOAM and ThirdParty packages from here and save them in your ~/OpenFOAM directory
  • Extract theĀ OpenFOAM-1.7.0.gtgz package with the command: tar xzf OpenFOAM-1.7.0.gtgz
  • Extract the ThirdParty-1.7.0.gtgz package with the command: tar xzf ThirdParty-1.7.0.gtgz
  • Open your ~/.bashrc file in a text editor and add the line:
    • . $HOME/OpenFOAM/OpenFOAM-1.7.0/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.0
  • Compile OpenFOAM with the command: ./Allwmake
  • Rebuild Paraview with the following commands:
    • cd $WM_THIRD_PARTY_DIR
    • ./Allclean
    • ./makeParaView
  • Rebuild the PV3FoamReader as follows:
    • cd $FOAM_UTILITIES/postProcessing/graphicsPV3FoamReader
    • ./Allwclean
    • ./Allwmake

The native VTK reader available on the OpenFOAM Wiki can be compiled as follows:

  • Download the SVN version of the reader, required for Paraview 3.8 (you need the svn package installed):
    • svn co https://of-interfaces.svn.sourceforge.net/svnroot/of-interfaces/trunk/vtkPOpenFOAMReader
  • I will assume you saved it in ~/vtkPOpenFOAMReader
  • 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:
    • cmake ~/vtkPOpenFOAMReader
  • If OpenFOAM is properly configured, the build configuration will be written.
  • In the same terminal execute the commands
    • make
    • make install
  • Copy the file pvFoam in ~/vtkPOpenFOAMReader into your ~/OpenFOAM/OpenFOAM-1.7.0/bin directory, to be able to run paraview with pvFoam, exactly as done with paraFoam.
  • Note that both the temporary directories vtkReader and vtkPOpenFOAMReader can be removed.

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.

12 Comments

    • Alberto

      To your /home//.bashrc. It is a hidden file in your home directory. Open Dolphin or Nautilus, show the hidden files and it should become visible.

  • Tobias

    Sry, but I need your help again, I am new here.
    I know where to add the line . $HOME/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc now.
    But where do I have to source it? In the text file or in the conole?

    And where do I have to make this:
    “# Enter the OpenFOAM-1.7.0 directory with the command: cd $FOAM_INST_DIR/OpenFOAM-1.7.0”
    In the home directory or in the OpenFOAM or in the OpenFOAM-1.7.1 directory?

    Sry, but I think I need your help again,…
    Thank you so much

    • Alberto

      Add that line to your .bashrc file, save it and then open a terminal. The OpenFOAM settings will be loaded automatically. You do not need to source anything if you are using bash on openSUSE.

      The command cd $FOAM_INST_DIR/OpenFOAM-1.7.1 works from wherever you are.

    • Alberto

      You should explain you problem a bit better. However I would say there is a problem in the path. You probably have OpenFOAM in a slightly different position (typo in the path?).

  • flakid

    /home/flakid/OpenFOAM/OpenFOAM-1.7.1

    After taring the packages , add the line:
    .$HOME/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc
    to .bashrc in
    ./home/flakid/
    and
    source $HOME/.bashrc

    but still
    bash: ./home/flakid/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc: No such file or directory

  • flakid

    This is my dictionary tree:
    /home/flakid/OpenFOAM/OpenFOAM-1.7.1/etc
    I put tar documents in:
    /home/flakid/OpenFOAM/
    and tar

  • VigneshRam

    Hi flakid,
    i too got the same problem. like
    bash: ./home/flakid/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc: No such file or directory

    wat to do……………