The D2Q9 Lattice
Source: PHY653B Ch. 7
Intuition
Lattice Boltzmann inverts the usual relationship between kinetic theory and fluid dynamics. Instead of deriving fluid equations from kinetics and then discretising them, LBM discretises the kinetic equation so crudely — nine velocities, in two dimensions — that it seems impossible it could recover Navier–Stokes. It does, exactly, and understanding why is the point of the chapter.
Nine velocities are not an ansatz
The D2Q9 stencil has a rest velocity, four axis velocities and four diagonals, with weights
These look like fitted constants. They are the abscissae and weights of the third-order Gauss–Hermite quadrature of velocity space. The continuous moment integral \(\int f(\mathbf{v})\psi(\mathbf{v})\,d\mathbf{v}\) is being replaced by a quadrature rule that is exact for polynomial \(\psi\) up to third order — and that is the entire content of the lattice.
The moment conditions
The lattice must satisfy, exactly:
Applying the second condition to the D2Q9 weights gives
in lattice units — a property of the quadrature, not a free parameter. Adjusting \(c_s\) does not give you a different fluid; it gives you a lattice that fails the moment conditions and recovers no fluid at all. The widget verifies every one of these to machine precision.
The equilibrium is a truncated Hermite expansion
This is the Maxwellian expanded in Hermite polynomials and truncated at second order in \(\mathbf{u}\). That truncation is the origin of LBM's defining limitation: it is a low-Mach method. Errors go as \(O(\mathrm{Ma}^2)\) and appear as spurious compressibility. Keep \(u/c_s \lesssim 0.1\); no grid refinement fixes a truncation error in velocity space.
The algorithm
Two lines, genuinely:
Collision touches only local data; streaming is an exact copy with no interpolation and no truncation error. This structure is why LBM parallelises almost perfectly and why it handles complex geometry cheaply — solid boundaries are implemented by reflecting populations (bounce-back), which is a few lines of code and requires no body-fitted mesh.
Common mistakes
- Treating \(c_s^2 = 1/3\) as tunable. It is fixed by the quadrature.
- Running at high Mach number. The equilibrium truncation makes the result wrong in a way that looks like compressibility.
- Forgetting lattice units. \(\Delta x = \Delta t = 1\) by construction; converting to physical units at the end is a separate, error-prone step that must be done via dimensionless groups.
Related concepts
- Chapman–Enskog for LBM — why this recovers Navier–Stokes
- Thermal LBM · Variable transport
- Collision operators — BGK taken seriously
- LBM widget — the moment conditions, verified
- Viscosity (PC316) · Navier–Stokes (PC316)
Knowledge graph position
Prerequisites: kinetic theory, collision operators, Navier–Stokes. Leads to: Chapman–Enskog, thermal LBM, complex-geometry and multiphase flow solvers.
Quiz
Q1 (conceptual). In what sense are the D2Q9 weights not arbitrary?
Answer
They are the weights of the third-order Gauss–Hermite quadrature of velocity space, chosen so that moments of the Maxwellian up to third order are integrated exactly by a nine-point sum. \(c_s^2 = 1/3\) then follows from the second moment condition rather than being selected.
Q2 (conceptual). Why is LBM restricted to low Mach number?
Answer
The equilibrium distribution is a Hermite expansion of the Maxwellian truncated at second order in \(\mathbf{u}\). The neglected terms scale as \(\mathrm{Ma}^3\) and appear as spurious compressibility. Because it is a truncation in velocity space, refining the spatial grid does not reduce it.
Q3 (MCQ). The streaming step in LBM introduces:
- (a) second-order spatial error
- (b) no truncation error at all — it is an exact shift of data between neighbouring nodes
- (c) numerical diffusion proportional to \(\tau\)
- (d) a CFL constraint
Answer
(b). Populations move exactly one lattice unit per time step by construction, so streaming is an exact memory copy. All the modelling error lives in the collision and in the truncated equilibrium.