Installing OpenFOAM 1.6.x and keeping it up to date

OpenCFDTM regularly releases updates for OpenFOAMTM using a GIT repository, which can be conveniently used both for a fresh installation and to keep your current OpenFOAM installation up to date.

First installation

  • 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. If you are using a 64-bit system, you need to download also the 32-bit version of the third party package, containing cmake.
  • Extract the third party packages corresponding to your architecture (32 or 64 bit) in the ~/OpenFOAM directory. If you use a 64 bit system, extract the 32-bit version of the third party packages in another directory from ~/OpenFOAM, and move the cmake directory to the ThirdParty directory into your ~/OpenFOAM directory.
  • Create a symbolic link called ThirdParty-1.6.x pointing to ThirdParty-1.6:  ln -s ~/OpenFOAM/ThirdParty-1.6/ ~/OpenFOAM/ThirdParty-1.6.x
  • Open your ~/.bashrc file in a text editor and add the line:  . $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/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

Once OpenFOAM 1.6.x is built for the first time, you can easily keep it up to date using GIT.

Update an existing installation of OpenFOAM 1.6.x.

  • Enter the ~/OpenFOAM directory: cd ~/OpenFOAM
  • Check for updates: git pull
  • If there are updates, rebuild OpenFOAM as follows:
    • cd ~/OpenFOAM/OpenFOAM-1.6.x
    • ./Allwmake

These operations should be repeated often, in order to keep an up to date installation of OpenFOAM and obtain the latest bug fixes.

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.


  • Ben

    Dear Alberto,

    greats Site, very helpful information, thank you.

    But one question I have. Do I have to compile OpenFoam on Suse11.1? After running tar xvfz an adding the string into the .bashrc, it seems, OpenFoam is ready to start. InterFoam, InterDyMFoam etc are useable. Also paraFoam works.

    Hope, you understand my question.

    Thank you very much for your kind help.

    Best regards


    • Alberto

      Hi Ben,

      no, you do not need to recompile the packages distributed with the binaries, which are build against version 1.6. You need to recompile OpenFOAM from source if you use the 1.6.x version from the git repository, which containes bugfixes which were found in version 1.6.

      I hope this help,

  • Markus

    Hi Alberto,

    thanks for the nice installation guide.

    I think at the moment there is no “cmake” directory in the 32-Bit ThirdParty Directory, which is downloadable on the OpenFoam Website. Perhaps they took it out?
    Do you have another idea to fix the problem?

    Best regards,