albertopassalacqua.com

Alberto Passalacqua

Installing OpenFOAM 2.2.x on openSUSE 12.3

Posted on | April 7, 2013 | 2 Comments

The following procedure illustrates how to install OpenFOAM 2.2.x from the git repository on openSUSE 12.3, for the current users.

  1. Install the C/C++ development pattern:
    • zypper install -t pattern devel_C_C++
  2. Install other dependencies (gnuplot is optional, but useful):
    • zypper install cmake gnuplot openmpi openmpi-devel git-core
    • zypper install libqt4-devel libQtWebKit-devel libQtAssistantClient4
  3. Check that openmpi 1.6 is selected as default with:
    • mpi-selector --list
    • The output should read: “openmpi-1.6″. If not, use mpi-selector to configure the default version of openmpi (this can be done for the individual user or system-wide, acquiring administrative rights)
  4. Create the OpenFOAM directory in your home directory:
    • mkdir ~/OpenFOAM
  5. Move to the OpenFOAM directory:
    • cd ~/OpenFOAM
  6. Download the source code from the git repository:
    • git clone http://github.com/OpenFOAM/OpenFOAM-2.2.x.git
  7. Download the ThirdParty package from here (command on a single line) :
    • wget -c downloads.sourceforge.net/foam/ThirdParty-2.2.0.tgz?use_mirror=mesh -O ThirdParty-2.2.0.gtgz
  8. Extract the ThirdParty package and rename it as follows:
    • tar xzf ThirdParty-2.2.0.gtgz
    • mv ThirdParty-2.2.0 ThirdParty-2.2.x
  9. Add this  prefs.sh file to the directory:
    • ~/OpenFOAM/OpenFOAM-2.2.x/etc/
  10. Add the following line to your ~/.bashrc file:
    • [Optional for multi-core compilation, replace 4 with the number of cores you want to use]: export WM_NCOMPPROCS=4
    • source $HOME/OpenFOAM/OpenFOAM-2.2.x/etc/bashrc
  11. Open a new terminal and execute this sequence of commands to compile the whole OpenFOAM suite
    • source ~/.bashrc
    • cd ~/OpenFOAM/OpenFOAM-2.2.x
    • ./Allwmake
  12. To build paraview and its reader:
    • cd ~/OpenFOAM/ThirdParty-2.2.x
    • ./makeParaView
    • cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers/
    • ./Allwclean
    • ./Allwmake
  13. At this point OpenFOAM 2.2.x should be fully functional on your openSUSE 12.3. The installation can be updated, as usual, with:
    • cd ~/OpenFOAM/OpenFOAM-2.2.x
    • git pull
    • wcleanLnIncludeAll
    • ./Allwmake

Note: If you have an accelerated video card, like nVidia or ATI, it is strongly recommended to install the corresponding proprietary driver.

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

Comments

2 Responses to “Installing OpenFOAM 2.2.x on openSUSE 12.3”

  1. Berns Buenaobra
    June 22nd, 2013 @ 11:05 am

    First is that I want to thank you for these very clear and lucid instructions. It was entirely flawless from start to finish. After I made a decision to dual boot to use Linux OpenSUSE for my work a the university on CFD this was a crucial step for me. Now, I wish to be able to couple DEM with CFD hopefully with LIGGGHTS and CFD DEM on OpenSUSE.

  2. Berns Buenaobra
    June 23rd, 2013 @ 4:14 am

    I have quite a difficulty of having the new LIGGGHTS-PUBLIC compile and work with OpenFOAM to couple that with it. May I request some write up or tip, tutorial on how to make this work? LIGGGHTS is by the way from also an open source initiative that originated from the LAMMPS program/code from Sandia NL. Thanks.

  • openSUSE counter

  • Spread Firefox

    Spread Firefox Affiliate Button
  • Thunderbird

    Spread Firefox Affiliate Button
  • License