HeadlinesBriefing favicon HeadlinesBriefing.com

Lattice Boltzmann Method: Fluid Simulation Without Navier-Stokes

Towards Data Science •
×

I generated a Kármán vortex street without solving a single fluid equation. The Lattice Boltzmann Method (LBM) treats fluid as a statistical distribution of particles colliding at the microscopic level, letting macroscopic behavior like vortices and pressure gradients emerge naturally. LBM occupies a mesoscopic scale between molecular dynamics and Navier-Stokes solvers.

Instead of asking for the velocity field, LBM asks how many particles move in each direction. The central object is the single-particle distribution function f(x, v, t). The BGK approximation replaces the intractable collision integral with a simple relaxation toward equilibrium at rate 1/τ. Via the Chapman-Enskog expansion, this recovers the Navier-Stokes equations exactly in the low-Knudsen limit, with kinematic viscosity ν = c_s²(τ – ½). The connection to NS is derived, not assumed.

For simulation, continuous velocity space is discretized to D2Q9: nine velocities (rest, four axis-aligned, four diagonals) with fixed weights. The algorithm alternates collision (local relaxation) and streaming (propagation to neighbors). Implemented in ~200 lines of C++, the pull-pattern streaming avoids false sharing. Boundary conditions reconstruct missing populations at walls.

The code runs on the Mare Nostrum 5 supercomputer, demonstrating LBM's embarrassingly parallel nature. It excels in low-Mach, subsonic flows and complex geometries without body-fitted meshes, though numerical instability arises at very low viscosities (τ < ~0.55). Full source and a Python/NumPy version are on GitHub.