A passive scalar field is advected by a non-divergent 3D velocity field. Advection uses a semi-Lagrangian scheme with RK2 backtrace and trilinear interpolation, so the integration is unconditionally stable and the scalar's extrema are bounded by their initial values up to interpolation diffusion.
All velocity fields are constructed from a vector potential A, with v = ∇ × A, so ∇·v = 0 by construction.
- Gaussian vortex (axis ẑ): A = exp(-r²/2σ²) ẑ, with the full 3D radius r² = x² + y² + z². Purely xy-rotational (vz = 0 everywhere) but the circulation strength decays in z, so the flow is a localized blob rather than a z-invariant tube.
- Vortex ring: A = exp(-((ρ-r₀)² + z²)/2σ²) φ̂, where ρ is the cylindrical radius. The familiar smoke-ring topology.
- Hill's spherical vortex: the classical exact inviscid solution. Closed streamlines fill a sphere of radius a; the exterior is at rest.
- ABC flow: v = (A sin z + C cos y, B sin x + A cos z, C sin y + B cos x). The Arnold–Beltrami–Childress flow — three-periodic, chaotic, with no closed streamlines for generic A, B, C.
Display can show the scalar field directly, or its perturbation from the initial condition.