Playground/physics

Interactive Fluid Dynamics & Smoke

Real-time Navier-Stokes fluid dynamics. Drag your mouse to swirl neon dye, create vortices, and watch mesmerizing smoke diffusion.

Scientific Foundations & Exploration

Navier-Stokes Computational Fluid Dynamics in Real Time

This simulation numerically solves a discrete formulation of the Navier-Stokes equations for incompressible fluid flow on a two-dimensional grid.

The solver computes three core mathematical phases per frame: Advection (transporting velocity and density along the vector field), Diffusion (viscous momentum dissipation), and Projection (solving the Poisson pressure equation to enforce mass conservation and zero divergence).

Moving your mouse injects impulse velocity and colored dye into the velocity field, yielding organic, swirling vortices.

Interaction and Exploration Guide

  • Click and sweep across the screen at varying speeds to observe laminar flow transitioning into turbulent eddies.
  • Draw tight circular motions to generate coherent vortex rings and observe conservation of angular momentum.
  • Allow the canvas to settle to see how viscosity gradually dissipates kinetic energy into equilibrium.

Scientific and Industrial Relevance

Computational Fluid Dynamics (CFD) powers modern aerospace design, automotive drag optimization, climate and weather forecasting, and Hollywood visual effects rendering smoke, fire, and water.

Other Simulations

Need productive tools?

Explore our library with over 40 free online utilities.

Browse Tools