Saltating grains (ballistic) Reference stakes
wind → downwind (+x)

Dune Cross-Section: Exner Sand-Continuity Model

This is the 2D cross-sectional counterpart to the 3D barchan dune simulator: instead of sliding a pre-shaped dune body downwind at a scripted speed, it solves the real continuum sand-transport model geomorphologists use to explain why dunes migrate and hold their asymmetric shape at all. Wind accelerates over the gentle windward rise, separates into a recirculating eddy in the dune's lee, and the resulting shear-velocity field drives a Bagnold sand flux that needs a finite "fetch" (the saturation length) to reach its equilibrium value. Wherever that flux is converging, sand piles up; wherever it diverges, the bed erodes — a mass-conserving continuity equation (the Exner equation) updates the height profile every step, with slip-face avalanching enforcing the 34° angle of repose. The dune's forward creep and its measured celerity are genuine outputs of this coupled system, shown alongside the classical closed-form Bagnold estimate for comparison, while individual grains are drawn following true ballistic trajectories under gravity.