Skip to content

OpenFoam

OpenFOAM is a free, open source CFD software package. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.

CSC Installed Software Collection

Install 32bit/64bit

Warning

There is a very small quota for maximum number of files on LUMI: projappl (100K), scratch (2.0M), flash (1.0M) - check: lumi-quota.

#!/bin/bash

SCRATCH="/pfs/lustre..."

cd $SCRATCH
mkdir -p openfoam
cd openfoam

export EBU_USER_PREFIX=$PWD/easybuild/lumi-c-23.09
module load LUMI/23.09 partition/container EasyBuild-user

#32bit - use eb file from this repository
#eb OpenFOAM-v2312-cpeGNU-23.09.eb -r

#64bit - use eb file from this repository
eb eb/OpenFOAM-v2312-64bit-cpeGNU-23.09.eb -r

Run 32bit/64bit

#!/bin/bash

SCRATCH="/pfs/lustre..."

cd $SCRATCH/openfoam

export EBU_USER_PREFIX=$PWD/easybuild/lumi-c-23.09
module load LUMI/23.09 partition/container EasyBuild-user
ml OpenFOAM/v2312-cpeGNU-23.09-64bit

#32bit
#source $EBROOTOPENFOAM/etc/bashrc WM_COMPILER=Cray WM_MPLIB=CRAY-MPICH

#64bit
source $EBROOTOPENFOAM/etc/bashrc WM_COMPILER=Cray WM_MPLIB=CRAY-MPICH WM_LABEL_SIZE=64

OPENFOAM_PROJECT="/pfs/lustre..."
cd $OPENFOAM_PROJECT

srun -n 1 blockMesh
srun -n 1 decomposePar

srun -n $SLURM_NTASKS snappyHexMesh -overwrite -parallel | tee log.snappy
srun -n $SLURM_NTASKS createPatch -overwrite -parallel | tee log.createPatch
srun -n $SLURM_NTASKS transformPoints -scale '(0.01 0.01 0.01)' -parallel | tee log.transformPoint
srun -n $SLURM_NTASKS renumberMesh -overwrite -parallel | tee log.renum
srun -n $SLURM_NTASKS pimpleFoam -parallel | tee log.pimpleFoam1

License

OpenFOAM is the free, open source CFD software developed primarily by OpenCFD Ltd since 2004. OpenCFD Ltd, owner of the OpenFOAM Trademark, is a wholly owned subsidiary of ESI Group.

ESI-OpenCFD produces the OpenFOAM® open source CFD toolbox and distributes freely via https://www.openfoam.com/. OpenCFD Ltd was established in 2004 to coincide with the release of its OpenFOAM software under general public license.

OpenFOAM is distributed under the GPL v3 license.

References