Water column carried by the flux hu. Pressure comes from its gradient.
A periodic plane · three redundant labels · one moving layer
Carry a coordinate frame with the water.
Rechart it before it folds away.
A single Clebsch pair can locally encode a velocity, but its two transported scalar contours may squeeze together or become too fine for a grid. This version instead carries three ambient-coordinate labels and three conjugate weights. The redundancy lets us change the chart while preserving the visible velocity.
Wander into the live grid ↓Here B = (X,Y,Z). On a triangle mesh these are initially the three coordinates of each vertex. On this periodic square we use the coordinates of a standard embedded torus, so no label jumps across a seam.
Its differential dφ supplies the exact, curl-free part of the velocity one-form.
Three transported coefficients weight the differentials of the ambient labels.
Initially vertex XYZ. Their level sets move with the water until we deliberately rechart.
Why combine these ideas?
Shallow water gives the labels a physical job to do.
The random-field playground can show Clebsch assembly and pressure projection without choosing a time evolution. Here the labels travel with an actual layer: velocity moves them, height changes under mass flux, and the Bernoulli potential responds to gravity.
Vorticity and tracers can persist as water moves over long distances; a label-based state makes that material viewpoint explicit.
One-forms measure circulation, vectors move parcels, and the metric converts between them—useful bookkeeping before moving from a plane to a sphere or mesh.
Global harmonic periods still have to be stored or evolved. This flat example sets them to zero so the local transport can be read first.
Do not project shallow water to zero divergence.
In the random-flow lab, subtracting d p is a useful incompressible comparison. In shallow water, convergence and divergence are physical: they raise and lower the water column. Pressure acts through the evolution of φ while the continuity equation evolves h.
On a torus, the velocity state may also carry two harmonic periods. This planar lab sets them to zero; a topology-aware solver must retain and audit them separately.
Rechart the representation, not the fluid.
Transport eventually distorts any finite-resolution label grid. At a rechart time, the solver first saves the current one-form, resets B to the ambient XYZ coordinate functions, and solves for new weights λ. Height, material dye, and physical time do not reset.
The “rechart defect” below is the relative RMS change in velocity caused by this discrete solve. It should remain near machine precision immediately after a reset. This is a gauge change, not a pressure projection and not remeshing.
What this prototype actually claims
A readable numerical experiment, not yet a production surface solver.
The lab couples a conservative periodic height update to semi-Lagrangian Clebsch transport. It is useful for seeing the variables and the recharting problem. It should not be read as evidence that all of the geometric and conservation issues are finished.
Height obeys a conservative face-flux update. The Clebsch labels and dye follow the reconstructed velocity, φ receives the pressure term, and mass and representation defects are measured.
No curved triangle mesh, bathymetry, Coriolis force, wet/dry front, shock treatment, viscosity, or nonzero harmonic circulation appears in this square experiment.
A serious mesh version needs DEC/FEM mass matrices, a coupled conservative time integrator, topology-aware harmonic state, robust chart resets, and benchmark tests for energy, potential vorticity, and Kelvin circulation.
Color is Eulerian height.It is a water-column value at each fixed cell, not paint glued to a parcel.
Arrows are optional grid samples.Their anchors stay fixed while their direction and length change; they are not particles.
Dye is the material view.Select dye to watch a scalar carried by the reconstructed velocity.
Uncluttered scalar view. Choose a glyph layer to sample vectors or covectors on the fixed grid.
The careful version
Scalar channels → one-form → vector → transport → rechart.
Clebsch notation is compact because it suppresses both type conversions and representation choices. Expand them, and the numerical reason for three channels becomes much less mysterious.
φ, λ₁…λ₃, B¹…B³, h
Each channel assigns one number to every grid point. The three-component label index is separate from the surface tangent coordinates.
φ(x,y), λₐ(x,y), Bᵃ(x,y), h(x,y)dφ + ΣλₐdBᵃ
Each dBᵃ measures a tangent displacement. The weighted sum is one surface one-form.
u♭(δx) ∈ ℝu
The metric turns the measuring one-form into the arrow that transports water and labels.
ẋ = u(x,t)The crossing of two scalar foliations.
The exact piece disappears because d squared phi is zero. Each channel contributes a two-form; on an oriented surface this can also be displayed as a signed scalar density or a normal pseudovector.
Same two numbers here; different jobs.
Consumes time and produces displacement.
Consumes displacement and produces a number.
In Cartesian coordinates with the identity metric, lowering an index copies the components. On a curved or stretched mesh, the metric changes them.
The labels move; height compresses; φ pays the Bernoulli bill.
D t is the material derivative. The lab semi-Lagrangian-advects all three B and λ channels, advances h with conservative periodic face fluxes, and evolves φ by a Bernoulli equation. Weak filtering handles unresolved grid scales; recharting separately repairs a distorted representation while auditing the velocity it preserves.
- lambda and B channels are material invariants
Between rechart events, all six scalar channels move with the parcels.
- Bernoulli evolution of phi
Kinetic and pressure terms update the exact potential.
- mass continuity
Height is a density, so it changes under compression.
- reconstruct velocity
The one-form is rebuilt from the exact part and redundant label frame.
- rechart with the pseudoinverse frame
Reset the labels to ambient coordinates and refit only their weights.