The chamber (plan area A = L·B) fills through a sluice of effective area a under the head difference d between the upper pound and the chamber: Torricelli flow Q = Cd·a·sqrt(2 g d), so dz/dt = Q/A and the head falls as sqrt(d) = sqrt(H) - k t / 2, k = Cd a sqrt(2g)/A.
The fill time is T = 2A(sqrt(H) - sqrt(eps)) / (Cd a sqrt(2g)); the gates open when the levels agree within eps = 2 cm. Side ponds store water: with n ponds of large area the lockage draws only 1/(n+1) of the water from the upper pound (saving n/(n+1)); with finite ponds (here 1.5 A) the stage-by-stage closed form is used.
Simplifications: constant discharge coefficient, no boat surge, no wave motion in the chamber, no gate opening ramp. This is the 2D cross-section companion of the 3D lab and imports the same hydraulics module, so both pages give identical numbers.