This page has information on running OpenFoam interactively as well as in batch mode on the FASRC Cluster (currently Odyssey). To learn basics of modeling with OpenFoam, please visit:
Openfoam via singularity container
We have built a singularity container with freecad, gmsh, openfoam and paraview. The container can be used on odyssey (in both the interactive and batch modes) or on a local linux machine with singularity installed.
Connect to odyssey via OnDemand (https://www.rc.fas.harvard.edu/resources/documentation/virtual-desktop/). Open a terminal and create a directory for OpenFoam:
Run the openFoam container with shell option to obtain a command shell.
Once inside shell, you should be able to run a simple test job as follows:
Running in batch
To run openfoam in batch, you can create a bash script with openfoam setup, meshing and run commands in a script (say scr_pitzDaily) and invoke the script via singularity in a slurm submit script (say openfoam_pitzDaily.sh). The script "scr_pitzDaily" might look like:
The submit script "openfoam_pitzDaily.sh" might look like:
Modeling on your own desktop/laptop
The singularity image on Odyssey (freecad-OpenFoam.simg) can be downloaded to your desktop/laptop and run in a flavor of Linux (eg: ubuntu) with singularity installed. For this you need:
- Either a linux desktop/laptop or linux installed in a virtualized environment (such as virtualbox). For help with this, just use a modern search engine (google, bing, etc.) and look for "ubuntu installation in virtualbox" etc. There is plenty of documentation available on this.
- Install singularity. Visit the following and look under documentation for users:
- Once you have singularity installed, the commands are identical to those under "OpenFoam via singularity – running interactively" described above.