AKS Anvil

Fluid theory

Simple 2D fluid — theory

What this demo solves, how viscosity and Reynolds number enter, and how to read the overlays. Educational lattice Boltzmann — not production CFD.

Lattice Boltzmann (D2Q9 BGK)

Instead of discretising Navier–Stokes on a mesh with pressure Poisson solves, LBM evolves discrete velocity distribution functions on a lattice. Macroscopic density ρ and velocity (u, v) are moments of those populations.

collide (relax toward feq) → stream along eᵢ → bounce-back on solids

Nine velocities (D2Q9). BGK single-relaxation-time collision with rate ω.

Viscosity

ν = cₛ² (1/ω − 1/2)
cₛ² = 1/3
ω = 1 / (3ν + 1/2)

Higher ν → more damping, thicker boundary layers, less unsteadiness. Too low ν (or high inlet speed) can make the scheme unstable; the demo softly clamps velocity (Mach control).

Reynolds number

Re = U L / ν

Cylinder wakes: low Re attached; moderate Re → von Kármán street. On-screen Re is an order-of-magnitude lattice estimate.

Boundary conditions in the demo

Scalars & overlays

Limits

Open the Simple 2D Fluid Visualizer, lower viscosity, and watch the cylinder wake. Then try the cavity preset.