← Direction Field Lab
A GUIDED WATER PATHClebsch fluids on surfaces

Eight lessons · one thread of water

Begin with a loop.
End with water
moving on a surface.

Imagine following a patch of ocean as it travels over a curved planet. Which quantities move with the water? What does a loop remember? What can local vorticity never tell you about a current that circles the globe? This course develops the language for those questions before assembling a small shallow-water model.

Why shallow water?

A modest equation with a surprisingly large world.

When horizontal distances are much larger than the water depth, a three-dimensional fluid can often be approximated by a moving surface layer. That idea appears in ocean and coastal models, tides and tsunamis, atmospheric layers, and films flowing over curved objects.

  1. 01
    Depth can change.

    Horizontal convergence raises the free surface; divergence lowers it. This is why we cannot simply project horizontal velocity to zero divergence.

  2. 02
    Geometry can matter.

    On a planet or a curved mesh, gradients, areas, circulation, and transport all depend on the surface metric.

  3. 03
    Topology can survive locally invisible.

    A current may wind around a periodic domain even where its vorticity vanishes. Those harmonic periods belong in the state.

This course is a foundation, not an operational ocean model. Rotation, bathymetry, coastlines, forcing, viscosity, wet/dry fronts, and robust large-scale numerics are later layers. The playground keeps them out until the representation and conservation laws are legible.

ASSUMEDVector calculus, linear algebra, and ODEs

No prior differential geometry is required. The first unit builds the necessary exterior-calculus language from measurements.

NOT ASSUMEDThat Clebsch variables are coordinates

They are nonunique scalar fields used to factor a velocity one-form. They become local coordinates only where their differentials are independent.

ENDPOINTA solver architecture, not one magic formula

Students should know which state is transported, which elliptic problem is solved, and which harmonic data topology leaves undetermined.

NOTATION GUARDRAIL
φ

Clebsch velocity potential. It is not the pressure.

p

Euler pressure or a constraint multiplier.

ηk

Harmonic basis one-forms carrying global periods.

h

Water-column depth in the shallow-water unit.

UNIT I · READ THE FIELD

From arrows to circulation.

Do not begin with three mysterious potentials. First learn what a velocity vector does, what its metric-dual one-form measures, and what exterior differentiation extracts.

vector to covector to vorticity
  1. 01
    FORMS, d, AND THE HODGE STAR

    What kind of object lives where?

    Distinguish vertex scalars, edge-integrated one-forms, face-integrated two-forms, and metric-dependent conversions.

    Exit test: identify the type and integration domain of every variable.
    OPEN LAB →
  2. 02
    THE PHYSICAL PROBLEM

    What must a fluid representation remember?

    Separate velocity, circulation, vorticity, and incompressibility before comparing velocity, vorticity, and Clebsch states.

    Exit test: explain why circulation is not the same datum as pointwise vorticity.
    OPEN LESSON →
  3. 03
    CLEBSCH IN ACTION

    How do α, β, and φ share the work?

    Carry material labels, make the covector visible, and assemble the local velocity one-form. Leave the global obstruction for the topology unit.

    Exit test: derive du♭ = dα ∧ dβ and state what dφ cannot change.
    OPEN LAB →
UNIT II · FIND WHAT LOCAL VORTICITY MISSES

Boundaries, holes, and periods.

Stokes determines circulation around patch boundaries. It does not determine circulation around loops that bound no patch. That distinction becomes solver state.

Hodge decomposition with topology
  1. 04
    DISK → ANNULUS

    When does circulation have to be vorticity?

    Use a movable Stokes loop, then remove the center and separate vortical circulation from one harmonic degree of freedom.

    Exit test: predict which combination of inner and outer circulation changes curl.
    OPEN LAB →
  2. 05
    FLAT TORUS

    Which two numbers does vorticity forget?

    Hold local vorticity fixed while changing the two real harmonic periods and the resulting particle winding.

    Exit test: explain why pressure projection cannot erase a harmonic period.
    OPEN LAB →
UNIT III · SEPARATE KINEMATICS FROM DYNAMICS

Prescribe and project before evolving.

A beautiful moving field is not automatically a fluid solution. The random-field lab isolates representation and pressure projection so the next unit can introduce physical time evolution without mixing the two ideas.

candidate minus exact correction
  1. 06
    RANDOM SURFACE FIELDS

    What can we learn without claiming dynamics?

    Combine intrinsic Laplace–Beltrami modes with temporal Perlin coefficients; compare raw and projected Clebsch fields on several surfaces.

    Exit test: explain what projection changes, what it preserves, and why this is still a kinematic experiment.
    OPEN LAB →
UNIT IV · LET DEPTH AND GEOMETRY EVOLVE THE STORY

From incompressible flow to shallow water.

Do not project horizontal divergence to zero once it is responsible for changing layer depth. Preserve the representation lessons while replacing the constraint.

depth-weighted continuity
  1. 07
    CONSERVATIVE BASELINE

    Which audits survive a change of variables?

    Test a linear pressure-wave model, its gradient/divergence adjoint pair, mass, energy, CFL behavior, and a deliberately separate passive dye.

    Exit test: explain why shallow-water divergence changes h instead of being projected away.
    OPEN LAB →
  2. 08
    CLEBSCH SHALLOW WATER

    How do label transport and height flux couple?

    Follow the scalar → covector → vector → flux pipeline and keep the Clebsch and continuity equations conceptually distinct.

    Exit test: identify which variables are material, which are diagnostic, and which elliptic solve remains.
    OPEN LAB →

Places to pause

A few notebooks to keep beside the experiments.

These pages are here when a symbol, a mesh operator, or a research connection deserves more time. They are detours, not prerequisites.

ORIENTATIONHow should a fluid remember?

Compare backtracing, Stable Fluids, APIC, Clebsch transport, and conservative updates before choosing a student solver architecture.

BACKGROUND NOTEBOOKClebsch, exterior calculus, and nearby work

Return when a type, discrete storage location, gauge freedom, or research connection deserves a slower explanation.

IMPLEMENTATIONEditable sparse energies

Explore the optimization and differentiation infrastructure used elsewhere in the lab.

WORKFLOWRun, fork, and publish

Use this when moving from a browser lesson to a student code project.