loading...
running...
The science
What is a rip current? Waves carry mass towards the beach. That water has to get back to sea. Where the sandbar is shallow, waves break early and hard and pile up more water against the beach; where the bar is cut by a channel, waves break later and pile up less. The resulting alongshore difference in wave set-up pushes water sideways along the beach (feeder currents) into the channel, where it escapes as a narrow offshore jet: the rip current. SI units throughout.
1. Wave transformation along each cross-shore line. Regular waves of height H and period T move in shallow water at c = √(gD), D = h + η (still depth plus set-up). Refraction follows Snell's law and the wave energy flux is conserved until the waves break:
sinθ / c = const, E cg cosθ = const, E = ρ g H² / 8, cg = c
For normal incidence this gives Green's law H ∝ D-1/4. Breaking is modelled as saturation: wherever the shoaled height exceeds Hmax = γ D (breaker index γ about 0.78), the wave is cut back to γ D and the lost energy is the breaking dissipation. Behind a bar the depth increases again and the waves reform, then break again on the beach.
2. Radiation stress and wave mass flux. Waves carry momentum. In shallow water (n = 1):
Sxx = E (cos²θ + 1/2), Sxy = E sinθ cosθ, Syy = E (sinθ² + 1/2), Qw = E / (ρ c) (cosθ, sinθ)
The divergence of these stresses is a force on the water, strongest where H falls quickly: the surf zone. Qw is the shoreward mass flux hidden in the wave motion.
3. Depth-averaged flow. The current (u, v) and surface level η obey the nonlinear shallow-water equations with wave forcing, bed friction and mixing (finite volumes on a staggered grid, 96 × 40 cells, periodic along the beach):
∂η/∂t + ∇·(Du + Qw) = 0
∂u/∂t + (u·∇)u = -g∇η - (1/ρD) ∇·S - cf |Ue| u/D + ν∇²u
|Ue| combines the current with the wave orbital velocity 0.4 H √(g/D), so waves stir and slow the flow even in still water. At the shore nothing leaves, so at steady state the net volume flux across any cross-shore line is zero: all the water pushed in by waves has to come back, as undertow and as rips.
4. Wave set-up. On a plane beach of slope tanβ with saturated breaking (H = γ D), balancing the pressure gradient against the radiation-stress gradient gives a linear rise of the mean level towards the shore (Bowen, Inman and Simmons 1968):
dη/dx = K tanβ, K = (3γ²/8) / (1 + 3γ²/8) (about 0.27 for γ = 0.78)
The set-up reaches about 20 to 40 cm at the shoreline in the default run. A bar makes the waves break earlier at the bar than in the channel, so the set-up is higher behind the bar: that is the pressure head that drives the feeders.
5. Why swimmers should go sideways. The jet is only about as wide as the channel (10 to 30 m) and is surrounded by water moving towards the shore. A swimmer at 0.5 to 1 m/s cannot swim against a 1 m/s jet, but moving parallel to the beach leaves the jet within a few seconds. The experiment integrates the Lagrangian velocity of the frozen current for three strategies: staying calm and floating, swimming straight in, and swimming parallel to the shore. In reality: stay calm, do not fight the current, float or swim sideways, then in towards the beach, attract attention, and swim only where lifeguards allow.
Checks (run in the page). (1) Green's law for the shoaling ratio, (2) Snell's law at two depths, (3) the set-up slope of a separate planar-beach run against the closed-form K tanβ (agreement within a few percent), (4) the net cross-shore volume flux of the live run vanishes (closed shore).
Simplifications. Regular, monochromatic waves (real rips pulse with wave groups and swing in speed). Wave transformation is calculated line by line across the beach, with no sideways refraction by the bar and no wave-current interaction. Currents are the same at all depths (no vertical undertow profile), no sediment motion or tide. Saturated-breaking dissipation and the friction coefficient are simple closures; the absolute speeds depend on them, so read them as typical orders of magnitude (real rips are often 0.3 to 1 m/s with extremes above 2 m/s). The risk label compares peak rip speed with the chosen swimming speed and is illustrative, not a safety rating. Always follow local lifeguard advice and flags.