OpenFOAM 1812 Compilation on Linux OS (Ubuntu/Debian)

ParaView Installation

To install ParaView you can choose either download and extract the ZIP package or install it via the system package manager.

You can download and unpack ParaView 5.6.0 by using the following link: Download ParaView 5.6.0

or you can use the system package manager to install it from the repository:

sudo apt get paraview

OpenFOAM 1812 - Compilation

Before compiling OpenFOAM we need to make sure, that all the needed libraries are installed.

Prerequisites

On Ubuntu 20.10 some packages need to be installed prior to compilation. On Ubuntu 20.10 the below list should work. To install them go to the console and:

sudo apt install gcc
(might be missing depending on installation)
sudo apt install libopenmpi-dev

sudo apt install zlib1g-dev

sudo apt install flex

Then, make sure you have access to the MPI library (both commands should print version information):

mpicc --version

mpirun --version

OpenFOAM Compilation

Change the directory to the place where you want to store OpenFOAM (you need to provide your own path):

cd /home/<user name>/<..custom path>/

Extract archives, e.g:

tar -xzf OpenFOAM-v1812.tgz

tar -xzf ThirdParty-v1812.tgz

Load OpenFOAM configurations:

source OpenFOAM-v1812/etc/bashrc

Check if OpenFOAM has access to all necessary libraries

foamSystemCheck

(optional) Set the number of processors to use during compilation

export WM_NCOMPPROCS=10

Change directory to OpenFOAM root

cd OpenFOAM-v1812

Run compilation script

./Allwmake

SimFlow OpenFOAM and ParaView Configuration

After compilation is complete, specify paths to OpenFOAM and ParaView in SimFlow:
  1. Specify the path to the OpenFOAM folder with the application’s executable files inside. In the selected path, two folders should be located: bin and lib which contain the OpenFOAM application and the required libraries.
    Example path: /opt/OpenFOAM/OpenFOAM-v1812/platforms/Linux64GccDPint32Opt
  2. Specify the path to the installation directory of ParaView.
    Example path: /opt/OpenFOAM/ThidrParty-4.0/platforms/Linux64Gcc/ParaView-5.6.0
    or you might try to find it by typing in console:
    which paraview
launcher advanced linux