Governing equations
Q = Cd Ao α √(2 g Δh)
Approximate orifice discharge (m³/s). The head Δh is the instantaneous difference between upstream and chamber water levels.
dH/dt = (Qorifice + Qpump + Qrain) / Ac
Chamber level rate (m/s), integrated at a fixed 1/120 s step.
p = ρ g h · Fb = ρ g V
Hydrostatic gauge pressure (Pa) and Archimedean buoyant force (N).
draft ≈ m / (ρ L B) · P = ρ g Q H / η
Rectangular-hull draft approximation (m) and pump hydraulic power (W).
Assumptions & honest limits
The lock chamber and reservoirs have constant horizontal areas. Water is treated as incompressible; water density varies approximately with temperature near atmospheric pressure. The culvert uses a single discharge coefficient and a quasi-steady Torricelli relation.
The pump is idealised as a constant-flow source with a fixed efficiency. The boat is represented by a rectangular displacement estimate and a simple wind-drift model; this is not a naval-architecture stability solver.
Gate stress is an instructional risk indicator, not a structural finite-element result. Waves, turbulence, sediment, leakage, changing channel geometry and cavitation are omitted. Analytic graph line holds the initial head constant, so it is an approximate reference, not a second solver.
Energy note: pump power is hydraulic output divided by assumed efficiency; motor transients and electrical losses beyond that factor are not modelled.
<!--credits-->