A fluid, nine numbers
at a time.
Simple local rules. Familiar fluid motion. The lattice Boltzmann method connects the two through a statistical description of matter.
You can start coding before you master the theory. A basic LBM solver is surprisingly compact and straightforward to implement. Understanding why it works takes more time, drawing on kinetic theory and numerical analysis. You can build that understanding gradually, with each simulation giving the mathematics something concrete to explain.
Instead of directly solving for velocity and pressure, LBM evolves populations on a grid. No molecular trajectories to track—just a handful of numbers at each grid point.
1A crowd of velocities
Molecules do not all move at the same velocity. At thermal equilibrium, their velocities follow a Maxwell–Boltzmann distribution. In two-dimensional velocity space, this forms a bell-shaped surface. Below, colour shows its height: the bright centre follows the mean flow, while temperature sets the width.
Continuous 2D Maxwellian
D2Q9 equilibrium populations
Both diagrams use the same velocity units and axis directions. Left: brighter means a larger distribution value; the cross marks mean velocity. Right: circle area represents population size. The populations preserve selected moments, rather than sampling the colours on the left. Temperature is fixed.
LBM uses a small, carefully chosen set of velocities. D2Q9 means two dimensions and nine velocities: four along the axes, four along the diagonals, and one at rest.
Each channel stores a population, fᵢ: the fluid density associated with that discrete velocity. Populations are continuous numbers, not counts of individual tracked particles.
How does this connect to the Maxwellian?
The discrete equilibrium is constructed to reproduce essential velocity moments of the continuous distribution, including density, momentum and momentum flux. It is not simply nine samples of the bell curve. Standard isothermal LBM uses a low-speed polynomial approximation of this equilibrium.
Read more: Krüger et al. (2017); He & Luo (1997).
2Collision: shuffle the shares
The collision operator redistributes populations at the same grid point. For the basic fluid model, it preserves total mass and momentum while changing the other properties of the distribution.
The simplest choice, BGK, relaxes the populations towards a local equilibrium determined by density and velocity. Think of nine shares being rebalanced, with the totals kept intact.
Bars: current populations. Dashed marks: equilibrium targets. This example uses a relaxation rate of 0.8; both distributions have zero mean velocity.
A peek at the collision equation
Read it as “current population + a correction towards equilibrium.” The star marks the post-collision value; ω is the relaxation rate. Relaxation is not always a simple blend: some useful rates exceed one.
For standard BGK, in lattice units, the kinematic viscosity is \(\nu=c_s^2\left(\frac{1}{\omega}-\frac12\right)\), where cₛ is the lattice speed of sound.
More advanced operators relax different moments—weighted combinations of populations—at different rates. Collision design is a major route to improving accuracy and stability. [Read more]
3Streaming: follow your arrow
After collision, each population travels to the neighbouring node selected by its discrete velocity. The resting population stays put. Streaming moves values; it does not change them.
Symbols are separated near the source for visibility. In the full simulation every node sends and receives simultaneously.
At walls, boundary rules redirect or reconstruct populations. A common example is bounce-back, which reverses populations to represent a no-slip wall. Accurate curved and moving boundaries need more care.
4And out comes a fluid
The familiar flow variables are hiding inside the populations:
Add the populations to get density. Weight them by their discrete velocities to get momentum, then divide by density to obtain fluid velocity. These expressions apply to the basic model without external forcing.
With suitable collision and equilibrium models, LBM recovers the Navier–Stokes equations in the appropriate limit. Standard isothermal models are usually used at low Mach number: the flow is slow compared with the lattice speed of sound.
Collide. Stream. Repeat.
Compact rules make it approachable. Making them accurate, stable and fast is where research begins.
Follow your curiosity
You do not need to read these before getting started. Use the introductory material alongside your first simulations.
Start here
- A. A. Mohamad (2019) · Lattice Boltzmann Method: Fundamentals and Engineering Applications with Computer Codes (2nd edition).
A practical introduction to flow, heat and mass transfer, with worked examples and accompanying MATLAB codes. A useful route from the concepts to your first implementation. - Krüger et al. (2017) · The Lattice Boltzmann Method: Principles and Practice
Our suggested first textbook: populations, collision, streaming, boundaries and implementation, with example codes. - OpenLB · Introduction to lattice Boltzmann methods
A free online introduction to the mathematical formulation and the two main update steps.
Go deeper: theory and collision models
- He & Luo (1997) · Theory of the lattice Boltzmann method: From the Boltzmann equation to the lattice Boltzmann equation
Where discrete populations and equilibria come from. Physical Review E, 56, 6811–6817. - d’Humières et al. (2002) · Multiple-relaxation-time lattice Boltzmann models in three dimensions
Collision beyond BGK and its influence on stability. Philosophical Transactions of the Royal Society A, 360, 437–451. Free NASA report version. - Succi (2001) · The Lattice Boltzmann Equation for Fluid Dynamics and Beyond
A broader theoretical perspective on kinetic theory and complex fluid applications. Oxford University Press.