Installation Guide for OpenFoam 2.3.0 on Ubuntu 14.04

Steps:

1.

Go to http://www.openfoam.org/download/source.php and download the source code OpenFOAM-2.3.0.tgz and ThirdParty-2.3.0.tgz.

2.

Install the necessary repository, open a terminal (ctrl+alt +t) and write:

  • sudo -s
  • User password
  • apt-get install build-essential flex bison cmake zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libncurses-dev libxt-dev
  • exit

3.

Create a New Folder called OpenFoam in your Home directory; then save the OpenFOAM-2.3.0.tgz and ThirdParty-2.3.0.tgz there.

4.

Extract the information.

5.

Write on the terminal cd to return to Home directory, then write gedit .bashrc. It will show you a file that you have to edit. At the end of the text, copy the next line:

  • source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc.

6.

Write on the Terminal:

  • . .bashrc (this command terminates the edition of bashrc file)
  • echo $FOAM_INST_DIR (this command takes you to OpenFoam directory)

7.

Then write on the Terminal:

  • export FOAM_INST DIR=$HOME/OpenFoam
  • . /home/(your pc’s name)/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc
  • cd $WM_THIRD_PARTY_DIR
  • ./Allwmake (this will take 30 minutes or more)

8.

ParaView installation:

  • cmake –version (this command shows you the current version)
  • ./makeParaView4 (this will take some time )

9.

Write on the terminal:

  • cd $WM_PROJECT_DIR
  • ./Allwmake  (this will take 3 hours or more)

10.

Before checking the installation, create a directory with the next command:

  • mkdir -p $FOAM_RUN
  • cp -r $FOAM_TUTORIALS $FOAM_RUN

11.

Testing the installation:

  • foamInstallationTest >log.foamInstallationTest
  • cat log.foamInstallationTest

12.

To fix paraView’s bug:

  • cd $WM_THIRD_PARTY_DIR
  • sed -i -e ’s=CUDA_FOUND=OFF=g’ ParaView-4.1.0/Plugins/SciberQuestToolKit/SciberQuest/CMakeLists.txt
  • ./makeParaView4 -qmake $(which qmake-qt4) > log.makePV 2>&1

Saul Montoya

Saul Montoya es Ingeniero Civil graduado de la Pontificia Universidad Católica del Perú en Lima con estudios de postgrado en Manejo e Ingeniería de Recursos Hídricos (Programa WAREM) de la Universidad de Stuttgart con mención en Ingeniería de Aguas Subterráneas y Hidroinformática.

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.