Breaking waves that strike a beach obliquely generate a longshore current that transports sediment along the shore,
while the swash zone (wave run-up) erodes sand from the exposed dune face into the surf.
V_longshore ∝ E_wave · sin(θ)·cos(θ)
erosion_rate = k·E_wave / cohesion
dune_height(t+dt) = dune_height(t) − erosion_rate·dt
- Wave energy — scales wave height/run-up, directly driving erosion rate and sediment mobilization.
- Wave approach angle — angle of incoming waves to shore normal; peaks longshore drift near 45°.
- Sand cohesion — resistance of the beach material to being washed away; higher values slow erosion.
- Pause / Reset beach — freeze the simulation or restore the dune profile to its initial shape.
This longshore-drift and swash-erosion model underlies real coastal engineering decisions about groynes,
beach nourishment, and where sediment naturally accumulates or is lost along a shoreline.