Join CFD Community
Do you want to write your own CFD solver, but you don't know how to get started? Have you tried writing your own solver before and felt lost in the process?
This is exactly how I felt when I started writing my first CFD solver, and I remember the struggle. There were no good resources available, and CFD textbooks rarely make an effort to talk about the computational side of Computational Fluid Dynamics
I want to spare you the frustration, and so I have written down all you need to know in one place, from theory to final working code. It is all here in this tightly packed 90-page eBook.
If you give me a weekend of your time, I can teach you what took me years to master. If that sounds like a fair deal, leave your email address below and I'll send it straight into your inbox!
Sign up today
If you sign-up for my newletter, you will receive my eBook Write your first CFD solver - From theory to implemented CFD solver in less than a weekend directly into your inbox.

What others have said about the book
What's inside the book?
This book includes the following:
- A chapter on how to set up a suitable programming environment on either Windows, Linux, or macOS.
- A review of the required theory to write a CFD solver (governing equations and numerical schemes, in particular, modern high-resolution schemes to capture shock waves with great accuracy).
- A full implementation of the theory into code where each line is discussed in one chapter to explain precisely how the equations from the theory chapter are implemented into code.
- A chapter on how to compile the code on different operating systems, how to run the code, as well as discussing the implemented schemes and how well they compare against the exact solution.
- A chapter with ideas and instructions for implementing additional schemes and methods to improve further your understanding of how to write a CFD solver.
This eBook doesn't assume any prior knowledge on your side. It is designed to be self-contained so you can follow along, regardless of your background. Anything that isn't important right now is left out to keep the length to a minimum. This allows us to concentrate on the essentials and, indeed, write a solver over the span of a weekend.
We will first develop a framework that we can use to develop any kind of CFD solver. Every CFD solver under the sun follows this framework, and once you understand it, you know which steps to take to write a simple 1D solver to a complex 3D one.
The programming language chosen is C++ because that is the language of CFD solvers. You will find other example codes online showing how to write CFD solvers in Python, Matlab, and similar languages, but if you are serious about CFD, you need to know C++.
If you have never used C++ before, don't worry; the first chapter of the ebook sets you up with everything you need to understand the basics of C++ and how to compile it on your machine, regardless of your operating system. The code does not use any fancy C++ techniques and is designed to be as simple as possible to read.
Why should I trust you?
Well, I have written quite a few solvers over the years! I have implemented solvers for incompressible and compressible flows, laminar and turbulent flows, structured and unstructured grids, explicit and implicit time discretisations, parallel computing (both CPU-based and GPU-based), classical Navier-Stokes and particle-based solvers (Lattice Boltzmann, Molecular Dynamics, Direct Simulation Monte Carlo), finite difference, finite volume, and finite element discretisation, and the list goes on.
I worked as a software engineer for the German Aerospace Center on their commercial CFD solver, and I now work as a senior lecturer in CFD at Cranfield University.
Why should I care?
I believe that if you can set up a CFD simulation and solve it, you can tackle the challenges of today we face in engineering and science. But if you can write your own solver, you can devise new algorithms and implement new models to tackle the unsolved challenges of tomorrow!
We need more capable CFD engineers and scientists, and I hope this ebook will get you started towards CFD mastery! Are you ready to be part of our CFD community? Then, leave your name and email address below.