Skip to main content

There are two variants of OpenFOAM, one from openfoam.org and one from openfoam.com. Currently, we only have the openfoam.org version installed.

OpenFOAM is installed as a software container, which means you’ll need to run it a little differently than other software packages. After loading the software into your path as instructed above, you should precede any OpenFOAM commands with openfoam. For example, to run the blockMesh command, you’d run:

openfoam blockMesh

Batch/Non-interactive Jobs

As with most BisonNet jobs, the majority will be run non-interactively. To submit a batch (non-interactive) job, create a job script as described on the Job Management page. In your job script, add lines like the following to load the OpenFOAM software into your path and run the desired OpenFOAM command:

module load openfoam.org
openfoam blockMesh

Once you’ve created your job script, you can submit the job using sbatch, as described on the Job Management page. Note that other versions of OpenFOAM may be available. You can view available versions using the module avail command to see what versions you can use.

Interactive Jobs

Additionally, if you want to run OpenFOAM interactively, you can run the openfoam command to start the OpenFOAM container, and then run your OpenFOAM commands at the subsequent prompt. E.g.

[username@bisonnet-hpc ~]$ srun -N 1 -n 4 -p short --pty /bin/bash
[username@bn-hpc-10 ~]$ module load openfoam.org
[username@bn-hpc-10 ~]$ openfoam
OpenFOAM:~$ blockMesh