Joule's experiment, compressible Navier–Stokes — direct CPU port.
A faithful vanilla-JS/Canvas translation of the original p5.js sketch:
identical in-place (Gauss–Seidel) sweeps, the same per-cell update of
momentum / density / internal energy (including the viscous-heating term),
the same two-chamber + channel geometry and parameters
(N=100, γ=0.1, ν=0.01h, dt=0.05h, μ=0.2), 10 substeps/frame.
No external library. Blue dots trace fluid particles; the curves at the
bottom are channel/mid cross-cuts of density, pressure, velocity, temperature.