3D Fluid Simulator: Smoke in a Box

A free 3D fluid simulator in your browser: a rising hot smoke plume, smoke ring cannon, colliding vortex rings, wind past a sphere and a smoke tank you can stir. The Navier-Stokes equations are solved live in 3D; rotate and zoom the smoke.

Drag to rotate · scroll to zoom
Time0simulation steps
Top speed0cells per step
Grid–
Speed of this device–per simulation step

Buoyancy: How strongly hot smoke rises (the Boussinesq approximation).
Swirl boost: Adds back small swirls the grid smooths away (vorticity confinement). Pretty, not part of the exact equations: 0 shows the plain physics.
Wind speed:
Smoke thickness:
Obstacle
Detail
Speed

3D smoke that obeys the Navier–Stokes equations

This is a three-dimensional version of the 2D Fluid Simulator. Inside a box, a solver steps the incompressible Navier–Stokes equations forward in time on a 3D grid. The smoke you see is carried along by the computed flow and rendered as a glowing volume you can rotate and zoom into. The same four steps as in 2D happen every frame: add forces (buoyancy of hot smoke, your stirring, the swirl boost), carry everything along the flow, then solve for the pressure that keeps the fluid from being squeezed (∇·u = 0) and subtract its gradient.

What to try

  • Rising hot smoke plume: warm smoke rises, rolls up into mushroom-shaped puffs and fills the box. Raise Buoyancy for a more violent plume.
  • Smoke ring cannon: a short puff of air through a round hole rolls up into a vortex ring that travels on its own. Fire several and watch the later ones pass through the earlier ones.
  • Two rings colliding: head-on rings flatten and burst outward.
  • Wind past a sphere: coloured smoke shows how the flow separates and curls into a turbulent wake behind a ball or cube.
  • Stir a smoke tank: switch to Stir and drag through layered smoke to mix it, then Orbit to inspect it from the side.

What 3D adds

In two dimensions a swirl can only spin around a point. In three dimensions vortex lines can bend, stretch and twist, which is why a smoke ring is stable but eventually wobbles and breaks up, and why real turbulence cascades into ever smaller eddies. Those effects are exactly what a 2D simulation cannot show.

How accurate is it?

It is a teaching-grade simulator. The grid is small (24 to 48 cells on the short side, the price of running 3D physics in a browser), the scheme is first order and adds a little artificial viscosity (so unlike the 2D page there is no Reynolds-number slider), and the smoke look is partly aesthetic. The solver is checked in code: smoke from a heater rises, the pressure step removes the divergence of the flow, the flow is zero inside obstacles, a wake forms behind the sphere and a smoke ring travels along its axis. For research-grade 3D results, supercomputers use billions of cells and models for the turbulence they cannot resolve.

Things people ask

  • Why is it slower on my phone? The physics runs on your device's processor. The box above shows the time per step; lower Detail if it feels sluggish.
  • Why do my smoke rings look blurry? The grid is coarse. Fine or Very fine gives sharper rings at the cost of speed.
  • Do I need a special browser? It uses WebGL2 for the 3D view, which every current browser has. Without it the page falls back to a flat top-down picture of the smoke.

Everything runs on your device; nothing is uploaded. 2D Fluid Simulator · Reynolds Number Calculator · More MES tools

Comments
Advertisement