Bluff-body flow at Mach 2 in 3D, compressible Navier–Stokes, WebGPU. Uniform inflow ρ = 1, e = 1, vx = 1 from the left. A cubic body of side 0.25 N centred in the domain acts as a hard no-slip wall (frozen ρ, e; zero momentum). Fluid cells adjacent to the body see a zero-momentum / matching-ρ-e ghost.
Display: mid-z slice (xy plane through the centre of the box). Colour = density (blue low → white mid → red high), tuned to ρ ∈ [0.5, 1.5]. Body cells overlaid in yellow.
Equations:
∂ρ/∂t + ∇·(ρv) = 0;
∂(ρv)/∂t + ∇·(ρv⊗v) + ∇p = ∇·σ;
∂e/∂t + ∇·(e v) + p∇·v = 0;
p = γe, γ = 0.2; ν = 0.3 h.
Grid: 400³ = 64 000 000 cells. State packed as 8 floats per cell
(5 data: ρ, e, mx, my, mz; + 3 pad);
ping-pong storage buffers of 1.91 GiB each. Requires
maxStorageBufferBindingSize ≥ 2 GiB from the adapter — at
the absolute ceiling of what Apple Silicon / desktop dGPUs expose.
M4/M3 Pro/Max and recent NVIDIA/AMD desktop typically pass; everything
else will refuse with a clean error. Total GPU memory footprint ≈ 4.3 GB
(two state buffers + mask + extracts).