Interactive Demo

CFD Lab

A real-time fluid dynamics playground running a Lattice Boltzmann solver (D2Q9) entirely on your GPU via WebGL2 — a 600×248 lattice at interactive rates, with an automatic CPU fallback. Pick a classical configuration, dial the Reynolds number, switch visualization fields — or grab the pencil and build your own geometry.

Have WebGPU? The 3D lab resolves true three-dimensional turbulence.

Flow past a circular cylinder — watch the von Kármán vortex street form downstream.

Re = 150 · 0 fps · D2Q9 · …
Field
Reynolds number 150
Flow lines
Options

About the method

The Lattice Boltzmann method evolves particle distribution functions on a discrete lattice instead of solving the Navier–Stokes equations directly. Each cell carries nine populations (D2Q9) that stream to neighbours and relax toward a local Maxwell–Boltzmann equilibrium, with a Smagorinsky subgrid model for stability at high Reynolds numbers. Solid walls use bounce-back, the inlet imposes a fixed velocity, and the outlet is convective (non-reflecting) with acoustic sponge zones at both ends. Fields use scientific colormaps: speed in Turbo, vorticity in Crameri's Berlin— a diverging map whose dark centre marks zero rotation. Isobars exploit the LBM identity p = c²ₛρ. The Reynolds number uses each configuration's own characteristic length (cylinder diameter, airfoil chord, throat height…). Raise it on the cylinder preset to watch the wake go unstable into a von Kármán vortex street.

Honest limitations: this is a 2D, weakly compressible solver. The Smagorinsky closure acts as an LES-style stabiliser, but two-dimensional flow has no vortex stretching, so no 2D simulation captures true turbulence. Compressibility errors of order Ma² appear where the flow is fastest (the venturi throat at high Re), and the inlet/outlet/sponge zones trade a little physical fidelity for clean, reflection-free boundaries. Treat everything here as qualitative — a teaching instrument, not a validated solver.