Last update: January 5, 2018
The OpenFOAM (Open Field Operation and Manipulation) Toolbox is a free, open source Computational Fluid Dynamics (CFD) software package providing an extensive range of features, from solving complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.
TACC staff has built and installed OpenFOAM 5.0 using Intel compiler 18.0.0 and Intel MPI on Stampede2. Please follow the steps below to set up the environment and run a OpenFOAM tutorial example.
Set up the proper computing environment by loading the appropriate Intel compiler and loading the OpenFoam module.
Assuming you have the default compiler loaded, issue the following commands:
login1$ module swap intel intel/18.0.0 login1$ module load openfoam/5.0
OpenFOAM places its cases in the directory defined by the
FOAM_RUNenvironment variable. TACC staff suggests using your
$WORKfile space to run OpenFOAM cases. The following commands set this environment variable and create the
FOAM_RUNdirectory under the user's
login1$ export FOAM_RUN=$WORK/My_OpenFOAM/5.0/run login1$ mkdir -p $FOAM_RUN
The following demonstrates running the OpenFOAM's Lid-driven Cavity Flow test case involving isothermal, incompressible flow in a two-dimensional square domain.
Copy OpenFOAM's tutorials into the OpenFOAM work directory created above, then change to the cavity case directory:
login1$ cp -r $FOAM_TUTORIALS $FOAM_RUN login1$ cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity
Use the pre-processing tool,
blockMesh, to generate the mesh. Then run the
login1$ idev ... c557-804$ blockMesh c557-804$ icoFoam c557-804$ exit login1$