ONLINE --:--:--
LIVE 2026-03-15

FLUID-SIM-V3

Stable-fluids Navier-Stokes solver running on the GPU via WebGL compute shaders.

WEBGLGLSLSIMULATIONINTERACTIVE
▶ LAUNCH FULLSCREEN APPLICATION
// CONTROLS
MOUSE DRAG — inject velocity
SCROLL — adjust viscosity
SPACE — reset field
C — cycle color maps
P — pause / resume
────────────────────────────────────────────────────────────

ABOUT THIS SIMULATION

A real-time fluid dynamics simulation using the stable-fluids method (Stam, 1999). All computation happens on the GPU via WebGL 2.0 fragment shaders — the CPU only handles input events.

The simulation runs at full resolution (matching your screen’s pixel density) at a sustained 60fps on any modern GPU.

METHOD

  1. Advection — Semi-Lagrangian advection with bilinear interpolation
  2. Diffusion — Jacobi iteration (8 passes)
  3. Pressure solve — Gauss-Seidel with 20 iterations
  4. Projection — Divergence-free velocity field via curl

REFERENCES

Stam, J. (1999). Stable fluids. SIGGRAPH ‘99.