The OpenFOAM Technology Primer

When we started working with OpenFOAM, back in 2008, there was very little information available online. Things have changed in the meantime, but we still figured it would be useful for others as well as challenging and interesting for us to write a book about this great code. The book “The OpenFOAM Technology Primer” is a starting point for anyone interested in OpenFOAM and it additionally provides enough information on how to program using the OpenFOAM as a development framework for Computational Fluid Dynamics (CFD). This is what we came up with.

The OpenFOAM Technology Primer comes with example source code and simulation cases. We have tried our best to provide information on both the software design and numerical method background required when programming in OpenFOAM. The example code and simulation cases we have prepared ourselves, which makes the book a standalone source of information, and not a copy or reinterpretation of any other material available online. We hope the book will end up being at least as useful to others as much as it was fun for us to write. If you happen to have comments or complaints, feel free drop us an email, open a thread on the forum or comment on the FAQ page. We will be happy to receive any feedback that makes the book, the accompanying code, or the example cases better.

Example Cases

The example cases used throughout The OpenFOAM Technology Primer are publicly available as a git repository. It is hosted on github as well as on bitbucket and we try to keep it as up to date as it is possible.


Example Code

The example code, including all libraries, solvers and utilities is publicly available as a git repository. It is hosted on github as well as on bitbucket and we try to keep it as up to date as it is possible.


Get a copy

If you’d like get a copy of The OpenFOAM Technology Primer, get the paperback version directly from this site. The book can be payed via amazon payments, no need to create an additional account.



First of all, we have to thank our doctoral thesis supervisors to provide us with the opportunity to undertake this endeavour, which are namely Prof. Bettar Ould el Moctar of the University of Duisburg-Essen, Prof. Dieter Bothe of the University of Darmstadt and Prof. David P. Schmidt, University of Massachusetts, Amherst.

Of course, this book would not have been possible without our reviewers. Most notably Bernhard Gschaider, Michael Wild, Fiorenzo Ambrosino and Maija Benitz. Your insights, suggestions and suggested changes were unbelievable. In addition to the official reviewers, we have asked various friends and colleagues to proof read different chapters. Thanks to Udo Lantermann, Matthias Tenzer, Andreas Peters and Irenäus Wlokas for going through the process of reading the first drafts of various chapters and proposing a great amount of changes.

Table of Contents

1. Computational Fluid Dynamics in OpenFOAM
2. Geometry Definition, Meshing and Mesh Conversion
3. OpenFOAM Case Setup
4. Post-Processing, Visualization and Data Sampling
5. Design Overview of the OpenFOAM Library
6. Productive Programming in OpenFOAM
7. Turbulence Modelling
8. Writing Pre- and Post-Processing Applications
9. Solver Customization
10. Boundary Conditions
11. Transport Models
12. Function Objects
13. Dynamic Mesh
14. Outlook