Material for OpenFOAM course, LSTM, Erlangen, 7-10 October 2025.
This course is intended for OpenFOAM beginners, to provide a broad picture of the capabilty of the code. It is planned to be accessible for CFD beginners as well, with the important caveat that they should consider it as a very preliminary introduction to a complex subject.
- Tuesday, Oct 7, 9-13: Introduction, Methods, Code, Interface to OpenFOAM, simple meshing, installation, first case.
- Wednesday, Oct 8, 9-13: Incompressible flow. postprocessing, statistics, running cases on a cluster, including CPU and GPU version, profiling.
- Thursday, Oct 9-13: Including more complex physics: temperature, free surfaces, and particles.
- Friday, Oct 10: discussions and some particular cases.
Suggested exercises are often intended as food for thoughts for CFD beginners in general, and are totally optional.
-
A laptop with a Linux environtment. If you do not have experience with Linux, do not worry: I will provide an introducion that covers what is required for this tutorial. The best way to follow step by step is using a virtual machine (such as VMware of VirtualBox), with the lastest Ubuntu distrubution installed. A virtual machine works as a regular program; it requires the image of the operative system that you would use like emulate, which is the same file that you download to install. In the setup of the virtual machine, please allocate at least 50 GB of storage, which is on the safe side, and 2 CPUs, which is the minimum to test parallel execution. Dual booting or a change of operative system is not required nor advised to follow the course.
-
If you are already familiary with Linux, you are free to use what you are confortable with.
-
You can also try to use the Windows Subsystem for Linux (WSL), if you are so inclined. It creates a Linux environment in Windows, which you can directly without virtual machine, but I will not provide support for it.
-
In the Linux enviroment that you choose, install the OpenFOAM13 package, following the at least the first steps of the installation instructions:
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt update
sudo apt -y install openfoam13
I will comment the section "User configuration" of the installation instructions in my introduction. If you are more experienced you can compile it instead of installing as a standard package.
-
Notes.md contains a set of instructions and the case studies. Each case study is included without data but as it is after the instructions have been followed, e.g. addining new post-processing operations. It is then recommended to reproduce the instruction in a location different than this repository, and use it for reference. The paths may differ depending on OF installation.
-
Tutorials are intended to illustrate some of the capabilities of the code; requirements to assure simulations yield realistic results, such as those on resolution, domain size, and average time, are typically not met.
-
There is already a copious amount of material available online, sometimes with outdated information on previous version, sometimes referring to alternative OpenFOAM distributions. Although focusing on one distribution is clearly helpful as a beginner, I think the best approach is just being open to change distribution when convinient. Among possible sources that I can recommend:
- Everything done by Prof. Håkan Nilsson, but specifically the material of the course CFD with OpenSource Software.
- The material created by ESI (which is now part of Keysight), which is directly maintaining this distribution, for instance the "3 weeks" series.
- The free material of various consultancies, for instance CFD Direct and Wolf dynamics, which is a spin-off of the University of Genoa (a reasonble portion of their material is available).
- There are text books that refer directly to OpenFOAM, for instance: The Finite Volume Method in Computational Fluid Dynamics, 2016, Moukalled, Mangani, Darwish, and Notes on Computational Fluid Dynamics: General Principles, 2022, Greenshields, Weller.
-
The material of a previous tutorial I held is here (it uses OpenFOAM7, it does not contains anything particulary original).
-
The examples in Step 3 have been prepare as the preliminary step of a research effort on buoyant jets, which was carried out with Prof. A. Abbà, D. Bindoni, and F. Esposito (Polimi, DAER). Their consent to share it is greatly appreciated.