Engineering
Canal lock: lifting a boat with water
Fill and drain a lock chamber, equalise the water levels and open the interlocked gates to move a boat between reaches.

Try this
Fill the chamber to the upper reach, then request the upper gate. Close the gate before draining. The boat follows an opened gate.
The model and its limits
Single well-mixed chamber with an orifice-flow balance. Gate interlocks require matching levels. No waves, gate loads or detailed hydraulic CFD.
Equations used in the module
Equations A dh/dt = Q_in - Q_out Q = C_d a sqrt(2 g |delta_h|)


