No Poisson Solver Required: D2Q9 Lattice Boltzmann (BGK) Mesoscopic Fluid Dynamics in WebGL2
BGK) Wind Tunnel. Watch vortex shedding emerge purely from local 9-velocity collision and streaming with zero global pressure projection. Click-drag anywhere to paint exact no-slip bounce-back obstacles!
In Solving Navier–Stokes at 60 FPS, we enforced incompressibility ($\nabla \cdot \vec{u} = 0$) via Helmholtz–Hodge projection – burning 20 to 40 ping-pong Jacobi shader passes every frame to solve the global elliptic pressure Poisson equation $\nabla^2 p = \nabla \cdot \vec{u}^*$. That global pressure solve is the classic scaling bottleneck of continuum CFD.
The Lattice Boltzmann Method (LBM) (Chapman–Enskog D2Q9, arXiv:1512.02599; Extended-Regularized LBM, arXiv:2610.31072) bypasses the Poisson solver completely by stepping down one level of abstraction from macroscopic PDEs to mesoscopic kinetic gas theory. Each lattice cell stores 9 discrete velocity probability populations $f_0, \dots, f_8$ (D2Q9) that execute two strictly local operations per step: algebraic BGK relaxation toward Maxwell–Boltzmann equilibrium, and nearest-neighbor streaming. In the low-Mach limit ($Ma \ll 1$), the Chapman–Enskog expansion proves this local cellular automaton recovers the exact incompressible Navier–Stokes equations!
0. D2Q9 BGK Collision–Streaming & Chapman–Enskog Viscosity
With discrete lattice velocities $\vec{e}_0 = (0,0)$, cardinal $\vec{e}_{1..4}$ ($w_q = 1/9$), and diagonal $\vec{e}_{5..8}$ ($w_q = 1/36$, rest $w_0 = 4/9$, lattice sound speed $c_s^2 = 1/3$), macroscopic density $\rho$ and momentum $\rho\vec{u}$ are exact zero- and first-order velocity moments:
Notice that pressure emerges locally via the isothermal ideal-gas equation of state $p = c_s^2 \rho = \frac{1}{3}\rho$ – requiring zero global linear solves – while arbitrary curved no-slip solid obstacles reduce to a 1-line bounce-back rule $f_{\bar{q}}(\vec{x}_f, t+1) = f_q^*(\vec{x}_f, t)$!
1. Continuum Stable Fluids vs. Mesoscopic D2Q9 Lattice Boltzmann
| Dimension | Stable Fluids Jacobi (Previous Post) | D2Q9 Lattice Boltzmann (BGK, arXiv:1512.02599) |
|---|---|---|
| Pressure Enforcement | 20–40 global Jacobi Poisson passes per frame | Purely local ideal-gas EOS $p = \frac{1}{3}\rho$ (1 pass/step!) |
| Complex Curved Obstacles | Requires boundary normal projection & slip masks | Trivial 1-line bounce-back $f_{\bar{q}} \leftarrow f_q^*$ on any voxel mask |
| GPU Memory Footprint | 1 RGBA16F texture $(u_x, u_y, p, \text{dye})$ |
3 RGBA16F MRT attachments (9 velocity populations $f_0..f_8$) |