Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

OpenFOAM is a framework for developing application executables that use packaged functionality contained within a collection of approximately 100 C+ libraries. OpenFOAM is shipped with approximately 250 pre-built applications that fall into two categories: solvers, that are each designed to solve a specific problem in fluid (or continuum) mechanics; and utilities, that are designed to perform tasks that involve data manipulation.

Source: https://cfd.direct/openfoam/user-guide/

...

Creating the singularity image

No Format
mkdir -p $HOME/sw/OpenFOAM/${USER}-4.1Containers/
cd  $HOME/OpenFOAM/${USER}-4.1

sw/Containers/
singularity pull shell -B docker:/scratch/${USER}:/scratch --pwd /scratch/public.docker.itc.griffith.edu.au/openfoam/openfoam4-paraview50

Initial setup and test

No Format
mkdir -p $HOME/OpenFOAM/${USER}:/scratch --pwd-4.1
cd $HOME/OpenFOAM/${USER}-4.1 /export/home/s3000725/sw/Containers/openfoam4-paraview50_latest.sif

#singularitysingularity  shell -B /scratch/s3000725${USER}:/scratch --pwd /scratch/s3000725${USER}:/scratch --pwd /scratch /export/home/s3000725$HOME/OpenFOAM/${USER}-4.1 $HOME/sw/Containers/openfoam4-paraview50_latest.sif

Once inside the shell:
mkdir -p $FOAM_RUN
source /opt/openfoam4/etc/bashrc

cd $FOAM_RUN
cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
cd pitzDaily
blockMesh
simpleFoam
paraFoam


Launcher script to run a test job

No Format
cat $HOME/OpenFOAM/${USER}-4.1/openfoamLauncher4.sh 
>>>>>>>>>>>>>>>>
#!/bin/bash
source /opt/openfoam4/etc/bashrc
mkdir -p $FOAM_RUN
cd $FOAM_RUN
cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
cd pitzDaily
blockMesh
simpleFoam
paraFoam

chmod +x openfoamLauncher4.sh

pbs script


Ref: https://hub.docker.com/r/openfoam/openfoam4-paraview50
https://openfoam.org/download/4-1-linux/

...