loading...
running...
How to use
The 3D scene shows the computed water surface over a Blender-built coast. Drag to orbit, wheel to zoom, use the camera buttons (Harbour, Town, Beach, Overview, Lighthouse). The map in the panel shows the same run from above: houses turn red when water reaches them and the orange overlay is the maximum flood depth. Space pauses, R restarts. Changing any wave or coast setting restarts the run.
What to try. (1) Run Leading trough and watch the harbour drain and refill. (2) Compare Leading trough with No breakwaters: read the peak inside the harbour (G3) and the maximum current at the mouth. (3) Run Long train, 290 s and then Short train, 120 s and compare the harbour amplification and the current at the mouth. (4) Big event, high tide and the flooded-land graph. (5) Switch building drag off and compare how far inland the overlay reaches.
Models and baked PBR textures made in Blender; Three.js r160 renders the scene and the water surface is computed live from the solver. Quality is High by default, with a Low toggle (or ?q=low).
The science
What is simulated. A tsunami wave arrives from the west across 25 m deep water and meets a bay with a town, a harbour with a narrow mouth protected by two rubble-mound breakwaters, a headland with a lighthouse and a gently rising coastal plain. The water is solved on a 256 x 160 grid of 12 m cells with the nonlinear shallow-water equations in two dimensions:
∂h/∂t + ∂(hu)/∂x + ∂(hv)/∂y = 0
∂(hu)/∂t + ∂(hu² + g h²/2)/∂x + ∂(huv)/∂y = -g h ∂z/∂x - g n² |U| u / h1/3
(and the same for hv in y). h is depth, (u, v) the depth-averaged velocity, z the bed and n Manning roughness. The terrain in the 3D scene is built in Blender from exactly the same height array the solver uses, so the visible beach, harbour basin and quay are the computed ones.
Numerics. Finite volumes with a Rusanov flux and hydrostatic reconstruction (Audusse et al. 2004): the lake at rest stays at rest to rounding error, depths never go negative and cells wet and dry as the water advances. The west boundary is a Flather open condition that injects the chosen incoming wave and lets reflected waves leave; north and south are transmissive; the inland edge is a wall far above any flooding. The breakwaters are rows of cells raised to 3.5 m: they block the flow and overtop when the water rises above the crest. First-order upwinding smears very sharp fronts a little, so peak heights of short waves are slightly under-estimated.
Harbour response. A basin of length L and depth h that is open at one end has a quarter-wave mode at T = 4L / √(g h); with L = 550 m and h = 6 m that is about 290 s. The breakwaters now leave a narrow mouth of about 60 m between the tips (it was 180 m in the first version), so the basin fills and drains through a throat and the current there is strong: in our test runs (0.8 m, 4-cycle train) the peak speed at the mouth was 3.4 to 3.5 m/s. The resonance is still only weak. Four cycles are too short to pump the basin up and the sea outside is nearly as shallow (7 to 8 m) as the harbour, so there is little impedance contrast: the peak inside the harbour was 1.86 m at T = 120 s, 1.86 m at 290 s and 1.88 m at 400 s, against 1.3 m offshore (incoming wave plus its reflection from the shore). With a longer 12-cycle train of 0.5 m the peak inside was 2.4 m at T = 150 s, 2.2 m at 250 s, 2.2 m at 350 s and 2.4 m at 450 s, a broad rather than sharp response. The readout "harbour amplification" lets you compare periods and the No breakwaters preset yourself.
Why a trough can come first. A thrust fault lifts one side of the seabed and lowers the other. The wave moving toward the coast on the lowered side starts with a trough, so the sea retreats before the crest arrives (the N-wave preset). The size of the retreat and the arrival time depend on the geometry, not on how violent the event feels.
Honest simplifications. The incoming wave is prescribed at the boundary rather than computed from a source; the model covers a 3 x 1.9 km window, so there is no refraction or edge-wave build-up from the wider coast; vertical heights are drawn 2x exaggerated; dispersion, turbulence, sediment and debris are ignored. Buildings are not geometric obstacles: each house footprint cell gets a high Manning roughness (n = 0.12) as a rough drag model (switchable), and a house is marked as reached when the computed depth at its position exceeds 0.3 m; no damage or casualties are modelled. Boats are floats that bob and drift with the local current and are not part of the physics. Educational model only: it is not a hazard map of any real place.