Blog / Studies / Graphics / G.04

Fluid Simulation.

Stable Fluids-style incompressible gas simulation on an Eulerian grid.

← Graphics index
Stable Fluids simulation
Fluid-simulation study output

G.04 / Simulation

Study overview.

An incompressible gas-simulation study based on the Stable Fluids method and an Eulerian grid.

SimulationEulerian gridProjection

Notes / G.04

Advection moves; projection makes it incompressible.

In one sentence

A Stable Fluids solver advances velocity through advection and forces, then projects the field so that it satisfies the incompressibility constraint.

01 / Mental model

Store motion in space, not on particles.

An Eulerian solver stores velocity and density on a fixed grid. At each time step, the field carries quantities through the domain, external forces change the motion, and pressure removes unwanted compression.

02 / Core mechanism

Split a difficult equation into manageable stages.

∂u/∂t + (u · ∇)u = −∇p + ν∇²u + f    with    ∇ · u = 0

Semi-Lagrangian advection provides stability; the pressure projection solves a Poisson problem and subtracts its gradient to produce a divergence-free velocity field.

03 / Implementation

Make every stage testable.

  • Backtrace through the velocity field and interpolate the previous values.
  • Add forces and apply consistent boundary conditions.
  • Solve pressure from the velocity divergence.
  • Subtract the pressure gradient, then advect density for visualization.

04 / Evidence

Measure the constraint behind the motion.

Check divergence after projection, not only whether the smoke looks fluid. Vortices and coherent transport indicate useful motion; excessive blur exposes numerical diffusion, while boundary leaks point to inconsistent edge handling.