Skip to main content

Running OpenFOAM®

Official documentation

How to run OpenFOAM

OpenFoam is provided via the new software environment 

STEP 1: log into Axiom frontend

ssh <username>

STEP 2: submit batch job

Go to your OpenFOAM project directory and submit the batch job with:


where the script looks something like the example given below.

Here we use a problem that was decomposed in 4 sub-domains and explicitly spread over two nodes to illustrate the use of MPI for processing in "-parallel" mode.

#!/bin/bash -l

#SBATCH --account=<account_to_use>
#SBATCH --nodes 2
#SBATCH --ntasks 4
#SBATCH --partition=axiom
#SBATCH --constraint=AVX2
#SBATCH --mem-per-cpu=5G
#SBATCH --time=01:00:00

source /dcsrsoft/spack/bin/setup_dcsrsoft 

module load gcc mpich
module load openfoam


mpirun -np $SLURM_NTASKS interFoam -parallel