Ubuntu Installation Procedure
https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/how-to-install-ubuntu-18-
04-alongside-with-windows-10-or-8-in-dual-boot.html
https://www.tecmint.com/install-ubuntu-alongside-with-windows/
OpenFOAM Installation Procedure on Ubuntu 18.04 LTS - standard procedure
1- Check your GCC (GNU Compiler Collection ) version
- Open a terminal window and type gcc --version
You gcc version should be 17.0.4 or above
2- Install the dependent packages for OpenFOAM and Paraview
- In the terminal window type sudo apt-get install build-essential flex bison git-core
cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev
openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev
- In the same terminal window type sudo apt-get install libqt5x11extras5-dev
libxt-dev qt5-default qttools5-dev curl
3- Open a terminal window and type
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
4- Open a terminal window and type
gedit ~/.bashrc
5- At the end of the bashrc file, paste the line below, save and close the window
source /opt/openfoam7/etc/bashrc
4- In the same terminal window, update the apt package by typing
sudo apt-get update
5- Install OpenFOAM, type the command in the terminal window
sudo apt-get -y install openfoam7
6- Open a new terminal window and type
simpleFoam -help
A “Usage” message should appear. Your installation and user configuration is complete
8- Create a OpenFOAM folder at /Home directory
9- Create a project directory within the /Home/OpenFOAM by typing
mkdir -p $FOAM_RUN
10- Run a simulation to test the installation by typing these commands
10a - cd $FOAM_RUN
10b - cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
10c - cd pitzDaily
10d - blockMesh
10e - simpleFoam
10f - paraFoam
OpenFOAM Installation Procedure on Ubuntu 18.04 LTS - by source code
1- Check your GCC (GNU Compiler Collection ) version
- Open a terminal window and type gcc --version
You gcc version should be 17.0.4 or above
2- Install the dependent packages for OpenFOAM and Paraview
- In the terminal window type sudo apt-get install build-essential flex bison git-core
cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev
openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev
- In the same terminal window type sudo apt-get install libqt5x11extras5-dev
libxt-dev qt5-default qttools5-dev curl
3- Create a OpenFOAM folder at /Home directory
4- Download the OpenFOAM and Paraview installation files at /Home/OpenFOAM
directory by typing
wget -O - http://dl.openfoam.org/source/7 | tar xvz
wget -O - http://dl.openfoam.org/third-party/7 | tar xvz
5- Unpack to produce directories OpenFOAM-7-version-7 and ThirdParty-7-version-7
tar -xzvf openfoam.tar
tar -xzvf thirdParty.tar
6- Change the directories names
mv OpenFOAM-7-version-7 OpenFOAM-7
mv ThirdParty-7-version-7 ThirdParty-7
7- Open the .bashrc file in the user’s home directory in an editor, e.g. by typing in a
terminal window
gedit ~/.bashrc
8- At the bottom of that file, add the following line and save the file
source $HOME/OpenFOAM/OpenFOAM-2.4.0/etc/bashrc
9- At folder OpenFOAM-2.4.0 open a new terminal window and type
./Allwmake
10- Compiling Paraview
cd $WM_THIRD_PARTY_DIR
./makeCmake
wmSET
11- Create a project directory within the /Home/OpenFOAM by typing
mkdir -p $FOAM_RUN
12- Run a simulation to test the installation by typing these commands
10a - cd $FOAM_RUN
10b - cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
10c - cd pitzDaily
10d - blockMesh
10e - simpleFoam
10f - paraFoam
Installing Third-Party Software
- Scotch/PT-Scotch
1- Open a new terminal window at ThirdParty directory home/OpenFOAM/ThirdParty
and type
./Allwmake
- ParaView
1- Open a new terminal window at ThirdParty directory home/OpenFOAM/ThirdParty
and type
./makeParaView
http://dl.openfoam.org/ubuntu/dists/bionic/main/binary-amd64/