00_ofspIntro
Important
Visit https://aerosand.cc for the latest updates.
0. Preface
This series is designed to help readers connect the two sections of “CFD Fundamentals” and “OpenFOAM Introductory Practice”.
Warning
It is recommended to learn the basics of computational fluid mechanics and the finite volume method before starting this series.
1. Introduction
What is OpenFOAM? According to the explanation from Wikipedia:
OpenFOAM (for “Open-source Field Operation And Manipulation”) is a C++ toolbox for the development of customized numerical solvers, and pre-/post-processing utilities for the solution of continuum mechanics problems, most prominently including computational fluid dynamics (CFD).
Therefore, OpenFOAM can be used to build solver applications—implemented in C++—for theories such as computational fluid dynamics (CFD).
This series draws inspiration from, is encouraged by, or is informed by a substantial body of open-source code, literature, and books. Before proceeding, it is essential to express sincere gratitude and respect to these authors. The following is an incomplete list.
- The Finite Volume Method in Computational Fluid Dynamics: An Advanced Introduction with OpenFOAM® and Matlab
- https://github.com/UnnamedMoose/BasicOpenFOAMProgrammingTutorials
- https://www.topcfd.cn/simulation/solve/openfoam/openfoam-program/
- https://www.tfd.chalmers.se/~hani/kurser/OS_CFD/
- https://github.com/ParticulateFlow/OSCCAR-doc/blob/master/openFoamUserManual_PFM.pdf
- https://www.youtube.com/watch?v=KB9HhggUi_E&ab_channel=UCLOpenFOAMWorkshop
- http://dyfluid.com/#
- https://journal.openfoam.com/index.php/ofj/issue/archive
- https://www.wolfdynamics.com/our-services/training/openfoam-intro-training.html?id=50
- https://www.fluiddynamics.at/downloads/basic-openfoam-programming
2. Roadmap
We begin with the implementation of a simple C++ program to gain a basic understanding of compilation principles. Through the use of make, we gradually take control of our project and transition to exploring the wmake approach used in OpenFOAM. From there, we become familiar with the fundamental structure of OpenFOAM programs and progressively delve into the details of solver implementations within OpenFOAM.
Compilation Principles
- Compilation of C++ Programs
- Managing Program Compilation with
make - Managing Program Compilation with
wmake - Building OpenFOAM Applications
Data Interaction
- Input and Output
- Command-Line Arguments
Basic Classes
- Time
- Mesh
- Field
Solvers
- Development Libraries
- The First Solver
A First Look at Algorithms
- SIMPLE, PISO & PIMPLE Algorithms
- SIMPLE, PISO & PIMPLE Solvers
Note
Each section provides detailed code and operation explanations.
3. Environment and Tools
Given the operating environment of OpenFOAM, we choose to conduct development and discussions within a Linux system environment, based on OpenFOAM version 2406 (or later). For convenience, we will use Visual Studio Code (VS Code) as our development tool.
Caution
- The version evolution from openfoam.com involves relatively minor changes, and newer versions remain suitable for the discussions in this series.
- The version architecture from openfoam.org has undergone significant modifications and is therefore not recommended for beginners.
4. Recommendations
Tip
- It is recommended that readers actively follow along with the programming operations as they are discussed.
Support us
Tip
Hopefully, the sharing here can be helpful to you.
If you find this content helpful, your comments or donations would be greatly appreciated. Your support helps ensure the ongoing updates, corrections, refinements, and improvements to this and future series, ultimately benefiting new readers as well.
The information and message provided during donation will be displayed as an acknowledgment of your support.
Copyright @ 2026 Aerosand
- Course (text, images, etc.):CC BY-NC-SA 4.0
- Code derived from OpenFOAM:GPL v3
- Other code:MIT License
