This is the 2D companion to the 3D mantle convection simulator, solved independently rather than a flattened render of the 3D scene. It keeps the same real Boussinesq buoyancy-driven convection physics — a temperature field heated from below and cooled from above, advected by a vorticity-streamfunction velocity field — but computes and displays it through a genuinely different pipeline: a CPU finite-difference grid painted directly onto a 2D canvas, with Lagrangian tracer particles and a live flow-arrow (quiver) overlay the 3D shader-based version has no equivalent for, plus an interactive plume injector for seeding new upwellings by hand.
temperature: ∂T/∂t + J(ψ,T) = κ∇²T
vorticity: ∂ω/∂t + J(ψ,ω) = ν∇²ω + Ra·κ·∂T/∂x
stream fn: ∇²ψ = −ω (Gauss-Seidel Poisson relaxation)
velocity: u = ∂ψ/∂y, v = −∂ψ/∂x
tracers: dx/dt = u(x,y), dy/dt = v(x,y) (bilinear-sampled, RK2)
- Rayleigh number (Ra) — the ratio of buoyancy to viscous/diffusive damping. Below ≈10³ the field just conducts heat; above that, convection cells and rising plumes appear; push it past 10⁵ for chaotic, time-dependent flow.
- Click or drag on the canvas — inject a hot plume seed at that spot; the radius slider controls how wide a patch is perturbed.
- Tracers are hundreds of massless markers advected by the same velocity field the temperature rides on — they reveal the actual particle paths inside a convection cell, not just the temperature snapshot.
- Flow arrows sample the velocity field on a coarse subgrid so you can see circulation direction and strength directly, independent of the colour map.
- Nu (Nusselt number) is the ratio of convective to conductive heat transport through the top boundary; Nu = 1 means the field is purely conducting, no convection yet.
In the real Earth this same buoyancy-driven overturning of solid but ductile mantle rock — heated by the core, cooled at the crust — is the engine behind plate tectonics, continental drift and volcanic hotspots such as the plume that built the Hawaiian island chain.