OpenFOAM at TACC
Last update: April 14, 2020
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.
Running on Frontera and Stampede2
TACC staff has built and installed OpenFOAM 7.0 on both Stampede2 and Frontera compute resources. The Stampede2 executable is built with intel/18.0.2 and impi/18.0.2, while the Frontera executable is built with intel/19.0.5 and impi/19.0.5. Follow the steps below to set up the environment and run an OpenFOAM tutorial example.
Set Up Computing Environment
Set up the proper computing environment by loading the latest OpenFoam module:
login1$ module load openfoam/7.0
OpenFOAM places its cases in the directory defined by the
$FOAM_RUN environment variable. TACC staff suggests using your
$SCRATCH file space to run OpenFOAM cases. The following commands set this environment variable and create the
$FOAM_RUN directory in the user's
login1$ export FOAM_RUN=$SCRATCH/My_OpenFOAM/7.0/run login1$ mkdir -p $FOAM_RUN
Do NOT run the following commands on the login nodes.
You may either submit a batch job, or start an interactive session using TACC's
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$ idev ... c557-804$ cp -r $FOAM_TUTORIALS $FOAM_RUN c557-804$ cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity/cavity
Use the pre-processing tool,
blockMesh, to generate the mesh. Then run the
c557-804$ blockMesh c557-804$ icoFoam c557-804$ exit login1$