Skip to end of metadata
Go to start of metadata

 

 

General Information

Home pageVersionModule dependencies
CompilerMPT
www.openfoam.com2.3.1gcc/4.9.1mpt/2.10
2.4.0gcc/4.9.1mpt/2.11

OpenFOAM is a free, open source CFD software package that has a range of features for solving complex fluid flows involving chemical reactions, turbulence and heat transfer, and solid dynamics and electromagnetics.

Usage on Vilje

Load the gcc, mpt and openfoam modules to use OpenFOAM on Vilje, e.g:

$ module load gcc/4.9.1 mpt/2.10 openfoam/2.3.1

Sample OpenFOAM Job Script

#!/bin/bash
###################################################
#
#  OpenFOAM test job
#
###################################################
#
#PBS -N OpenFOAM
#PBS -A nn1234k
#PBS -l select=2:ncpus=32:mpiprocs=2
#PBS -l walltime=00:20:00

module load gcc/4.9.1
module load mpt/2.10
module load openfoam/2.3.1

case=damBreak

# Create a unique working directory
workdir=/work/$USER/$PBS_JOBID
mkdir -p $workdir

# Copy input files and move to the working directory
cp -r $PBS_O_WORKDIR/$case $workdir
cd $workdir/$case

# Run OpenFOAM in the working directory
blockMesh
setFields
decomposePar
mpiexec_mpt interFoam -parallel
reconstructPar

# Create a unique directory in the directory where the job
# was submitted and copy the result files to that directory.
mkdir -p $PBS_O_WORKDIR/$PBS_JOBID
cp -r constant system [0-9]* $PBS_O_WORKDIR/$PBS_JOBID

# OpenFOAM produces a lot of temporary files that must be
# deleted, since they consume file system resources (inodes).
cd /tmp
rm -rf $workdir

OpenFOAM Training Tutorial

We have a complete tutorial on how to use OpenFOAM, see the links below.

Further Information

 

  • No labels