Getting started
A self-paced path into computational fluid dynamics, for students who want to join RudhLab or simply learn how simulations are built. It starts with free material and ends with GPU programming.
How to use this page
Work through the steps in order, at your own pace. Each step pairs a little reading with something to build. If you plan to apply for a JRF or PhD position, send what you build with your application: a working, checked solver says more than a list of courses.
1 · Foundations
- CFD Python: 12 steps to Navier–Stokes ↗L. A. Barba and G. F. Forsyth, Journal of Open Source Education, 2018
Free Jupyter notebooks that build up from 1D convection to the full Navier–Stokes equations. A good first week.
- An Introduction to Computational Fluid Dynamics: The Finite Volume MethodH. K. Versteeg and W. Malalasekera, 2nd ed., Pearson, 2007
The standard first textbook on finite-volume discretisation and pressure–velocity coupling.
- Numerical Heat Transfer and Fluid Flow ↗S. V. Patankar, 1980
Short, clear, and still the best explanation of why finite-volume schemes are built the way they are.
2 · Your first solver
The lid-driven cavity is the classic first test: fluid in a square box, driven by a moving lid. It is simple to set up and has trusted reference results, so you can tell whether your code is right.
- Lid-driven cavity solver in Python ↗RudhLab · Python with Numba
Projection method, QUICK convection, and a Red–Black SOR pressure solver, with built-in comparison against the Ghia et al. reference data.
- Lid-driven cavity in Julia ↗RudhLab · Julia
The same benchmark at Re = 1000 in Julia (
test.jl), with validation plots against Ghia et al. - High-Re solutions for incompressible flow using the Navier–Stokes equations and a multigrid method ↗U. Ghia, K. N. Ghia and C. T. Shin, Journal of Computational Physics 48, 387–411, 1982
The reference data everyone compares against.
Try: run at Re = 100 and Re = 1000 and compare the centreline velocities with Ghia et al.; halve the grid spacing and see how the error changes; then write your own version from scratch.
3 · Add heat transfer
- Natural convection in a square cavity ↗RudhLab · Python
A finite-volume PISO solver for a heated cavity, with streamfunction and Nusselt-number output.
- Natural convection of air in a square cavity: a benchmark numerical solution ↗G. de Vahl Davis, International Journal for Numerical Methods in Fluids 3, 249–264, 1983
The standard benchmark for this problem. Compare your Nusselt numbers against it.
4 · Methods we use
- Computational Methods for Fluid Dynamics ↗J. H. Ferziger, M. Perić and R. L. Street, 4th ed., Springer, 2020
A deeper reference for finite-volume and finite-difference methods, turbulence, and solvers.
- The Finite Volume Method in Computational Fluid Dynamics ↗F. Moukalled, L. Mangani and M. Darwish, Springer, 2016
Finite-volume methods explained alongside their OpenFOAM implementation.
- The Lattice Boltzmann Method: Principles and Practice ↗T. Krüger et al., Springer, 2017
The practical introduction to lattice-Boltzmann methods, with example code.
- Immersed boundary methods ↗R. Mittal and G. Iaccarino, Annual Review of Fluid Mechanics 37, 239–261, 2005
A readable overview of immersed-boundary approaches for complex and moving geometry.
- The immersed boundary method ↗C. S. Peskin, Acta Numerica 11, 479–517, 2002
The original method, from its inventor.
5 · Programming GPUs
- CUDA C++ Programming Guide ↗NVIDIA
The official guide to writing GPU kernels in CUDA C++.
- CUDA.jl documentation ↗JuliaGPU
GPU programming from Julia, used in our Julia solvers.
- Julia documentation ↗The Julia project
Start with the manual’s sections on performance.
See what these tools produce in our simulation recordings, each with method notes.
Tools
- OpenFOAM tutorial guide ↗OpenCFD
Open-source CFD used in our workshops and several of our papers.
- ParaView documentation ↗Kitware
Visualising simulation results in 2D and 3D.
- Version control with Git ↗Software Carpentry
Keep every solver under version control from the first day.
Workshop material
- AI/ML in CFD workflows: parametric surrogate modelling ↗RudhLab workshop notebook · runs in Google Colab · source
Builds a fast surrogate model of a CFD problem with proper orthogonal decomposition (POD) and a neural network.
Next
Built something you are proud of? Send it with your application. Questions about any of this material are welcome too.