D2Q9 Lattice Boltzmann

2D fluid simulation via BGK collision. Each cell stores 9 distribution functions; streaming + collision yields emergent Navier-Stokes flow. Color = speed magnitude.

Viscosity τ = 0.60
Drive = 0.0002
Obstacle
D2Q9 model: 9 velocity directions (e₀…e₈). BGK collision: fᵢ → fᵢ − (fᵢ−fᵢ^eq)/τ where τ controls viscosity ν=(τ−½)/3. Streaming step propagates distributions to neighbors. Body force drives left-to-right channel flow.