0% found this document useful (1 vote)
511 views3 pages

OpenFOAM Installation Tutorial

CFD in OpenFOAM

Uploaded by

Taha Farid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
511 views3 pages

OpenFOAM Installation Tutorial

CFD in OpenFOAM

Uploaded by

Taha Farid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

OpenFOAM®(v1906) installation in Ubuntu(v18.

04LTS)

1. Open the firefox or any installed web browser in Ubuntu® OS


2. Go to OpenFOAM installation page
(link: https://www.openfoam.com/download/install-source.php)
3. Go to the preliminaries tab and click system requirements
(link: https://www.openfoam.com/download/install-source.php)
4. Run the following commands (one by one) in the terminal window opened in home directory
of AWS Instance:

command 1:
sudo apt-get update

command 2:
sudo apt-get install build-essential flex bison cmake zlib1g-dev libboost-system-
dev libboost-thread-dev libopenmpi-dev openmpi-bin gnuplot libreadline-
dev libncurses-dev libxt-dev

command 3:
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-
dev libqtwebkit-dev

5. Go back to home page (link: https://www.openfoam.com/download/install-source.php)


and under the tab Build the code from source download the following files (link attached to
the file names as follows):
✓ OpenFOAM-v1906.tgz
✓ ThirdParty-v1906.tgz

6. Extract the files to the $HOME/OpenFOAM directory by running the following command in
your Downloads directory (where the above files are downloaded by default):

command 1:
mkdir $HOME/OpenFOAM

command 2:
tar -xzf OpenFOAM-v1906.tgz -C $HOME/OpenFOAM

command 3:
tar -xzf ThirdParty-v1906.tgz -C $HOME/OpenFOAM
7. In the home directory, go to files->view and check the Show Hidden Files option to view the
hidden files in the home/ubuntu directory:

8. In the home directory, open the file named .bashrc and copy the following command in it
(at the end of the file). Save the file and exit.

command:
source ~/OpenFOAM/OpenFOAM-v1906/etc/bashrc

9. In the home directory, go to following folder /ubuntu/openFOAM/ThirdParty-v-1906/ and


open the terminal in the said directory to run the following command:

command:
./Allwmake

Wait for the code compilation to complete.

10.In the home directory, go to following folder /ubuntu/openFOAM/ThirdParty-v-1906/ and


open the terminal in the said directory to run the following command:

command:
./makeParaView

During code compilation of ParaView, some errors are bound to occur so resolve these
errors by following these instructions:

(link: https://www.cfd-online.com/Forums/openfoam-installation/219297-qt5-openfoam-7-
v1906-ubuntu-18-04-a.html)
11.In the home directory, go to following folder /ubuntu/openFOAM/OpenFOAM-v-1906/ and
open the terminal in the said directory to run the following command:

command:
./Allwmake

Wait for the code compilation of OpenFOAM to complete. Once completed, you can test
the installation by running the cavity case in OpenFOAM

You might also like