Theory & Methodology
A self-contained treatment of the Lattice Boltzmann Method: from the kinetic theory of gases through the D2Q9 discretization, BGK collision operator, boundary conditions, and the Chapman-Enskog connection to the Navier-Stokes equations.
1. From Boltzmann to Lattice Boltzmann
The Boltzmann equation describes the evolution of a particle distribution function \(f(\mathbf{x}, \mathbf{c}, t)\) in phase space:
In the Lattice Boltzmann Method, we discretize this equation in velocity space using a finite set of velocity vectors \(\mathbf{c}_i\), physical space using a regular Cartesian grid, and time using a simple explicit scheme. The collision operator \(\Omega(f)\) is replaced by the Bhatnagar-Gross-Krook (BGK) approximation:
where \(\tau\) is the dimensionless relaxation time and \(f_i^{\text{eq}}\) is the equilibrium distribution. This gives the discrete lattice Boltzmann equation:
This equation forms the heart of the solver. The left side represents the streaming step (distributions propagate to neighboring lattice sites), and the right side represents the collision step (distributions relax toward equilibrium).
2. The D2Q9 Lattice
For 2D simulations, the D2Q9 lattice uses 9 discrete velocity vectors: one rest particle, four axial directions, and four diagonal directions.
Velocity vector layout on the lattice:
6 ( -1, 1) 2 ( 0, 1) 5 ( 1, 1)
3 ( -1, 0) 0 ( 0, 0) 1 ( 1, 0)
7 ( -1, -1) 4 ( 0, -1) 8 ( 1, -1)
The quadrature weights \(w_i\) are chosen to satisfy the moment isotropy conditions required to recover the Navier-Stokes equations:
The lattice speed of sound for D2Q9 is \(c_s = 1/\sqrt{3}\) in lattice units, which follows from the velocity moment conditions.
3. Equilibrium Distribution
The equilibrium distribution is a second-order expansion of the Maxwell-Boltzmann distribution, discretized onto the D2Q9 lattice:
This expansion is valid in the low Mach number limit (\(M = |\mathbf{u}|/c_s \ll 1\)), which constrains the inlet velocity to approximately \(u_{\text{inflow}} \lesssim 0.3\) in lattice units.
The macroscopic density \(\rho\) and velocity \(\mathbf{u}\) are recovered as moments of the distribution functions:
4. Chapman-Enskog: Connecting LBM to Navier-Stokes
The macroscopic Navier-Stokes equations emerge from the lattice Boltzmann equation through the Chapman-Enskog multiscale expansion. The kinematic viscosity \(\nu\) is related to the relaxation time \(\tau\):
The Reynolds number is therefore controlled entirely by \(\tau\):
The recovered macroscopic equations are the incompressible Navier-Stokes equations with an error of \(O(M^2)\):
The pressure is related to density through the equation of state \(p = \rho c_s^2\), making LBM a weakly compressible solver.
5. Boundary Conditions
5.1 Zou/He Velocity Inlet
At the left boundary (\(x = 0\)), the velocity is enforced to \((u, v) = (u_{\text{inflow}}, 0)\). The unknown distribution functions are computed from the known ones using the Zou/He method, which applies the bounce-back rule to the non-equilibrium part of the distributions:
All unknown inlet distributions are then set to their equilibrium values using \(\rho_{\text{inlet}}\) and \((u_{\text{inflow}}, 0)\).
5.2 Convective Outlet
At the right boundary (\(x = N_x - 1\)), a zero-gradient (convective) condition is applied:
5.3 Bounce-Back (No-Slip Walls)
Solid boundaries (cylinder surface, top/bottom walls) use the bounce-back scheme. Distributions that stream into a solid node are reflected back along their incoming direction:
This enforces the no-slip condition at the wall, located halfway between the fluid and solid nodes.
5.4 Periodic Boundaries
The top and bottom boundaries (\(y = 0\) and \(y = N_y - 1\)) are periodic, meaning fluid that exits the top re-enters at the bottom and vice versa:
6. Force Extraction via Momentum Exchange
The forces acting on the cylinder are computed using the momentum exchange method. For each boundary link connecting a fluid node \(\mathbf{x}_f\) to an obstacle node \(\mathbf{x}_b\), the momentum transfer is:
Summing over all boundary links gives the total force on the cylinder. The drag and lift coefficients follow:
where \(D = 2R\) is the cylinder diameter.
7. Memory Architecture
High-performance LBM requires careful memory layout. Our solver uses a flat 1D array for the distribution functions, indexed as:
This layout ensures that the 9 distributions at a single node are stored contiguously in memory, maximizing cache utilization during the collision step. Nested vectors (\(\text{vector}[\text{vector}]\)) would scatter the same data across non-contiguous heap allocations, causing cache misses.
8. Parameter Summary
| Symbol | Value | Units | Description |
|---|---|---|---|
| \(N_x\) | 400 | cells | Grid width (streamwise) |
| \(N_y\) | 150 | cells | Grid height (wall-normal) |
| \(c_s^2\) | \(1/3\) | -- | Lattice speed of sound squared |
| \(u_{\text{inflow}}\) | 0.1 | lu ts\(^{-1}\) | Inlet velocity (Mach ~ 0.17) |
| \(D\) | 30 | cells | Cylinder diameter (\(N_y/5\)) |
| \(\tau\) | \(0.5 + 3\nu\) | ts | Relaxation time (Re-dependent) |
| \(\nu\) | \(u_{\text{inflow}} N_x / \text{Re}\) | lu\(^2\) ts\(^{-1}\) | Kinematic viscosity |