OpenFOAM, a fluid/continuum simulation platform, is available at OCTOPUS.
Basic use
OpenFOAM commands can be used by reading the environment setting file with the following command.
$ module load BaseApp
$ module load OpenFOAM
Please execute it by batch job. An example job script is as follows. It is an example of executing damBreak($FOAM_TUTORIALS/multiphase/interFoam/laminar/damBreak) in tutorial.
First, copy the case directory and navigate into it.
$ cp -r $FOAM_TUTORIALS/multiphase/interFoam/laminar/damBreak/damBreak .
$ cd damBreak
Edit system/decomposeParDict in the case directory to specify the number of domain decompositions. In this example, set numberOfSubdomains to 512 and the method to scotch.
numberOfSubdomains 512;
method scotch;
Run the pre-processing steps on the front-end. Note that these commands can also be included in the job script.
$ cp 0.orig 0 -r
$ blockMesh
$ setFields
$ decomposePar
Create and submit the following job script.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#!/bin/bash #PBS -q OCT #PBS --group=[group name] #PBS -l elapstim_req=01:00:00 #PBS -b 2 #PBS -T intmpi module load BaseCPU module load BaseApp module load OpenFOAM/v2012 cd $PBS_O_WORKDIR blockMesh cp 0.orig 0 -r decomposePar mpirun ${NQSV_MPIOPTS} -np 512 interFoam -parallel |
Click here to learn how to submit a batch job.
qsub Command
After the job completes, you can reconstruct the simulation results by executing the following command.
$ reconstructPar
The simulation results can be viewed in ParaView.

