OpenFOAM in containers

There are many OpenFOAM images for all sorts of containerization systems out there. However, my images, which are hosted at ghcr.io, are specifically built to participate in MPI communications:

You can fire up a quick local container with the following Shell command (Assuming Docker is installed - see get.docker.com):

docker run  \
    --rm `# Disposable container, destroyed as soon as you leave it.` \
    -it `# Interactive with a tty so you can run a shell` \
    --name openfoam `# Container name` \
    ghcr.io/foamscience/jammy-openfoam:v2206 `# Docker image` \
    bash `# Command to run in the container, default: SSH server`

This command will throw you into a container which has OpenFOAM v2206 installed, acting as the openfoam user which is all set to run OpenFOAM simulations. The default working directory you start with is ~/data.

Refer to Docker CLI cheatsheet if it’s your first time interacting with Docker.


At this point; I assume you have easy access to an OpenFOAM installation.

  1. Register to the Workshop’s event
  2. Set up a Text Editor or an IDE for OpenFOAM development.
  3. Have a working OpenFOAM installation.
  4. Clone our unit-testing framework and make sure it works for you.
  5. Solve a demo exercise so you get familiarized with the typical workflow during the hands-on sessions (You’ll need no knowledge from the workshop for this).