OpenFOAM at TACC
Last update: August 13, 2024
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
Updates for Stampede3 and Vista coming soon.
TACC staff has built and installed OpenFOAM 7.0 on both Frontera compute resources. 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 $SCRATCH
directory.
login1$ export FOAM_RUN=$SCRATCH/My_OpenFOAM/7.0/run
login1$ mkdir -p $FOAM_RUN
Run Tutorials
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 idev
utility.
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 theicoFoam
solver.c557-804$ blockMesh c557-804$ icoFoam c557-804$ exit login1$