The best way to learn CFD from scratch requires good resources to use for studying all the different aspects that make up a CFD simulation. Be it books, online resources, or even just the tools we use to perform CFD calculations. This is a list of my favourite resources that I have used in the past and present to master CFD and I have organised it into different sections so you can quickly go to sections that you have a particular interest in. This list is not static and will be updated from time to time as new resources become available.
In this Article
Introduction
If you are considering taking up Computational Fluid Dynamics (CFD), be it for an engineering problem you have to solve as part of your studies or some quick simulations you want to run as part of an industrial project, let me congratulate you on your decision! CFD is a fascinating area to get stuck in, and it is full of wonderful and curious problems that you will come across on your journey.
In 2008, I attended lectures on structural mechanics, and one of the images we looked at was the stress distribution around a circular cutout within a plate. The stress distribution lines looked an awful lot like streamlines around a circular cylinder, and while I can’t say that I am particularly moved seeing streamlines around cylinders these days back then, for some reason, it captivated me and ever since I went down the path of CFD, never looking back.
During that lecture, I decided to pick up CFD as my focus of studies and, from that day, started to consume whatever CFD literature I could get my hand on (and there wasn’t a lot in our university library on it). But I kept buying books and reading what I could find. I picked up ANSYS CFX and then later ANSYS Fluent as my first solvers to get some experience, and later, I expanded to other software. Eventually, I started writing my own solvers, and to this day, I repeat that cycle (read, experiment, write code).
Most people interested in picking up CFD for the first time probably have no ambitions to write their own solver immediately (I certainly wasn’t planning on writing my own solver back in 2008). However, one core principle in CFD differs from most other engineering disciplines; all CFD problems are non-linear, causing beautifully complex flow patterns to emerge (commonly referred to as turbulence). A small subset of flows exists where turbulence plays no role (which is referred to as laminar flow), but engineering applications are governed by turbulence.
As a famous saying in the circles of Fluid Dynamicists goes, God created the world in six days, and on the seventh, he created turbulence. Or take the 1932 Nobel prize winner Werner Heisenberg, who said: When I meet God, I am going to ask him two questions: Why relativity? And why turbulence? I really believe he will have an answer for the first.
Suppose you want to develop a true intuition for how different numerical schemes and algorithms influence your solution. In that case, I can tell you from experience that programming, even the simplest of test cases, will give you a much better understanding and intuition of what different schemes and algorithms do to your solution than anyone following a YouTube video and learning to press the right buttons in a commercial CFD solver.
There is a reason why I have picked the slogan learn through coding for this website; it embodies the importance that code plays in developing our understanding of how CFD works. Adjusting parameters and quickly changing the mesh or boundary conditions will help you to build up that intuition that you can translate directly to more complex and real cases. So if you are serious about CFD, you’ll have to write some code, but fear not, this is exactly why I have created this website to show you how to code CFD, and I update it weekly with new articles.
In this remaining article, I want to look at some of my favourite resources for getting started with CFD. Even if you are already a more seasoned CFD user, there are some gems for you here as well that you will learn to appreciate over time. The remaining article will provide you with resources I have found useful for getting started with CFD, be it literature, software, or any other form of resource that may be of use to you.
Resources to get started with CFD
In this section, I have listed my favourite books and places on the internet that I have found particularly useful when learning CFD. It focuses mainly on the literature, as this is still the best place to start learning CFD, and I have structured it into different subsections to help you navigate through it. That means some resources may pop up twice, but I’ll explain why if that happens.
Books
There are lots of good books on CFD. In my experience, though, no single book does a good job of explaining everything there is to know (and likely never will be). So, I have categorised my favourite books to show you which books I think are a great place to start if you are interested in a specific topic with CFD.
General introduction to CFD
An Introduction to Computational Fluid Dynamics: The Finite Volume Method
Authors: H. Versteeg, W. Malalasekera
This is my all-time favourite recommendation for anyone starting with CFD. It gives a gentle introduction to CFD and all of its equations, numerical schemes, and algorithms without overwhelming you.
It has probably the best description of turbulence, both from a physical point of view and how to model it with various levels of complexities, and they manage to get it on paper in about 50 pages or so. You can read entire books on this phenomenon and understand less than from reading the chapter on turbulence in this book.
While it does cover the essentials, there is an attempt to bridge the gap between simplified theory and how things are done in general-purpose CFD solvers (i.e. commercial solvers). In my view, these chapters are not exactly the strong points of this book, but at least they provide you with some perspective.
While the first few chapters are essentially a rip-off from Patankar’s 1980 book, it is still the most complete, easiest to understand, and most up-to-date book that you can get your hands on. If you only ever invest in a single book on CFD, this should be it.
The Finite Volume Method in Computational Fluid Dynamics: An Advanced Introduction with OpenFOAM® and Matlab
Authors: F. Moukalled, L. Mangani, M. Darwish
This would be my second-highest-rated book on this list. I prefer using this book over Versteeg and Malalasekera’s book listed above as it is more complete and goes into much more detail. When you are implementing something, this is what you need. But if you are starting out, Versteeg and Malalasekera strike a much better balance of not overwhelming you.
I would put it this way: start with Versteeg and Malalasekera’s book, and after you have finished with that, consider consulting this book if you still have questions (you probably will have!).
What I think makes this book really strong is that it does not try to simplify the theory overly; what you see in this book is what is implemented in open-source and commercial CFD solvers alike!
After you have read this book, you will have all the knowledge it takes to write your own CFD solver, which means you will have built up an appreciation for which schemes and algorithms will perform best for a given situation. As alluded to above, even if you have no interest in coding your own Navier-Stokes solver, you will still need that knowledge to make the right choices for your own CFD problems.
I had long put off consulting this book because of OpenFOAM in the title. Before using OpenFOAM, I thought this book was an OpenFOAM manual, but that’s not true. It simply reviews the schemes and algorithms implemented into OpenFOAM. Still, these are implemented into any other serious solver, and this knowledge will hold you in good stead regardless of the solver you are using.
Turbulence (modelling and physics)
A First Course in Turbulence
Authors: H. Tennekes
It’s widely regarded as the textbook on the physics of turbulence, and it’s a classic. I don’t think I can talk about book recommendations for turbulent flows without including this book.
The title aptly summarises what it is: the first steps with turbulence. It is an old book, first published when CFD was still in its infancy. At the time of its publication, we didn’t understand how to model turbulence with CFD, so this book only describes the physics of turbulence rather than how to model it. But as a crash course, it works just fine.
What I like about this book is its compactness. Other books on turbulence are often twice as long, and Tennekes manages to balance necessary equations and descriptions well. It helps to have a firm mathematical background, but that is just the nature of turbulence, and you will find that in any textbook listed in this section.
Turbulence: An Introduction for Scientists and Engineers
Authors: P. Davidson
Regarding the physics of turbulence, we have two established textbooks that provide an up-to-date introduction: Turbulent Flows by Pope and Turbulence by Davidson. If you want to understand turbulence, pick up Davidson’s book, but if you have a death wish, the book of Pope will do as well.
I read Pope’s book, cover to cover, mostly sitting at the top front seat of a London double-decker bus, on line 38, during my 1-hour commute in the morning to Imperial College. I didn’t understand much, but that was the sort of literature we had to read (given Pope was an Imperial Alumni).
Pope’s book is full of equations and integrals but few explanations. If you are a pro in turbulence, you will appreciate the dense information collection, but if you just want a gentle introduction, do yourself a favour and pick up Davidson’s or Tennekes’ book. These are much easier to understand, and they focus on explanations rather than integrals (although we can’t avoid them).
Davidon is also not afraid to pick up controversial topics and discuss them in his book, e.g., does 2D turbulence exist, and can we model it as such? You won’t find controversial topics in many books; seeing how he discusses them is great. It is well worth your time if you are getting started with turbulence.
Turbulence Modelling for CFD
Authors: D. C. Wilcox
Wilcox is an interesting character; it doesn’t matter where you look, Wilcox is always portrayed as the inventor of the k-\omega RANS turbulence model, though he very openly writes in his book that Kolmogorov derived it first in 1942, but it received little attention due to a lack of computational resources to do anything with it.
In 1970, Saffman derived the k-\omega independently without knowledge of Kolmogorov’s work, and only after that did Wilcox join the development of the model. Two people before him derived the model, yet he is receiving all the praise (granted, he actively developed the model from then onwards).
His book helped popularise the model and is a fine example of how to write a book at a level accessible to students yet covering all essential parts with sufficient details to give a holistic picture of how to model turbulence.
Along the way, Wilcox reviews important aspects of turbulence itself when they are important for the discussion. It gives you an excellent introduction to the modelling of turbulence (though limited to RANS), the only downside is that the book is pretty difficult to obtain.
Statistical Turbulence Modelling For Fluid Dynamics – Demystified: An Introductory Text For Graduate Engineering Students
Authors: M. Leschziner
If you were unlucky and could not get your hands on a copy of Wilcox’s book, fear not. The next best thing you can get is the book by Leschziner.
It is a great book in its own right and fills a gap in the literature where we haven’t had a book for a long time. Given the popularity of RANS modelling, you would think that someone thought of writing a book about just that, yet it is the first usable book I have come across that exclusively focuses on RANS modelling.
Starting with some good derivations of basic equations that are later used in the RANS models, this book focuses on demystifying RANS turbulence modelling and features a much higher text(explanations)-to-equation ratio than other books.
If you want to understand how to derive the various RANS models, how the different terms are obtained, and their meanings, then try this book. It is an excellent foundation for getting into RANS modelling.
An Introduction to Computational Fluid Dynamics: The Finite Volume Method
Authors: H. Versteeg, W. Malalasekera
Ah, Versteeg and Malalasekera, I can’t hide my love for their turbulence chapter. I mentioned it above when recommending it as a general textbook for CFD, but it works just as well as an introduction to turbulence in terms of its physics and modelling.
It covers pretty much all the important RANS models and essential background information you need to understand them, but it also talks about scale-resolving turbulence models (Large Eddy Simulations (LES) and Direct Numerical Simulations (DNS)).
As a bonus, they also discuss boundary conditions, which, if you are just using a commercial CFD solver, you will probably never have to think about. However, when you start to use a solver like OpenFOAM, you will appreciate the details they give in their book on how to set the right boundary conditions. Excellent book!
Numerical discretisation
Fundamentals of Engineering Numerical Analysis
Authors: P. Moin
The bread and butter of any CFD solver is the discretisation used to solve a given partial differential equation, e.g. the Navier-Stokes equations. This usually creates two problems we have to solve: 1) How to transform the Navier-Stokes equations into a form that can be solved (especially for incompressible flows), and 2) Which discretisation should be used to solve the partial differential equation(s).
The book by Moin (one of the greats in CFD) introduces the second problem, i.e., how to discretise your partial differential equations. Regarding discretisation, different approximations are available, namely the finite difference, finite volume, and finite element methods.
This book focuses on the (now outdated) finite difference method. I say outdated, as commercial CFD solvers these days use the finite volume methods exclusively (with a few exceptions using the finite element method). However, suppose you are a complete beginner to numerical discretisation. In that case, you need to start somewhere, and from an educational point of view, there is no better place to start than with the finite difference method.
If you ignore the last chapter of the Fourier series, this book only has about 150 pages, giving you a quick introduction to essential concepts used in CFD. The knowledge gained in this book is not just for educational purposes; many of the classical concepts developed for the finite difference method also hold for the finite volume and finite element methods (e.g. time discretisations, numerical schemes), and they can (and have been) translated to work in this frameworks as well.
If you are looking for a quick introduction, this book is for you.
Computational Fluid Dynamics for Engineers
Authors: K. A. Hoffmann, S. T. Chiang
Ah, this brings back memories. It was my first book on numerical modelling, and among our CFD study group, this was regarded as the bible for CFD engineers (and if I recall correctly, we called it the blue bibble, but even if we didn’t, I suggest that we do from now on!).
I’m always saying there is no better way to learn CFD than by implementing it yourself and then playing around with the parameters to see how they influence the simulation. Hoffmann and Chiang do exactly that in their book, i.e., they derive equations in a form that can be easily implemented, but they also provide you with results from some of their numerical experimentation (great for validation if you want to follow along).
The book also focuses on numerical discretisations using the finite difference method, although there is also the pink and green bible (or volumes 2 and 3) where the finite volume method is picked up. Still, the book by Versteeg, Malalasekera, and Moukalled et al. listed above will perhaps give you a more complete and up-to-date introduction to the finite volume method.
However, this book gives a great introduction to how CFD was initially developed, and I have seen the schemes derived from it implemented in commercial codes that are still around.
Similar to the book of Moin, it is a great introduction and well worth your time. It just comes with more examples and more content than the book of Moin. Like the Wilcox book, though, it may be difficult to get your hands on this book, but if you can, give it a try.
Numerical Computation of Internal & External Flows
Authors: C. Hirsch
I was having issues with this book for a long time. I still do, for certain parts of the book, but I have come around to appreciating it for what it is. I certainly wouldn’t recommend this book to a novice, for it assumes, perhaps, too much of a background in CFD already, even though it reviews everything from the ground up. However, suppose you have already gone through the book of Moin or Hoffmann and Chiang (or something similar). This book will give you an excellent transition from classical CFD theory to methods, schemes and algorithms used nowadays in commercial CFD solvers.
It does cover the finite difference and finite volume method in depth, but it also provides an introduction to the finite element method, so perhaps, in that respect, it is the most complete book out there.
What I like about this book is its completeness. The topics are covered in great depth. The last chapters also include some helpful walkthroughs for implementing the incompressible and compressible Navier-Stokes equations, which is rather useful, especially if you want to go beyond simple model equations that mimic the behaviour of the Navier-Stokes equation and implement the real deal.
There is also a second volume to this book, though I have found the first to be more useful than the second. Also, it does not seem to exist anymore, so it may equally be difficult to find (the first volume was re-released by a different publisher, which is easy to find).
Review of basic mathematical concepts for CFD
Computational Fluid Dynamics: The Basics with Applications
Authors: J. D. Anderson
I may have created this subsection (review of basic mathematical concepts for CFD) just so that I can recommend this book. For me (and others may reasonably have different opinions), J. D. Anderson is one the greats in the field, maybe not in CFD, but in Fluid Mechanics in general and related disciplines (Aerodynamics and compressible flows, in particular).
His writing is probably the best in terms of accessibility, and there is a reason that all of his books are selling so well, given how easy it is to read his text and explanations.
Anderson does a good job of deriving the basic equations in fluid mechanics and provides enough mathematical concepts to follow the derivations easily. If you want to brush up on some basics in mathematics, this (or any other book by Anderson) is a great place to start.
The Finite Volume Method in Computational Fluid Dynamics: An Advanced Introduction with OpenFOAM® and Matlab
Authors: F. Moukalled, L. Mangani, M. Darwish
I have listed the book by Moukalled et al. again because I think they do a good job reviewing essential tensor calculus rules. These rules aren’t complicated but need to be memorised, after which following the derivation of the Navier-Stokes equations isn’t that hard.
The mathematical background chapter in this book is also rather complete and lengthy enough to strike a good balance between the details provided and the explanations given. Together with Anderson’s book, both sources should give you sufficient information on the mathematics required to follow along with CFD derivations.
Programming CFD solvers
Computational Fluid Dynamics: Principles and Applications
Authors: J. Blazek
I picked this book up rather late (after my PhD), but when I did, I was immediately hooked by its clarity. The author makes an excellent effort to explain how numerical schemes are derived and then how to implement them into code.
It always provides two separate discussions of how to implement something for structured and unstructured grids. Thus, it may be seen as a more advanced book, but once you feel ready to make the transition to unstructured grids, this book is an excellent place to start.
It comes with a CD that contains some good sample programs that you can use for self-study purposes if you want to achieve something similar. My only downside of this book is that it focuses exclusively on compressible flows. But if that is not a problem for you, then this is the book you want to go through.
Computational Fluid Dynamics: The Basics with Applications
Authors: J. D. Anderson
Ah, Anderson, you did it again, sneaking into my list without me realising. When I originally made this list, I didn’t consider this book, but then I was reminded of the excellent discussions it provides on implementing the governing equations of fluid mechanics into code.
An entire chapter is dedicated to showing how to adapt the governing equations to a given problem so that it can be solved numerically with a given scheme. Anderson provides intermediate results that you can use to check that your solution is marching in the right direction. While he does focus primarily on compressible flows, there is one subsection on incompressible flows as well.
I would rank it similar to the book of Hoffmann and Chiang, which provides numerical experiments; you may not implement a CFD solver in this way, but you can learn an awful lot from the experimentation provided with the code in this book.
Incompressible flows
Computational Methods for Fluid Dynamics
Authors: J. H. Ferziger, M. Peric, R. L. Street
For a long time, I disliked this book a lot. In academia, it is seen as advantageous to have a textbook published in your field, and you can use that for promotional cases if you want to become a full professor. There are many examples out there where people have written books to get promoted but not to educate the reader, and for a long time, this is how I viewed this textbook.
There was nothing really wrong with it, it was just not very good at any of the discussions that it did provide. There was always another book I could point to that was better at discussing any of the points they were making in this book.
But then came the fourth edition, and they added Street as an author. Thankfully, Street really earned his spot as an author, as he took some of the weaker sections and transformed them into masterpieces, in my view. They are full of details and insights I haven’t seen anywhere else, and you would only expect from someone who has dedicated their professional life to understanding these topics insight-out.
The discussion about the differences between the fractional-step and SIMPLE methods, in particular, stuck with me, as I had my questions about how both of these are different, and Street provides an answer for it as clearly as day. Surprisingly, they are pretty much the same, but I doubt many will have picked up on that.
So, if you want to learn how to transform the Navier-Stokes equations for incompressible flows, this book really does a great job of providing an in-depth discussion by someone who understands the topic like the back of his hand.
Compressible flows
Numerical Methods for Conservation Laws
Authors: R. J. LeVeque
If you look at the (historic) development of compressible and incompressible solvers, you’ll find quite a difference in how these problems are approached, and for good reasons. This means that if you pick up the book of Versteeg and Malalsekera, which focuses pretty much exclusively on incompressible flows, then comparing the text, methods, and schemes presented in a book on compressible flows can seem disconnected.
LeVeque’s book focuses on compressible flows and provides an excellent introduction to the problem. He focuses on what is essential to treating compressible flows, where shockwaves and, thus, discontinuous signals are the norm.
Discontinuities are difficult to capture mathematically, and so special approaches have been developed to treat them numerically (higher-order and total variation diminishing (TVD) scheme, as well as Riemann solvers). LeVeque introduces these concepts and separates the problem into two parts: the physics of compressible flows and the numerical treatment of it.
What is a bonus is that he manages to do all that in about 200 pages, and I am always a fan of books that convey key messages quickly. Most authors seem to favour quantity over quality, but not this book. It is an excellent introduction to compressible flows and covers all essential topics.
Riemann Solvers and Numerical Methods for Fluid Dynamics
Authors: E. F. Toro
Once you have finished the book of LeVeque (above), you will find that you have gotten a very good surface-level coverage of compressible flows and a good idea of how all of that fits together, including some numerical treatment of the problem.
But now, you want to explore more advanced concepts and numerical schemes that can help you solve compressible flows. Perhaps you are writing a research or commercial CFD solver and focusing on compressible flows, in which case, this book is probably a must on your reading list.
It comes with sample programs and probably provides complete coverage for treating numerical discontinuities and compressible flows. I wouldn’t recommend it as a textbook for starting with compressible flows, but once you have an appetite for them, this book will take you from beginner to expert.
Verification and validation
Verification and Validation in Scientific Computing
Authors: W. L. Oberkampf, C. J. Roy
Verification and Validation are critical aspects of CFD, and those who understand the limitations imposed by models, modelling uncertainties, and other sources of uncertainties and errors are likely to get reliable and accurate results.
This book is a fantastic first course that encompasses pretty much all of the areas we associate with uncertainties. If you only ever want to read a single book on this subject, this is probably it. It gives you a good sense of how to tackle uncertainties and an appreciation that most of what we do in CFD is uncertainty management.
Oberkampf is one of the leading figures in validation and verification and, therefore, probably also the best-equipped person to write a book about this subject. I go back to it every now and then and always find something new.
Verification and Validation in Computational Science and Engineering
Authors: P. J. Roache
If we talk about verification and validation, it would be wrong not to mention the work of Roache here. Roache is probably one of the founding fathers of uncertainty management in CFD. We have to thank him for a lot of the development, and subsequent momentum, in this area.
His book on verification and validation is, by today, probably a bit dated, and it is certainly difficult to get your hands on a copy as it is no longer in print. All of the concepts covered in this book are also covered in the book mentioned above by Oberkampf and Roy.
However, since verification and validation wasn’t at a very advanced state (and pretty much driven entirely by Roache himself at the point of publication), the concepts covered in his book, like the grid convergence index and the method of manufactured solutions, are discussed in much greater depth than in Oberkampf’s book.
If you need some additional explanations and can get your hands on this, well worth a read!
A defense of Computational Physics
Authors: P. J. Roache
This is what happens when you retire and have spent your entire life working on verification and validation for CFD processes. You take on philosophers like Karl Poppers and write a monograph defending the field to which you have dedicated your life.
Roache looks at the falsification statement in science, i.e. a scientific theory can only ever be falsified but never verified. If we can’t find a way to falsify a theory, then the theory is probably correct. This is a prevailing attitude in the field of physics.
However, if we allow this statement to be true, then the entire field of CFD has to be rejected, and things like RANS turbulence models should not be allowed to exist. Seeing how we can successfully employ RANS models and CFD as a whole suggests that there is value in using computational methods in the field of science and engineering, so the statement of falsification may apply to exact physical theories but not to inexact fields like CFD.
This is not a textbook, but if you fancy some philosophical discussions on the validity of CFD, put it on your pleasure reading list.
Programming languages and software engineering
Professional C++
Authors: M. Gregoire
I’ve gone through a few books on C++, and I remember my first book on C++ to be 200 pages of wasted time and money. It is not so professional C++, but this book really takes a deep dive into the different concepts of C++ and is probably the most complete book out there. Granted, it has a page count of around 1000, but this is not a book that you read cover to cover, but rather chapter by chapter, depending on what you want to learn.
It covers almost every concept in C++, and, given the frequent updates this book receives, it keeps pace with the updates introduced to C++.
When working as a software engineer on a commercial CFD solver, I had this book on my desk to refer to concepts I didn’t quite get when looking through the code. The descriptions of templates are especially good, and that’s something I can’t say for most books on C++.
If you are looking for a single reference book on C++, this book should be at the top of your list.
C++ High Performance: Master the art of optimizing the functioning of your C++ code
Authors: B. Andrist, V. Sehr
If you don’t have a formal background in software engineering, I would argue that picking up just a book on C++ is likely not enough. There are probably as many solutions to a problem as there are programmers interested in solving it. But which one is the fastest?
This book examines C++ from a performance perspective. How can you write code to solve a problem that requires the fastest code execution?
In the early chapters, the authors review a few critical concepts that help throughout the book and then dive deep into algorithms and data structures, which essentially walk you through the standard template library (STL). If you are not already using the STL (you should!), this book will guide you into it naturally, and you will see why using it is advantageous.
Code performance is determined by 2 factors: the CPU speed (nothing we can do about it, other than change or overclock it), and memory access (lots we can do here). This book has an entire chapter dedicated to memory management, and while I get that it is not the most interesting thing to talk about, it is essential, and you need to understand how memory works to write fast code. I’ve got you covered if you are looking for a shortcut.
Clean Code: A Handbook of Agile Software Craftsmanship
Authors: R. C. Martin (Uncle Bob)
This book is interesting, and I hold it in high regard. Let me paint you a picture: You write code, and it works, but you find it getting more complicated to add new lines of code. The more code you add, the more it breaks your code. Does this sound familiar? This is the typical journey of a new programmer; we first learn the language and then use it with our best intentions, but that rarely leads to well-written code.
The book by Robert Martin, affectionately called Uncle Bob in the community, guides you through every piece of code you have and how to structure it so that you write clean code.
Clean code does not simply mean easy-to-read code but rather easy-to-maintain and easy-to-extend code as well, and this book does a brilliant job, with lots of examples, at showing how it is done.
This book may not be on your immediate reading list, but keep it in the back of your head for when you are writing a program that has more than 500 lines of code and somehow sucks, but you can’t point your finger at the problem.
Unit Testing: Principles, Practices and Patterns
Authors: V. Khorikov
When I read this book (and it is one of those books I go back to every now and then to re-read certain sections), I was already familiar with unit testing and had been testing my codes using this approach for a few years.
This book does a great job of teaching how to write unit tests, how to structure them, and, more importantly, what should and shouldn’t be tested. You will see that many of the lessons learned from this book have influenced my series on software testing.
Similar to the book mentioned above on clean code, this book does so much more than simply describe how to test code. It shows how to write tests and how these tests influence the design of the interfaces (classes) they test. After you look at code in terms of testability, you realise that this alone can help you design clean code automatically, and I have certainly used that in my own projects ever since.
If you feel comfortable with programming and want to improve your skills, this book is well worth your time and money. It will help you get closer to coding perfection.
High-performance computing
Introduction to High-performance Computing for Scientists and Engineers
Authors: G. Hager, G. Wellein
Let’s face it: CFD can’t be run on a single CPU unless you are the company’s expert in running 1D CFD solvers. Running a 3D simulation in steady-state mode is already challenging enough on a single laptop/PC. Still, once you add unsteadiness (or just lots of cells in steady-state mode), you can’t avoid parallelization and utilisation of more than one core.
While most books on high-performance computing use the above paragraph to say, “As a result, we need to parallelise our code”, this book takes a step back and says, no, we first need to optimise our code before parallelising it. Let’s extract as much performance out of our code as possible before we start thinking about parallelisation.
The first chapters concentrate on optimising code on a single core, but towards the middle of the book, the tone changes, and parallel computing is introduced. This book discusses both distributed (Message Passing Interface (MPI)) and shared (OpenMP) memory approaches for parallelisation and highlights their strengths and weaknesses. Towards the end, a hybrid approach is presented where both MPI and OpenMP are combined to remove their respective disadvantages.
I really enjoyed this book. It provides a good introduction to the hardware used on modern PCs and clusters, which helps me understand later chapters on optimising code. Suppose you are interested in optimising code for a single core and not the parallelisation bit of the book. In that case, the authors are running a course on node-level optimisation that you can view on YouTube (but note that the playlist is in reverse order, so you have to start from the last video).
Parallel Programming for Multicore and Cluster Systems
Authors: T. Rauber, G. Rünger
The previous book has a lot in common with it, so I wouldn’t recommend reading both of them at the same time. However, I wanted to mention this book as well, as it also covers GPU programming (besides MPI and OpenMP), i.e., using graphic cards to accelerate your code. It is a gentle introduction, which the book by Hager and Wellein misses.
The other aspect I really enjoyed about this book is that it shows how to implement different numerical algorithms in a parallel environment. While that is limited to the last chapter, and the examples are not exhaustive, they are well selected, and if you are writing a CFD solver, there will be something of interest to you.
Apart from that, the book does a good job of introducing a few more concepts that Hager and Wellein’s book does not cover. It gives you a really good understanding of how high-performance clusters work from a conceptual level and how code has to be written to utilise these machines.
Parallel Programming for Science and Engineering
Authors: V. Eijkhout
Who says you must raise a small mortgage to buy a good textbook? Victor Eijkhout is a person I have stumbled upon a few times now through different channels. When it comes to textbooks, his work is really good and, best of all, free under an open-source license. You can find his textbooks on theartofhpc.com and, just in case that website ever moves or vanishes, also on GitHub.
This book, to me, is the most complete introduction to MPI and OpenMP programming that I have come across. There is a book floating around by William Gropp, which seems to be the only book available for MPI programming, and while I have purchased both volumes 1 and 2 of his books, I can’t recommend them. This book, on the other hand, is just magnificent. Since it is free, you may download it now and save it to your ebook library, it will become useful eventually if you go deep enough into CFD. I promise!
Professional CUDA C Programming
Authors: J. Cheng, M. Grossman, T. McKercher
If you look at the cover and find that this looks an awful lot like the professional C++ book, then you are right. It is from the same series, and in general, I have found these books to be rather helpful.
CUDA programming allows you to leverage GPUs, specifically Nvidia GPUs, to accelerate code on graphic cards. This book does a good job of introducing you to the basics and then jumping straight into coding examples. What I really enjoyed in this book was the introduction of a new concept, which was followed up with a code example and the timing of the code. In this way, you get a sense of how good or bad a certain approach is in terms of performance.
While most books stop here and, perhaps, introduce a few examples, this book only really gets started and covers more advanced concepts such as working with CUDA libraries, fine-tuning and debugging CUDA code, and leveraging multiple GPUs to improve performance even further.
It’s a great introduction to CUDA and learning how to parallelise your code using graphic cards, I’ve enjoyed reading it and so will you, I’m sure!
OpenACC for Programmers: Concepts and Strategies
Authors: S. Chandrasekaran, G. Juckeland
You may not know what OpenACC stands for, so let me give you a quick intro: We looked at CUDA programming above, which is a very low-level programming approach (you must manage memory transfer between CPU and GPU memory yourself). But what if you want to write code and then provide some hints to the compiler so you can do all of the parallelisation? This is what OpenACC does.
Suppose you are familiar with OpenMP (which also simply provides instructions to the compiler for parallelising your code). OpenACC will feel very similar in that case, but it mainly focuses on GPUs. If you look at simple OpenACC examples, you will very quickly get an idea of how to use it, and this book gives you a quick introduction to the topic.
This book is not for everyone, but it can provide impressive results if you want to experiment with quick GPU acceleration without writing excessive code.
On the internet
In this section, I want to review some of my favourite places on the internet that have helped me and will help you to master CFD. Be it for understanding the theory behind CFD, or for mastering some programming-related concepts, I have collected here what I think will help you to become a better CFD practitioner.
CFD theory, applications, and miscellaneous bits
CFD online
Website: https://www.cfd-online.com/
I’m always surprised when talking to my students that CFD online is not a household name. It is probably the go-to resource on the internet for any CFD-related question. It has an active forum with an exceptional user base that can answer pretty much any questions you may have.
Besides its forum, it does come with a highly underrated wiki, a job section advertising CFD jobs, and a vast link directory that has links to probably every CFD resource on the internet.
If you are not already a member, I highly recommend signing up and contributing to the community through forum discussions. Some excellent questions were asked and answered, and I occasionally contribute there.
Fluid Mechanics 101
Website: https://www.youtube.com/@fluidmechanics101
This is a pretty useful collection of lectures on CFD theory, in no particular order. If you want to understand certain concepts, this is an excellent resource, and I wish I had it available as a student.
Adrain is really good at explaining complex phenomena and making them understandable in layman’s terms, and I’ve certainly picked up a few good insights from him here and there. If you haven’t viewed any of his lectures, pick a topic and see for yourself. I’m sure you will make good use of his videos.
CFD toolbox
Website: https://chromewebstore.google.com/detail/cfd-toolbox/
This is a bit of a selfish advertisement, as this tool is from me, but let me give you my motivation, and then it’ll make sense.
When performing CFD calculations, you have to perform many calculations, and tools have been developed to help practitioners do that. Whether calculating the first cell height based on a y+ value, performing a grid dependency study, or setting turbulent quantities at inlets, these tools help streamline the process.
I have used these for a long time but got frustrated that they were scattered over the internet. I wanted a single place where all my calculators were home, so I created this little toolbox where they all met and became friends.
It has calculators for:
- calculating the first cell height based on a y+ value
- calculating the grid convergence index based on simulations performed on three separate grids
- calculating the turbulent inlet properties for virtually any RANS turbulence model (useful if you are using OpenFOAM)
- calculating how much CO2 is emitted by large-scale CFD applications (useful to calculate the carbon footprint of simulations; it is larger than you’d expect)
- the international standard atmosphere to calculate freestream properties of air at a given altitude and reference ground temperature
Programming
Learn C++
Website: https://www.learncpp.com/
I mentioned Marc Gregoire’s book above, which may be best suited for you if you require a deep dive into C++. But if you want to learn the concepts in C++ with lots of examples, then there is no better place than learncpp.com, in my opinion.
Have you ever wondered what rvalues and lvalues are and how they are important in move semantics? I have, but if you look at some sources online, they get very academic about this topic. Why not just show an example and explain how these are different? This is how most people learn, and so this website is high on my recommendation list because it features a lot of examples.
Cppcon: The C++ conference
Website: https://www.youtube.com/@CppCon
Cppcon is the largest conference organised in C++. Unlike more scientific conferences (certainly the ones I have encountered), there are some pretty interesting talks given in C++, most of them at a level that someone without a C++ background can understand.
This is also reflected by their different tracks, one of which is called Back to Basics, where they take a deep dive into a C++ concept and explain it in the form of a tutorial. Great if you want to pick up a certain concept and want someone to explain it to you (and you have an hour to spare).
What’s more, the C++ steering committee members are pretty much all at the conference, and you get a real-time update of where the language is heading, with new proposals being presented and how they would look in code. If you have the time, this is a great place to get lost in C++ programming.
Refactoring guru
Website: https://refactoring.guru/
Software engineers love to talk about design patterns, and for good reason: they help us achieve common tasks with a clean implementation. When I heard the term design pattern for the first time, I didn’t realise that it meant something specific in the world of programming, but once I figured it out, well, let’s say I flushed some money down the toilet by buying a book with the term design pattern in the title.
The book wasn’t bad, but it was just too long, and I couldn’t sit through all the useless advice they were trying to preach. Refactoring Guru, on the other hand, is very different in that respect. It lists all existing design patterns, which are explained effectively on the website. Example code is provided for several languages, so you can easily pick the one you want.
If you just want a crash course, look at their description of a design pattern (it takes about a minute to read) and then come back later when you decide this is something you need right now.
High-performance computing
CSCS
Website: https://www.youtube.com/@cscsch
There are quite a few national supercomputing facilities available. For some reason, the ones I have come across love giving away expert knowledge through training for free.
CSCS is one such fine example; they record their training and post it on their YouTube channel, which is fantastic. If you looked at the book of Hager and Wellein above and clicked through to the video playlist, you would have also ended up on CSCS’s YouTube channel!
From programming to high-performance computing to the visualisation of scientific data, there is something for everyone here, and the quality is good. I once attended a 2-day workshop on CUDA programming, which was so bad that halfway through the workshop, I decided to drop out of the online session. Instead, I watched one of their CUDA workshops in the time I had set aside for the original workshop. This was a wise decision, and I was much happier.
I’d say browse through their playlists and see if there is anything that interests you, and when you have the time and motivation, watch the videos. I haven’t watched all of them, but the ones I did were just fantastic!
Rookie HPC
Website: https://rookiehpc.org/
Rookie HPC is a website I wasn’t aware of for a long time, but once I found it, boy, was I excited. As I said above, I love learncpp.com for its focus on examples to show how a certain concept works, and rookie HPC does the same for MPI and OpenMP.
It is an example-driven website that explains how to use every last instruction in MPI and OpenMP and is probably one of the best references for these parallel programming approaches.
If you want to learn how to use a certain MPI routine, look it up to get an explanation of what the routine does, what arguments the function takes, and what an example code would look like. It is a handy reference and my first place to go when I have a question on either MPI or OpenMP!
The art of HPC
Website: https://theartofhpc.com
I have praised the work of Eijkhout earlier on high-performance computing book recommendations, and I think his website deserves its own place on the list, as he is covering just so much content when it comes to HPC.
There’s not much more to say, really. He writes excellent textbooks and makes them available for free; what a lad!
Review of CFD software
When it comes to CFD software, there are three essential phases: pre-processing, solving, and post-processing. Various tools, both open-source and commercial in nature, exist that will help you to prepare and mesh your geometry (pre-processing), create the velocity, pressure, temperature, etc. information around your geometry (solving), and, finally, visualise your results and allow you to extract some additional information based on computed flow fields (post-processing). This section will look at tools I have found useful for these tasks.
Pre-processing: CAD cleanup
ANSYS SpaceClaim
Website: https://www.ansys.com/en-gb/products/3d-design/ansys-spaceclaim
My favourite tool for cleaning up geometry is ANSYS’ SpaceClaim. The software was developed by an independent software company, then bought by ANSYS, and integrated with its sledgehammer approach into its catalogue of products.
SpaceClaim is one of those software programs that are really good at one thing and one thing only—in this case, preparing geometry for meshing. You are missing the point if you look at SpaceClaim as a CAD processor. It can create geometry (and if you have nothing else available, it is certainly a decent tool). Still, in my view, it is so much more powerful at cleaning geometry than any other CAD software I have used (think Catia, Solidworks, NX, etc.).
It can clean and heal both NURBS-based and tesselated surfaces. If these terms don’t mean anything to you, replace “NURBS-based and tesselated” with “any kind of” (but we’ll leave the terms in here for the nerds).
The integrated geometry checker can point out issues with your geometry and does a semi-decent job at it. Overall, it does a good job cleaning complex 3D models, albeit with somewhat erratic behaviour at times. Just save your progress often and with different file names, and you’ll be just fine.
SpaceClaim doesn’t have any official documentation or tutorials that would help me learn this software, and to be honest, I learned it by clicking through all possible buttons and figuring out what they do. There are a few good recorded webinars by external ANSYS partners that you can find on YouTube, which serve as an excellent point to get started (see here: Video 1, Video 2, Video 3, Video 4, Video 5). ANSYS really needs to get some tutorials on their website. Otherwise, it will remain an obscure software for most people! But it shouldn’t be; once you know it, it is really powerful.
CADFix
Website: https://www.iti-global.com/cadfix
I haven’t used this tool myself, but I have seen what the tool can and is capable of. And if CAD cleanup is what you are after, this is certainly a worthy contender.
Typically, suppose you are dealing with complex 3D engineering geometries and you don’t have an internal CAD department that understands your CAD geometry requirements. In that case, it will be up to you to clean and process the geometry before you start to mesh it.
CFD wisdom has it that 70-90% of your time is spent on meshing, while only 10-30% of your time is spent on solving your case. I think people advocating this do not understand the importance of CAD clean-up. With a tool like CADFix (or SpaceClaim mentioned above), you’ll clean your geometry, but once that is done (and done well), meshing time should be much less than time spent solving.
CADFix comes with standard features such as simplifying CAD geometry, preparing surfaces, and removing unwanted features, as well as more advanced features such as geometry morphing (for parametric studies without going back to your CAD program) and scripting.
It is paid, just like SpaceClaim, but perhaps worth considering if you are in a professional environment and spend 90% of your time on meshing and don’t want to buy into the massive ANSYS Ecosystem.
Blender
Website: https://www.blender.org/
Blender is a 3D modelling, rendering, and animation software that uses triangulated surfaces. This makes it easy to morph geometry and model something quickly, which Blender is really good at. In a subset of cases, we can also use these tools for our CAD cleanup stage.
As a prerequisite, we need to be working with tessellated surfaces (or triangulated surfaces), which are typically provided in either *.stl
or *.obj
format. If this is the format required by our meshing software, then Blender is likely our best tool for preprocessing data (well, SpaceClaim also does have decent support for *.stl
and *.obj
files).
We can simplify triangulated surface regions, delete elements and fill gaps. We can group triangles into groups, which we can then use during export to either export these regions into separate files or add a group tag to the triangles (*.obj
files only) which we can then use to assign different boundary conditions to different triangles.
While all of this can be done with Blender (and I have cleaned up some rather large geometries with it for meshing), there is no documentation on how to use Blender for CFD applications (yet), but I may provide some guides on that in the future.
Pre-processing: Meshing
Pointwise
Website: https://pointwise.com/
Pointwise should be high on your list if you only want to invest in one tool that can do it all. Meshing for CFD applications can be done using a bottom-up or top-down approach, and Pointwise is one of the few (if not the only one!) that can do both. It also does both structured and unstructured meshing, which is just great!
Top-down means essentially automated. You specify some global parameters such as minimum and maximum edge lengths, curvature refinements, etc., and you get a mesh for a complex geometry without touching any of the surfaces. Bottoms-up, on the other hand, means you specify all parameters for all surfaces individually and then create the mesh step by step, i.e., first for your edges (1D), then surfaces (2D), and then finally for your volume (3D). Pointwise does both, and it is really good at it.
It allows you to have fine-grained control over how surfaces and volumes are meshed. You can pick different algorithms and compare the meshes they create (as well as the mesh quality that follows). There is nothing stopping you from creating a quick automatic mesh (top-down), which you then refine by adapting meshing regions that need further refinement.
The only problem I have with Pointwise is its CAD kernel, for some reason, I always get a few surfaces that can’t be imported. Pointwise has the functionality to repair surfaces on a very rudimentary level. Still, since discovering SpaceClaim, I usually look at what regions are problematic in Pointwise and then fix them in SpaceClaim only to reimport the fixed geometry. If Pointwise were better on this front, I would not need this two-pronged approach, but so here we are.
Ansys Fluent Meshing
Website: https://www.ansys.com/products/fluids/ansys-fluent
If you say that you can’t be bothered with meshing and want something that works quickly and gives you a decent quality, then Fluent Meshing should get your attention.
Fluent Meshing combined with SpaceClaim is a powerhouse that completely changed how I performed meshing. It is quick, reliable, and has some of the best inflation layer algorithms I have seen in a long time. If you have ever used ICEM-CFD (not on this list!) or snappyHexMesh (see next entry), you will know the pain of creating inflation layers.
It can only create 3D volume meshes (no 2D meshing), but if that is not a limitation and you have access to Fluent already, then go for it. It will save you a lot of meshing headaches. I like the scripting functionalities as well. They are not well documented, but with a bit of trial and error and recording a journal file of your meshing session, you can quickly automate your meshing and then forget about it completely.
You can’t modify local meshing regions easily, although you can separate local areas in SpaceClaim that you want to have some more control over. However, it is also a tool in active development by Ansys and I have seen some features in the pipeline that could be game changer if implemented in a useful way (but from what I have seen, I remain somewhat skeptical).
It is honestly one of the best mesh generators I have used in a long time, but it is just a bit restrictive in that it wants to automate everything, so you lose some control over smaller details. If you can live with that, this mesher is for you!
OpenFOAM: snappyHexMesh
Website: https://www.openfoam.com/ and https://cfd.direct/openfoam/
OpenFOAM, where to start. Well, it does come with its own mesh generators. Do you need to mesh a geometry? How about five different mesh generators? Yes, OpenFOAM has a few different mesh generators, some of which are not documented, so perhaps you have never encountered them.
Having said that, the working horses are blockMesh and snappyHexMesh. Both mesh generators combined can do the same things as Fluent Meshing mentioned above. If you don’t care about turbulence, then snappyHexMesh is the tool for you—that is, if you can work with a mesh written in OpenFOAM format. It is good at creating a decent volume mesh but horrible at creating inflation layers, which are required for turbulent flows.
But the best part—and that is why it is on the list—is that it is completely free to use. If I had to pay for it, I would not recommend it! On the plus side, snappyHexMesh is also in a somewhat active development phase, and you’ll see improvements in OpenFOAM releases every now and then. So perhaps the inflation layer issue will be resolved at some point in the future.
BOXERMesh
Website: https://www.cambridgeflowsolutions.com/en/products/boxer-mesh/
BOXERMesh is an interesting case; it does seem to follow the same meshing philosophy as snappyHexMesh, with the difference that it does work well for large-scale applications, including robust inflation layer creation.
For me, the emphasis is on processing large domains. If you need to create domains with widely different length scales or have so many features to capture that you need a well-thought-out mesh refinement strategy, then this tool may be the right one for you.
As an added bonus, the mesh generator uses mesh metrics to steer the meshing workflow, which is good to see. Quality metrics are often overlooked but really should be the main focus during meshing. BOXERMesh gets this aspect right and deserves its place on this list for this fact alone!
ANSA Beta
Website: https://www.beta-cae.com/ansa
This is another tool I haven’t used myself, but I feel inclined to include it here simply for the fact that I have heard a lot of positive feedback on this mesh generator from people that I trust.
From what I can see, it is pretty similar to Pointwise, but it does seem to have a more robust CAD kernel and clean-up functionalities. So, if you deal with dirty geometry a lot, this tool may be for you.
On the other hand, I have also heard that the learning curve is rather steep, but since I have never been able to get my hands on a license, I can’t confirm this. I would put it this way: if you are in the market to get a mesh generator and are willing to pay for it, consider both Pointwise and ANSA Beta and see which of these tools has the features you need.
Altair Hypermesh
Website: https://altair.com/hypermesh/
This is another tool I haven’t used, but as part of my grid generation lectures, I like to ask students what type of mesh generator they have used before. They usually mention the same software from year to year, and Hypermesh is one of them which I wasn’t aware of before, so I checked it out.
I have to say, when it comes to automatic meshing, this tool certainly seems to know what it is doing! It seems to be equally robust as Fluent meshing and does a good job at creating a mesh quickly, but what I really liked about this tool is the post-meshing influence you have. It is similar to Pointwise, where you can go in and change the mesh locally, albeit with less control than Pointwise (where you can literally grab vertices and move them around), but certainly more than Fluent meshing.
The only thing I can’t comment on is the inflation layer creation, which is the most critical part of any mesh generator. Without it, the mesh generator becomes useless for any serious (engineering) application. But I have no doubt that they perform just as well here, given the set of features implemented into Hypermesh. It’s worth a try if you can get your hands on it.
CFD Solver
Fluent
Website: https://www.ansys.com/products/fluids/ansys-fluent
Ansys offers a range of CFD solvers; Fluent is the strongest code among them. It is a CFD solver that works, and if this is the only CFD solver you are using or planning to pick up, it will be difficult to appreciate how simple Fluent can be while still giving you excellent results. You will know exactly what I mean if you have used less user-friendly software such as OpenFOAM before.
It has a decent selection of models, especially in turbulence modelling. It helps that they have one of the best turbulence gurus on their payroll who is constantly developing new ways to solve turbulence. As a result, their turbulence modelling capabilities are constantly evolving and ahead of everyone else’s solver.
With the addition of Fluent meshing, it is now a self-contained code where you can do meshing, solving, and post-processing, all in one place. The support for extending Fluent is also great, from automating meshing and simulations through simple scripts to defining your own expressions to calculate new fields or integrated quantities (all with unit checking and automatic conversion) to writing code that is injected into fluent at runtime and even with possibilities to change the user interface to add your own custom tools directly into Fluent.
It does a great job of obtaining flow field information while giving you the feeling that CFD isn’t that complicated. This is achieved by doing a lot of heavy lifting in the background, which sometimes means you lose control over some settings. Some may find this restrictive, but I find this a necessary evil to get results in the first place.
It is a commercial product, so you’ll have to pay for it, but if you are in the market to consider which solver to go for, this is an excellent choice. It also comes with SpaceClaim, which will sort you out on the CAD cleanup stage!
Star-CCM+
Website: https://plm.sw.siemens.com/en-US/simcenter/fluids-thermal-simulation/star-ccm/
Star-CCM+ is probably Fluent’s most direct competitor in the commercial landscape. In its own right, it is a fantastic solver with many features and models that you want to see from a commercial CFD solver. Some find the user interface easier to navigate than Fluent’s (though I think Fluent is already pretty straightforward), but one nice feature is that you can select parts of your simulation setup and copy and paste them onto a different case, saving you from clicking buttons.
Star-CCM+ long enjoyed a unique standing in the commercial CFD landscape in that it had (and perhaps still has?!) one of the best automatic surface wrappers that helped to pretty much automate the CAD cleanup stage, followed by generating a decent volume mesh. Given that all of that takes place in one software (with Fluent, you need SpaceClaim, Fluent Meshing, and Fluent, so three separate software to learn), it may be easier to pick up and learn than Fluent.
Model and feature-wise, it does not have to hide behind Fluent; they cover pretty similar features albeit with less exotic ways to model turbulence. It can be extended through scripting but uses Java, which is a pretty strange choice for a scripting language, making Star-CCM+, at least in this respect, a unicorn. If this is not a problem for you and you want a single tool to do everything from meshing to solving to post-processing, then this is a good choice.
OpenFOAM
Website: https://www.openfoam.com/ and https://cfd.direct/openfoam/
I love OpenFOAM, and I hate it at the same time. If you spend long enough with this solver, I believe you will come to the same conclusion. It is a free and open-source solver, so there is no premium to pay for using it, which is great. Of all the open-source solvers out there, it is definitely the best in terms of features and capabilities.
I love OpenFOAM because it has a nice set of features implemented and gives you full control over your simulation setup. I don’t necessarily want to have full control over every aspect of my simulation, but if you want to understand how a CFD solver works and having to read up about all of the settings that you can influence, it gives you a pretty good understanding of what it takes to go from initialising the flow to getting a final solution.
You can inject C++ code pretty much anywhere, and since it is entirely text-based, it is easy to automate your simulations. Since it is open-source, it is easy to extend and write your own solvers and models, but finding suitable documentation is a pain, and the developers make it hard for you to get the information you need, as their main source of income is training people to use OpenFOAM, which is a frustrating business model but one that we have to embrace if we want to use the solver.
I hate OpenFOAM because it sometimes just doesn’t work. It is full of bugs and seemingly non-tested code, and even if it does work, there are cases where it works in theory but is just so slow that it is useless for what you want to use it for. Their compressible flow implementation is so bad that even the OpenFOAM developers agree that something needs to be done about it (for years, but I haven’t seen them move their fingers, I doubt that this sentence will age badly and that OpenFOAM will remain a useless solver for compressible flows in the future).
Still, if I have to weigh up all the advantages and disadvantages, I love the freedom OpenFOAM gives me to explore simulation settings and even the underlying source code as well. Want to know what empirical correlation is used for transitional-based RANS models to obtain closure coefficients in the turbulence models? No problem, find the corresponding source file, and the answer is right there. It is the best code to learn CFD (the hard way), but if you sit through it and try to understand all the different settings and options you can influence, you will emerge as a CFD power user; I have no doubt about that!
Numeca
Website: https://www.numeca.de/en/
Numeca’s CFD code is an interesting software; it reminds me a lot of Star-CCM+ in that it unifies the entire process from CAD cleanup to solution in one interface and does so with a seemingly sleeker and more modern interface. I don’t know why you should bother about having a modern interface, but it is just prettier to look at, a purely personal preference.
Again, it has all the features and models you would expect to perform internal and external aerodynamic calculations, as well as heat transfer, acoustics, and high-fidelity turbulence simulations.
Their heritage seems to be turbomachinery and CFD for ships in open water, but they have matured to a general-purpose CFD code that is, like the other tools, extendable through scripting with Python as a language.
It has a unique way of determining uncertainties and imposing that onto the results, which I haven’t seen in any other software. Managing uncertainties is probably the most important aspect for us to get right when simulating cases, yet it remains a pretty unexplored concept by other CFD solvers regarding native integration. It may be a good tool to explore if you are dealing with applications with a high dependence on uncertainties (e.g., erosion predictions).
Converge CFD
Website: https://convergecfd.com/
Converge CFD is a code for combustion. Period. This doesn’t meant that you can’t use it for anything else (I have done some nice external aero simulations of high-performance vehicles with it!) but the way the interface, features, and models are designed gives you a clear indication that you ought to be using this code for combustion related problems.
There is no other software that comes even close to having the same set of features and models implemented related to combustion modelling (at least from what I can see), and I have to say that they have some of the best support staff I have ever interacted with. Do you have a specific problem for which you need a solution? How about a personalised webinar with two support staff that walk you through the solution while you get to ask questions along the way?
What I really like about the software is the ability to modify imported CAD surfaces and prepare them for meshing; the meshing works great and has support for inflation layers, which may, though, not be at the same level as other commercial meshing software. But you have some tools to get around this issue, so it is not really a big problem.
The code really shines when it comes to automatic mesh adaptation. Other software can do that as well, but I have the feeling that Converge CFD has come closest to mastering automatic mesh adaptation in a sensible way while retaining load balancing when running the code in parallel.
If you are interested in combustion, this is your solver; for anything else, you would need to evaluate it for your specific needs.
code_saturne
Website: https://www.code-saturne.org/
This is another open-source code which is free of charge and intended to be used for incompressible flows (mainly). Compared to OpenFOAM, it has by far not the same set of features, but then again, I probably only use about 2% of the features implemented in OpenFOAM, so quantity is not always a deciding factor.
There are two things that I like about code_saturne: It comes with a graphical user interface (pretty much unheard of for open-source CFD solvers), though with the only caveat that this is only used for setting up cases, not for an integrated workflow like other commercial CFD software for meshing, solving, and post-processing. The other nice feature is that it can easily be integrated with other software. They have native support to couple it to code_aster, which is a structural solver, so Fluid-Structure Interaction (FSI) simulations can be done pretty painlessly (good luck doing that in OpenFOAM). But they have an interface that can be used to couple any other software to code_saturne, and this may be just what you need to build a multiphysics simulation framework that combines various pieces of code.
SU2
Website: https://su2code.github.io/
SU2 is the direct opposite of OpenFOAM. It supports incompressible flows (which you can probably use), but it is aimed purely at compressible flows, and it does an excellent job of getting this step right.
If you look at the features implemented, you can quickly see that the history of CFD is well reflected in the implemented models. This means that if you read through the documentation and try to figure out what you have to change to get the simulation setup you want, you will come across many classical schemes that were developed in the context of compressible flows, and so you have a good playground for testing these different methods.
The setup is straightforward: You have to provide a configuration file, which is pretty standard for console-based applications. Once this single file has been created, changing parameters and seeing their effects on the solution is simple.
SU2 was developed for external aerodynamics, which is what they focus on. This makes sense, given that compressible flows are mainly found in aerospace applications, but if you have a different use case and want a decent base compressible solver, you should give this a try. I have found this solver rather pleasant to work with.
PowerFlow
Website: https://www.3ds.com/products/simulia/powerflow
Now we get into the obscure (or shall I say niche?!) solvers, and PowerFlow is the first one I want to start with. PowerFlow is departing from the Navier-Stokes equations and uses the lattice Boltzmann method to solve the fluid dynamic equations.
Having done excessive work on Lattice Boltzmann, I don’t understand why, honestly. The method is just not fit for purpose, yet people have tried to make it work for large-scale engineering applications (and they have seemingly succeeded).
What I always find interesting is how people repeat, over and over, what advantages we stand to gain from using the lattice Boltzmann method, yet you can probably find directly correlated disadvantages, which may even impose more restrictions.
Having said that, PowerFlow has seemingly overcome all of these disadvantages and provides a tool for industrial applications using the lattice Boltzmann method. It is the go-to tool in the automotive industry, and if this is where you are heading, then it is definitely a bonus to know how to use this solver.
I personally remain sceptical about the lattice Boltzmann method for such applications (which doesn’t mean that I distrust the results it provides, just that it is not the best tool for the task at hand). However, if you are interested in more moderate Reynolds numbers and potentially some multiphysics or multiphase aspects, it is a decent tool and actually an area where I believe the lattice Boltzmann method to be a strong tool.
For the right application, this software may be the best solution you have.
Palabos
Website: https://palabos.unige.ch/
I hesitated to include this software here, but I have a reason, so let me elaborate. Palabos is also based on the lattice Boltzmann method, but it is open-source and free of charge. This may make it the right tool for you for this fact alone.
I hesitate to include it here because you have to use the software to get a solution. To set up a case, you have to write a C++ code that essentially uses functionalities provided by Palabos. It is not a solver where you simply provide the input file, you have to write the solver from scratch (but with heavy support from Palabos itself). This means you must go through the documentation to set up even the simplest of cases, creating a steep learning curve. But if you want to get stuck into lattice Boltzmann, you have time, and the prospect of being able to customise your lattice Boltzmann solver sounds promising, so this is definitely worth a try.
The good news is that there does seem to be at least some decent documentation, so if you have the time, mastering Palabos should be possible.
ICFD
Website: https://www.dynaexamples.com/icfd
I used ICFD in a project with a student, so my recollection of this software is based largely on the student experience. But I wanted to include this solver here because it does something different; it uses the smooth-particle hydrodynamic (SPH) method to solve the Navier-Stokes equations, which means we are using particles instead of a fixed grid to get our results.
Like the lattice Boltzmann method, SPH is often portrayed as having advantages that should make you jump out of your seat and ask why not everyone is using this fantastic method. It is often hailed as a meshless method, and so you remove the pre-processing stage entirely (great news if you hate meshing), but this isn’t strictly speaking true, as you still have to provide locations for the particles to be injected from (which usually sit on a regular mesh). Granted, it is simpler than creating a 3D volume mesh, but at the same time, you lose control over mesh densities close to wall boundaries, where you probably want to have some more information to capture velocity gradients accurately.
It is the only commercial CFD software available that is based on the SPH method, so if this is what you want to evaluate, it is probably your best shot. From the result I have seen, it seems to be doing a decent job, though, in terms of development, there is still a tall mountain to climb to come anywhere near capabilities that mesh-based solvers such as Fluent, Star-CCM+, and OpenFOAM have to offer.
PySPH
Website: https://pysph.readthedocs.io/en/latest/
Similar to Palabos, I have included this software here purely for completeness. It is an open-source implementation of the SPH method, rivalling ICFD mentioned above.
Unlike Palabos, though, the developers seem to have done a great job of exposing a user-friendly API for writing SPH code. Similar to Palabos, you have to write your own solver, but they use Python with some pretty impressive performance (comparable to compiled code). It is parallelised for CPUs and GPUs, and for that fact alone, it is a worthy contender.
Particle-based codes always have the disadvantage that conventional post-processing software are notoriously bad at displaying particle-based solutions. PySPH overcomes this by implementing its own post-processing software.
While I may not be personally interested in working with SPH, the software design of PySPH is rather nice and from a software engineering perspective I like how they have achieved a few things that I may want to learn from them should I need these feature in the future myself. Perhaps not the strongest endorsement for a CFD code, but if you are interested in SPH, why not try this before splurging on expensive ICFD licenses?
Post-processing (data visualisation and processing)
So, we have cleaned up and meshed our geometry, solved the flow within or around it, and are now at a stage to analyse the results. Post-processing is not the process of showing colourful images (that is just visualisation), but post-processing is the step of taking the computed raw data (pressure, velocity, temperature, etc.) and converting that into quantities of interest, e.g. integral quantities such as lift and drag coefficients, separation points on external aerodynamic surfaces, pressure drops, efficiencies, the list goes on.
Think about post-processing this way: if you run the simulation around a complex geometry or engineering application, what information would you need to decide what to change about the geometry for quick optimisation? To make this decision, you will need to calculate application-specific quantities, which will help you steer that decision. This is the realm of post-processing, which includes visualisation as well, but that is just one part of it. In the following, we’ll review tools that help you to do just that.
Paraview
Website: https://www.paraview.org/
My go-to tool for all post-processing needs. It is one of the rare open-source, free-to-use software and probably better (at least in certain areas) than paid counterparts.
Paraview is, first and foremost, an excellent visualisation tool. It comes with features that you would expect here, i.e., contour plots, iso-surfaces, streamlines, 1D plots, and a very decent line-integral convolution-based streamline plotting tool. The quality of these plots is excellent, and you can even choose ray tracing for your visualisation to give your renderings that photorealistic look.
But the processing of data is where Paraview really comes to shine for me. Paraview works by stacking different filters on top of each other, each modifying certain bits of the data. For example, you only have velocity and pressure data around a geometry and want to calculate the lift and drag coefficient? No problem; first, use a filter to get the surface normal vectors for each cell, then a filter to calculate the velocity gradient (from which you can then calculate the wall shear stresses), and you can then calculate components in the direction of your lift and drag vector and finally use the integration filter to get lift and drag forces. You can apply another (calculator) filter to compute the lift and drag coefficient.
If you perform a certain set of filters all the time, you can create your own custom filter to apply that or simply record a macro which spits out Python code that you can then modify to perform similar tasks for different data sets. I have used that to record the steps to take for one simulation, and then I changed the data loading instruction and replaced it with a loop to do that for a number of other simulations, all giving me the same outputs for different test points.
For me, the downside with Paraview is that the data loaders are not the best. If you have a look through them, you’ll notice that a huge number of data loaders are available. Yet, the ones I am interested in either don’t work anymore (the data format has changed, but Paraview has not caught up) or are only partially implemented, and I can’t use all the features the data format provides me (CGNS, in particular). If getting data into Paraview is not a problem for you, then Paraview is a fantastic, free software, which is also one of the more user-friendly tools for learning.
Tecplot
Website: https://tecplot.com/
Tecplot is another great paid post-processing tool. The learning curve is definitely stepper than Paraview’s, but once you get it, you can do some pretty good post-processing.
Paraview and Tecplot do pretty much the same things in terms of visualisation, so there really is no differentiating factor here. Post-processing-wise, though, Tecplot works a bit differently. You can achieve exactly the same things with Tecplot as with Paraview, though not in as much of a unified way as in Paraview, in my opinion. You can calculate new variables, say the vorticity or Q-criterion, using the calculation tool, write your own macro to calculate a new variable, or use the equation editor to calculate a new variable, or why not throw Python in the mix and do everything there, including automating your post-processing?
As I said, once you know how to do things with the software, then it is a great tool and also much more robust than Paraview; for example, the data loader issues mentioned above do not seem to appear with Tecplot, and they do keep their data loaders up to date. If I want to use advanced CGNS features, I know that I have to go to Tecplot.
One thing where Tecplot is far better than Paraview is the support for visualising parametric studies using Tecplot Chorus. It’s a simple piece of software which you can pick up in a matter of hours, but it really helps to explore parametric studies and differences between geometries and operating conditions, whereas Paraview can only really be used to investigate single simulations.
Python
Website: https://www.python.org/
Nowadays, I can’t see a professional CFD engineer who is oblivious to Python’s existence! I say that because I used to ignore Pythjon for a long time and only picked it up in the mid-2010s.
If you have never used Python before, you have no idea how powerful it really is. Even if we concentrate on CFD data processing, Python offers so much support here that you really do not need to write much code to get what you want. With an account for ChatGPT, or better, Codeium, you can create Python scripts that process and plot data for you with ease.
Plotting is straightforward with Python, and packages such as matplotlib or pyplot really make it easy to visualise simple 1D graphs or 2D contours. Pyplot is interactive and opens in a browser, meaning there are some nice data manipulation possibilities, which come in handy if you are trying to visualise parametric studies in a 1D graph using parallel coordinate plots.
Python is really powerful for processing, too. Doing a fast Fourier transform (FFT) is simple and straightforward (and you can use packages that have that implemented already), and with scipy, you have a package that does a lot of things that are useful for data manipulation for engineering and scientific applications.
With Python at your fingertips, throwing in some machine learning is relatively simple (though you still need to know what you are doing). It helps that the CFD community is moving to expose the functionalities of each solver or tool through a Python layer. Thus, you can automate CAD cleanup in Python through SpaceClaim, meshing and solving with Python in Fluent, as well as post-process your result with Python using either Paraview or Tecplot.
I’d argue that you need to be aware of Python and able to read and modify scripts. Otherwise, you risk falling behind in terms of productivity. Python is a powerful tool, and once applied to your everyday workflow, you can save a lot of time and automate processes.
Matlab
Website: https://uk.mathworks.com/products/matlab.html
Matlab is a very different beast for me. It’s great for plotting 1D graphs and 2D contour plots, and you can do easy data manipulation with it. I used Matlab extensively in the past, but over time, I got more and more into Python, and the more I used it, the less I used Matlab.
So, for plotting, it is perhaps not the best option, as it would be overpriced to buy Matlab licenses just for that (especially as Matplotlib can do pretty much the same things in Python). But Matlab has a lot of toolboxes that, for the right application, can make your life a lot easier and give you functionalities that other packages in Python can’t. I personally never really got into toolboxes in Matlab so this is not a strong motivating factor for me to stay in Matlab, but it does offer decent support here.
The Matlab documentation is really great and example-driven, and for that reason, I find Matlab easier to pick up and definitely more user-friendly. If you have no idea how to get started with machine learning to analyse your CFD data, browse their machine learning toolboxes and look at their tutorials and write-ups. You may not learn much about the theory, but you get a head start on applying these methods to your problem. Documentation is usually an underrated feature of the software, though I think documentation is just as necessary as the code you write to produce that software; for that fact alone, I can appreciate Matlab for what it is.