
Can a genuine computational fluid dynamics solver run at interactive frame rates inside a browser tab? Web-LBM is a 2D wind tunnel built on the Lattice Boltzmann Method: a C engine compiled to WebAssembly, a zero-copy WebGL2 rendering pipeline, a turbulence model, and multithreading, all served from a 100 % static page.

How do you turn a textbook flocking model into a simulation that scales to tens of thousands of agents and renders like a fluid? This case study walks through the boids algorithm, four progressively faster solver backends benchmarked side by side (up to about 330 times faster than naïve Python), and a GPU visualization engine built with ModernGL.