loading...
Starting.
running...
How to use
Pick a preset, then drag forcing period / T1 slowly across 1.0 and 0.33 and watch graph 2: the head level jumps when the forcing hits a natural period. Try: (1) set friction to 0.02 and T = T1; (2) switch to Single surge pulse and press Kick: the ringing contains periods T1, T1/3, T1/5; (3) add a width taper and compare the head level with the flat basin; (4) hover over the plan view for the level, depth and envelope at any point. Drag to orbit, wheel to zoom. Space pauses, R resets. The page works on phones and in embeds (?embed=true).
The 3D page uses a Blender-built harbour (quay walls, bollards, lighthouse, breakwaters, slipway, baked PBR textures) and moves the water surface, the boats and the gauge pole with the same solver.
The science
A harbour or bay is an open-ended water tank. Water sloshes in it at natural periods set by its geometry, and when the tide or a swell arrives at the same period it pumps the sloshing up, exactly like pushing a child on a swing in time. This lab solves the one-dimensional linear shallow-water (long-wave) equations along the basin axis x (mouth at x = 0, closed head at x = L):
∂η/∂t = −(1/b) ∂(b h u)/∂x ∂u/∂t = −g ∂η/∂x − r u
with level η, depth-mean current u, depth h(x), width b(x) and a linear loss rate r that lumps bed friction and the energy radiated back out of the mouth. At the mouth the level is the sea outside, η(0,t) = a sin(2πt/T); at the head the wall stops the water, u(L) = 0. A staggered grid with a forward-backward (symplectic) time step advances 240 cells at the CFL limit.
Natural periods. For uniform depth the waves travel at c = √(g h). A basin open at one end and closed at the other holds a quarter-wave (Merian's formula):
Tn = 4L / ((2n − 1) √(g h)), n = 1, 2, 3 ... so T1 = 4L/√(g h), T2 = T1/3, T3 = T1/5
Forced response. With the loss, the wave number is complex, k2 = (ω2/c2)(1 − i r/ω), and the steady level along the basin is
η(x) = a cos(k(L − x)) / cos(kL), gain at the head = a / |cos(kL)|
Without friction the gain at T = T1 would be infinite; the loss rate caps it at about Q ≈ 2/π·(ω1/r) times a few. The green line in graph 2 is this formula; the simulated envelope must sit on it.
Why bays amplify tides. The Bay of Fundy is about 270 km long and 70 m deep, so T1 is near 11 hours, close to the 12.4 h M2 lunar tide. Narrowing width (funnelling) and shoaling depth add further amplification through Green's law, η ∝ b−1/2 h−1/4, which is why the bed and width controls are provided. Small harbours ring with periods of a few minutes; long swell groups and boat wakes at that period cause the surging that snaps mooring lines.
Honest simplifications. The motion is linear and one-dimensional along the axis: no cross-basin modes, no Coriolis force, no nonlinear steepening or wave breaking, and the sea outside is held at a prescribed level so the real radiation damping and mouth end-correction are folded into one loss number. The preset names are real places but the numbers are illustrative, not a forecast of any real harbour. The depth profiles other than the flat bed have no closed-form comparison; for them the lab relies on the solver, which is checked against the analytic uniform case. Not engineering advice.