Please note that this repo reuses publicly available scripts and the following instruction created by OpenCFD. Scripts and the instruction were modified according to my needs and to run OpenFoam 2.3.1.
Note that you may need to mark the install and start scripts as executable.
This will download an image from ztnuaa/openfoam231 and setup a container based on Ubuntu-18.04. The container has already installed the building environment to compile the OpenFOAM-2.3.1 following the guide from OpenFOAM wiki Step 1-4. Note, the qt environment for Paraview is not considered here.
This will start the openfoam231 container if it's stopped, or enter the container if it's already running.
The etc/bashrc of OpenFOAM-2.3.1 has been already sourced in the docker run
command. If you have some environment variables, your should export it by yourself. To compile the OpenFOAM-2.3.1 source code, please follow the installation guide at OpenFOAM-2.3.1 Ubuntu-18.04 Step 5~15.
Use it to check if everything is working well.
Create a project directory within the $HOME/OpenFOAM directory named -2.2.2 (e.g. chris-2.2.2 for user chris and OpenFOAM version 2.2.2) and create a directory named run within it, e.g. by typing:
mkdir -p $FOAM_RUN
Copy across the backward facing step example, generate the mesh with blockMesh and run the steady flow, incompressible solver simpleFoam
cd $FOAM_RUN
cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
cd pitzDaily
blockMesh
simpleFoam
paraFoam