Lecture 1. Introduction
1.1 What is OpenFOAM?
OpenFOAM is a software framework (or toolbox) that you can use to develop Finite Volume Method based solvers for general continuum mechanics problems, mostly for fluid flow and heat transfer. It is a huge library of about 1.5 million lines of C++ code located in hundreds of files. You can use this toolbox to develop Computational Fluid Dynamics (CFD) solvers. You can use it to develop incompressible and compressible flow solvers for steady and unsteady problems. You can write solvers for single phase or multiphase flows, isothermal flows or flows with heat transfer, solvers with fixed or moving boundaries, maybe with fluid-structure interaction, maybe using rotating reference frames. You can develop solvers to simulate combustion, elasticity or electromagnetics. Once the toolbox with the necessary ingredients is there, the choices are endless, and you can do whatever you want with it. The following image taken from Chris Greenshield's OpenFOAM Open Dev 2018 talk shows the general structure of OpenFOAM.
"FOAM" stands for Field Operation And Manipulation. Thermofluidic transport problems involving fluid mechanics and heat transfer are called “field” problems because we are interested in calculating the velocity, pressure, density, temperature, concentration, etc. fields. The history of OpenFOAM goes back to late 1980s, to the research work of several graduate students in Prof. David Gosman's team at Imperial College, London, where it was being called just FOAM. Interestingly, today, Prof. Gosman has no relation with OpenFOAM, because he'd decided to walk on a different track, a commercial one, and founded CD-Adapco, the company that developed the popular CFD software STAR-CD and Star-CCM+, which are currently being developed and sold by Siemens.
The "Open" part of the name is due to the fact that, today OpenFOAM is a free and open source software (FOSS). It was released as such and started to be called OpenFOAM after 2004. It is free in two different senses,
- free as in "free food". You can download and install it on your computer freely, without paying any money.
- free as in "free speech". You are free to use it in various different ways, including
- the freedom to use it for any purpose,
- the freedom to change it to suit your needs,
- the freedom to share it with your friends and neighbors, and
- the freedom to share the changes you made.
People use OpenFOAM in mainly two different ways
- Some people use it as it is. It comes with more than 100 readily available solvers and many pre- and post-processing utilities. For example blockMesh,
and snappyHexMesh are two mesh generation tools that come with it. simpleFoam, sonicFoam or rhoReactingFoam are just three of the several
available built-in flow solvers.
Core developer and community members have developed all these different solvers and utilities for us. Different solvers have diffenrent capabilities and they have support for several different types mathematical models, such as material models, turbulence models, phase change models, combustion models, etc. If these solvers and models fit to our needs, we can use them as they are. We don’t need to know how to develop code in C++, the programming language used in OpenFOAM. We don't need to study any of the source files. Here, the freedom as in "free food" is an important motivation of using OpenFOAM. - Some people modify it. For them, the already available solvers and models, or some of their features are not enough. These users modify the existing source codes or write new ones and come up with new solvers or models. To do this, you need to have a solid understanding of the finite volume method, know how it is implemented in OpenFOAM and be comfortable in template-based C++ programming. This is usually done at universities or institutions for research purposes. Here, the freedom as in "free speech" is the main motivation of using OpenFOAM, the fact that the source code is accessible, and you are allowed to change it.
1.2 The OpenFOAM Ecosystem
When you buy a commercial CFD software, it probably comes with an initial training, together with version update rights and technical support for a certain period. You usually get access to a customer portal where you can find extra learning resources, and user forums for discussion and help. Being an open source software, OpenFOAM's ecosystem is somewhat different. It involves- Core code developers and distributor companies.
- Help forums and user generated documentation, mainly in the form of tutorials.
- Companies that offer training, engineering consulting, cloud computing, etc. services.
As of today, OpenFOAM is being developed and released by the following three different groups. The historical perspective of the current situation is a bit complicated. If you are interested in it, you can have a look at this or this.
The company OpenCFD,
which is today a part of the ESI Group, develops and distributes OpenFOAM since 2005. They currently hold
the OpenFOAM trademark. They release two versions each year, first in June and then in December. Their latest release as of this writing is 25.06, released on the 6th
month of year 2025. Their version numbering is based on the release date. Their next release will be 25.12, expected to come out on December of 2025. They started to
use this versioning scheme after year 2016, and before that the releases were like 1.0, 2.0, etc. In 2016, their version number suddenly jumped from 3.0 to 16.06,
possibly to differentiate themselves from the other distributors, that we will talk about below. If you find an old OpenFOAM tutorial on the net, which says that
it is based on a release 2.0, they are talking about an old OpenCFD release.
OpenCFD releases OpenFOAM under the GPLv3 license. Their source codes are kept here,
where it is called OpenFOAM-plus. Plus? Yes. Up to year 2016 they were calling it OpenFOAM+, but then they decided to drop the "plus". Like any other GPL licensed
open source software, you can download these source files, compile them, report bugs if you notice any, modify the codes if you want, share your modifications with the
developers to be included in the next release, or re-distribute them on your own, even maybe under a different name such as NextFOAM. Yes you can do that if you want.
The license allows that.
OpenCFD's OpenFOAM development efforts are governed by a steering committee and several technical committees. There, you can find people from automobile companies such
as Volkswagen or General Motors and people from academia. OpenCFD offers paid engineering consulting, training services.
The OpenFOAM
Foundation and the company behind it, CFD Direct, also develop and distribute OpenFOAM through their site openfoam.org
since 2014. The main figure behind this development is Dr. Henry Weller, who is considered by many as the creator of FOAM. He is still actively developing code
for OpenFOAM. He was one of the founders of the OpenCFD company in 2004, but then left it to found CFD Direct in 2014.
CFD Direct releases a new version each year. Their latest version, as of this writing, is 13, released in July 2025. Their source files are kept at GitHub and just like the case for OpenCFD, you can download these sources freely and do whatever you want with them as long as you do not violate the license.
To keep their development efforts sustainable, CFD Direct asks for the monetary support of their users through fund-raising activities under the OpenFOAM Foundation umbrella. Also they offer paid support, training and cloud computing services all over the world. Similar to OpenCFD's policy, the software is again free, but unfortunately training is not.
The above mentioned two groups seem to be the most active developers and distributors of OpenFOAM. But there is one more.
Prof.
Hrvoje Jasak of Zagreb University, who is one of the original developers of FOAM and the founder of Wikki Ltd., has been releasing OpenFOAM under the name
foam-extend since it was first open sourced in 2004. Its lastest version, as of this writing,
is 5.0 released in 2025. Here are their source files. You can
also get paid OpenFOAM training from Prof. Jasak.
User Community:
Like in any open source software project, the user community of OpenFOAM is quite special. Freedoms brought them together and they try to overcome the difficulties together. They got a high quality product freely and they feel the responsibility of giving back to the community, in one way or another. Helping each other becomes especially important when the official documentation is somewhat incomplete. They do this in various ways, such as by preparing tutorials, forming local user groups, preparing and sharing online course materials, answering questions in forums, or setting up wiki pages. Users can also report bugs that they encounter, correct these bugs if they can, or develop new solvers and utilities and share them with the core developers to be included in their upcoming releases.
Third Party Companies:
As OpenFOAM increased its popularity over the years and gained the respect of users, companies other than the core developers listed above were established to make money out of it. Today there are several small companies offering training, engineering consulting and cloud computing services. Examples are

