11-07-2025
Installation
1. Windows Subsystem for Linux (WSL)
2. OpenFOAM v2212
3. Paraview
4. waves2Foam
OE5555 – Summer Training in Computer Modelling and Simulation
Installation (Windows Subsystem for Linux WSL - Ubuntu)
Install Ubuntu from Microsoft Store:
Set up username and password:
OE5555 – Summer Training in Computer Modelling and Simulation
1
11-07-2025
Linux Cheat Sheet
Frequently used commands:
Commands Actions
ls Lists directory
cd dir Change directory to dir
cd Change directory to home
cd .. Change directory to the parent directory ! NOTE:
Add –r argument to copy
cp file1 file2 (or) cp -r dir1 dir2 Copy file1 or dir1 to file2 or dir2 or move directories
mv file1 file2 (or) cp -r dir1 dir2 Move file1 or dir1 to file2 or dir2
In case of any doubt,
mkdir dir Create a directory dir
type the cmd followed
touch file Create a file by --help
rm file (or) rm -r dir Remove file or dir
tail -f file Outputs the contents of file
ctrl + C Halts the current command
ctrl + D (or) exit Log out of the current session
Refer: [Link]
OE5555 – Summer Training in Computer Modelling and Simulation
Installation (OpenFOAM)
Requirements:
[Link]
sudo apt-get update
sudo apt-get install build-essential autoconf autotools-dev cmake gawk gnuplot
sudo apt-get install flex libfl-dev libreadline-dev zlib1g-dev openmpi-bin libopenmpi-dev mpi-default-bin mpi-default-dev
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev
sudo apt-get install libfftw3-dev libscotch-dev libptscotch-dev libboost-system-dev libboost-thread-dev libcgal-dev
Create a Project directory in home:
cd ~
mkdir -p OpenFOAM
cd OpenFOAM
OE5555 – Summer Training in Computer Modelling and Simulation
10
2
11-07-2025
Installation (OpenFOAM)
Download the source files:
[Link]
wget [Link]
wget [Link]
Extract the source files:
tar -xzvf [Link]
Run cd OpenFOAM-v2212 after extracting
tar -xzvf [Link]
Source OpenFOAM:
source etc/bashrc ! To be run inside $HOME/OpenFOAM/OpenFOAM-v2212
Set up environment:
Run this command to add the OpenFOAM source to ~/.bashrc
echo 'source ~/OpenFOAM/OpenFOAM-v2212/etc/bashrc' >> ~/.bashrc
Source the .bashrc file
source ~/.bashrc
OE5555 – Summer Training in Computer Modelling and Simulation
11
Installation (OpenFOAM & Paraview)
Build OpenFOAM:
cd ~/openfoam/OpenFOAM-v2212 -j - compile with all cores
./Allwmake -j -s -q -l -s - silent (reduce output verbosity)
-q - queue
Run again to list the errors: -l - log output to a file
./Allwmake -j -s -q -l
Source the .bashrc file again:
source ~/.bashrc
Install paraview (Visualisation tool):
sudo apt install paraview
Direct & better method
OE5555 – Summer Training in Computer Modelling and Simulation
12
3
11-07-2025
Installation (waves2Foam)
Follow the waves2Foam official manual:
[Link]
source: waves2Foam manual
OE5555 – Summer Training in Computer Modelling and Simulation
13