Composition bench — compose, collapse, dssCollapse

Fields stack. compose sums flows, and the sum of divergence-free fields is divergence-free with the sum of their potentials — so a vortex ring, a strained column and a broadband mode sum can be added in any combination and everything downstream (obstacles, potential bakes, the gradient diagnostics) still holds exactly. Wrapping the result in collapse or dssCollapse multiplies velocity by A(t) and lengths by L(t), which by the chain rule scales the divergence by A/L and therefore leaves zero at zero. Toggle the layers and watch the number.

A zero on its own proves nothing, so the readout is a two-column table: the stack you switched on, and beside it a control — the field u = c·x, which has divergence 3c everywhere and no vector potential at all, measured by the identical probe every frame. Press source ✗ to fold that control into the stack and the left column jumps to meet the right. The separation line is the ratio of the two: between 8·10¹⁴ and 4·10¹⁵ for every solenoidal combination of the other three layers under every warp, and of order ×1 the moment the source layer is in.

helix-noise · compose + warp
—
layers warp

Two probes, not one. ∇·u analytic is the trace of sampleGrad, which every layer answers in closed form; ∇·u FD is a central difference on the sampled velocity and trusts no gradient code at all. Both are reported as a worst-case ratio |∇·u| / (|∂ₓuₓ| + |∂ᵧu_y| + |∂_zu_z|), so they are dimensionless and survive the warp multiplying everything by A/L. The probe step slider is the second thing you can break. On the full solenoidal stack the finite-difference number reads 8.8e-1, 3.4e-3, 1.2e-6, 1.2e-8 at h = 10⁻²…10⁻⁵ — the last decade is exactly the O(h²) two-decades-per- decade of truncation, and the steeper fall above it is the ring's window, which is only C² at the edge of its support, so a wide stencil straddling that seam reads an error the field does not have. The control's 1.0 does not move at any h, because that one is not an error, it is the divergence. At h = 10⁻² the truncation is large enough that the probe genuinely cannot separate the two, and the row turns amber to say so: a limitation of the probe, printed rather than hidden.

Composition creates helicity. A lone ring has u·ω ≡ 0 — its velocity is poloidal, its vorticity azimuthal, orthogonal by construction — so it renders grey here, exactly as in rings.html. The u·ω rms block splits the composed helicity into the part the layers brought with them (Σ parts) and the part that exists only because they were added together (cross). With one layer on, cross is identically 0. Switch on ring and column and it reads 1.6e+01 against a Σ parts of 3.3e-01 — a factor of fifty. Essentially all of the helicity in the sum is in the cross term u₁·ω₂ + u₂·ω₁, and here it is almost entirely u_column·ω_ring: the column's swirl is azimuthal and so is the ring's vorticity, so the two line up exactly where the ring's velocity could not. That is a property of the sum, not of the parts, and it is measured here rather than asserted — it is also what puts colour on the ring cores in the picture, which are grey when the ring is alone.

u·ω > 0 u·ω < 0 zero to roundoff — a ring alone core guides
—