Long waves such as tsunamis or storm surges are much longer than the water is deep, so the depth-averaged shallow-water (Saint-Venant) equations describe them: mass and momentum conservation for the depth h and the current u along a line from the open sea, over the beach, into the town.
h_t + (h u)_x = 0
(h u)_t + (h u^2 + g h^2/2)_x = -g h z_x - g n^2 u|u| / h^(1/3)
z(x) = bed height, n = Manning roughness (sand 0.025, built-up 0.04, forest belt 0.06-0.12)
finite volumes, HLL flux, hydrostatic reconstruction at every cell face
(keeps a lake at rest exactly at rest and handles the shoreline moving over dry land)
open sea boundary: Riemann invariants u +/- 2 sqrt(g h) - the imposed wave enters,
reflections from the beach leave; incoming pulse: eta = A sin^2(pi t / T), twice
runup: highest ground reached by water; reach: distance of that point from the still-water shoreline
- Shoaling and bore - the wave slows and grows as the depth falls, steepens into a bore, and the front runs up the beach; a longer period means more water per wave and a farther reach.
- Seawall - modelled as a thin step in the bed; it blocks the flood until the wave level passes its crest, then water spills over like a weir and the wall mainly delays and thins the flood. Find the crest height at which the town stays dry for this wave.
- Vegetation - a belt of trees raises the Manning roughness and drains energy from the current; it shortens the reach and slows the flow, but does little against a very large wave. The model has no debris, wave breaking or tree failure.
- Same solver in both pages - one shared physics module; the checks run live: a dam break against Ritter's exact solution, a lake at rest, volume conservation and refinement of the grid.
- Honest simplifications - one dimension (no spreading or channelling by streets), no breaking-wave physics or dispersion, no sediment or scour, first-order scheme, depth-averaged friction only, buildings act only as extra roughness (no blockage), an invented beach and town, vertical scale exaggerated in the pictures. The results are a teaching illustration, not a hazard map and not a model of any real event or place.