- SimScale
- CFD Support
- ENGYS
- simFlow
- Silent Dynamics
- Rheologic
- DHCAE Tools
- TotalSim
- CFD+ Engineeering
- blueCAPE
- SimWorks
- AirShaper
- and many more...
1.3 Which OpenFOAM Should We Use?
It is hard to tell exactly what the differences in these different OpenFOAM releases developed by OpenCFD, CFD Direct and Wikki are. Their core part, coming from the "FOAM years", should be the same. Unfortunately they got separated and become more and more different with each version. Over the years, and especially after the separation of CFD Direct from OpenCFD in 2014, different code developers and communities added different features to their releases. Sometimes, these changes were major such as CFD Direct's introduction of the non-conformal coupling feature in their 10th release in year 2022 or the introduction of the concept of "modular solvers" in their 11th version in 2023.It is possible to see the changes made in the latest versions of OpenCFD's, CFD Direct's and Wikki's releases, here, here, and here. The details in these pages are not important for us at this point, but as you can see, different groups keep adding different features and capabilities to their codes. Looks like that some of the changes made in one branch can get the chance of being included in another in a future release. In Wikki's release 5.0 notes, there is a part titled as Main differentiators between foam-extend and OpenFOAM which says;
"A large number of features have been lost within the release of OpenFOAM since version 1.3, the code base has shrunk by more than 40%. While we understand the lack of technical ability of supporting advanced CFD features, we feel that existing features and specifically large-scale contributions should remain active and developed further. Below is a list of main features of foam-extend which are lacking, lost, deactivated or unusable in ESI releases: ..." (followed by a long list of such features)
Free and open source community is proud of their licenses, which allow and actually encourage the creation of branches and alternatives. If you are not happy with the code, just fork it, modify it and redistribute it. Alternatives are good, but it may lead to fragmentation, which by some, in different contexts, is considered to be a negativity.
So, which one should you choose today? The answer depends on what you want to do with OpenFOAM.
- If you are a student or a practicing engineer trying to learn the general principles of how to do CFD, and OpenFOAM is just a tool for you, most probably you’ll be using it "as it is" to solve rather simple problems with not that complicated physics. And for that purpose, you’ll most probably be using the built-in standard solvers, which I believe are pretty much the same in all branches. In that case, it does not matter much which one you pick. You just need to be careful in using community generated documentation and tutorials, and always check which release was used in preparing them in order not to get confused.
- If you are a graduate student or a researcher interested in a specific problem type, say multi-phase flows or turbomachinery, it is better to read the notes of recent releases of different distributions and see if there are new advancements in your field of interest. In this situation, most probably you'll be using OpenFOAM day and night, and you can also consider installing and using multiple distributions at the same time.
- If you are really serious about using OpenFOAM, really value it and maybe a bit concerned about its future, you may try to understand the business doing practices of different groups, how they value OpenFOAM, how they make money out of it, what their future plans about it are, etc., and consider all that information in making your choice. If you are new to the world of FOSS, at some point you will notice that software development is not only about computers or programming languages, but it is also about people and sociology.
1.4 Advantages and Disadvantages of Using OpenFOAM
In my opinion, here are the main advantages and disadvantages of using OpenFOAM.Advantages:
- No cost
- Open source
- Insufficient documentation
- Limited technical support (there is no unique official developer to ask for)
- Absence of a graphical user interface (GUI) and the steep initial learning curve
"... whether or not a high-tech product succeeds can be explained by the “9x Effect”. In a very small nutshell, the 9x effect says that a potential user of a new product will underweight by a factor of three the benefits of a new product, and overweight by the same factor the costs of giving up their current solution. Human beings evaluate new things relative to the status quo, and we are risk averse (we exaggerate the cost of a loss in our minds). So if a new product is to succeed, it better be nine times better than the current solution."
Many companies and practicing engineers are not interested in code development/modification at all. They do not have the time or the resources for that. OpenFOAM being open source is of no value for them. The steep learning curve, the absence of a GUI and poor documentation are headaches for them.
For researchers who develop code and do hard core CFD, having access to the source code is a must, and they value OpenFOAM mostly for that. When making a choice, they question how well-documented the source code is and how open it is for future development. OpenFOAM's code is praised for having good extensibility qualities, but its programmer’s guide is considered to be weak. Experienced code developers may find the programming paradigms used in it such as object-oriented programming, operator overloading or template meta-programming beautiful, but for the newcomers, these may make understanding the codes and going deep into them difficult. Researchers do not care much about having no GUI because they may actually think that working inside a terminal window is more productive. Research involves experimenting with new ideas, and with an open source code with insufficient documentation, researchers will have to experiment a lot. They consider it to be a part of the research process.
For me as a FOSS enthusiast and an academician,
- OpenFOAM being open source is just nice. I feel good about it. I believe that, for the advancement of science and technology, source codes and information in general should be shared. I am not saying that the OpenFOAM community is doing it perfectly, but they are trying. In my research and teaching activities I am using OpenFOAM both as it is, and also by modfying its source code.
- OpenFOAM's steep learning curve is not much of an issue for me because I have time to experiment and learn. But this may reduce the productivity of my students, especially if I cannot guide them properly. Incomplete user and developer documentation can be an important barrier for them.
- I am also very much interested in the technical documentation (not the user’s guide, but the technical guide). I want to know the technical details of how the software works in the background. What techniques are used, what are their details, what are their scientific references, how do alternative methods for a specific task compare. I feel that OpenFOAM is weak in that respect too.
- With the aim of being user friendly, CFD software are including more and more black box practices in their usage. For example, some of the new commercial CFD software releases are advertised to have single click, automated mesh generation or some come with AI support. These are not necessarily useful practices for an inexperienced student or engineer trying to learn how to do CFD correctly. In OpenFOAM, due to the lack of this user-friendliness, you are forced to dig deep a bit in every step of the solution, and although this takes time, it can also be a good learning experience. I see this as an advantage.
1.5 The Issue of Having No Graphical User Interface (GUI)
All commercial CFD software come with a GUI, like many other software we use, with windows, menus, buttons, check boxes, text entries, etc. In that GUI, they usually have built-in CAD capabilities for geometry creation or the software integrates seamlessly with full featured third party CAD software. The GUI is also used for mesh generation, setting up the problem parameters, boundary conditions and solver options, adjusting the material properties, monitoring the progress of the solution and post-processing the results. All of this sounds quite natural. But OpenFOAM is not your ordinary CFD software. With OpenFOAM we mostly work inside a terminal window (command line) editing text files, which can be a bit difficult and annoying at first.
The parts that require the most GUI support are drawing the problem geometry, generating the mesh and post-processing the results. Unless the problem geometry is too simple to be handled by the pre-processing utilities of OpenFOAM, you need to draw it using a third party CAD software. We have several alternatives here, some of them being free and open source ones (SALOME or FreeCAD). OpenFOAM comes with mesh generation utilities, but they do not have a GUI. Instead they are used from the command line. It is also possible to generate the mesh using a third party software (again we have free and open source alternatives such as Gmsh or SALOME). OpenFOAM comes with necessary mesh conversion utilities. For setting problem parameters, material properties, boundary conditions, solver settings, etc., we need to use text files and it is actually not as difficult as it sounds. And we of course need a GUI for post-processing. Paraview is the standard tool for this, but there are again alternatives such as VisIt.
OpenFOAM’s lack of GUI is considered to be a show stopper by many people. Several CFD enthusiasts and companies tried to come up with a solution for this. The ones listed below are some of the free choices, but they are generally considered to be primitive and not used frequently
- InsightCAE
- CfdOF
- VisualFOAM (web based)
- etc...
- SimScale (web based)
- HELYX-OS
- simFlow
- simulationHub
- MantiumFlow
- etc...
1.6 And What About Using Linux?
Almost all of my undergraduate students use Windows operating system on their personal computers. Some use macOS, but almost none use Linux. Many students not even heard of the Linux operating system. But like almost all FOSS, developed by scientists or engineers to be used by the scientific and engineering communities, OpenFOAM is also being developed and mostly used under Linux. Linux is its home. But today, it is possible to create a Linux like environment inside Windows or macOS to use OpenFOAM. Therefore, those who do not want to switch their operating system to a new one just for OpenFOAM do not need to do that. But at the end, they should be learning how to do things up to a certain extent in a new environment. I believe that this enforcement is not a downside but instead an advantage of using OpenFOAM. It gives you a chance to taste Linux and the command line. We will talk about these details in the next lecture.1.7 Are There Other Software Similar to OpenFOAM?
There are several free and open source CFD software. Most of these are developed in academia or in research institutions with specific research intentions, not as general purpose solvers. Don’t get this wrong, they do what they are intended to do nicely. They may solve certain types of problems faster and/or more accurate than OpenFOAM, or some of them may solve problems that OpenFOAM cannot. Some examples are
- SU2 (Very popular in aerodynamics)
- Nektar++ (Spectral element solver. Popular for turbulence research)
- NEK5000 (Another spectral element solver)
- COOLFluiD (It is also a framework to develop solvers, similar to OpenFOAM)
- Palabos (Uses the Lattice Boltzmann Method)
- FLUIDITY (Specializes in multiphase flows)
- Basilisk (Uses adaptive Carteisan meshes)
- FEniCS (Uses the Finite Element Method. Has a Python interface)
- and many more...