A wear can only be used upstream of a channel. It corresponds to a sluice gate
with an infinite value for ha.
For a frontwater curve:
- if hup=0, the discharge Q must be given. The value of hdo corresponds to the critical depth
for Q. From this hup can be determined.
- else if hup
0 and Q=0, the discharge can be calculated from hup
and the knowledge that critical conditions are reached at ndo.
For a backwater curve:
- if hup is a boundary condition Q* can be calculated based on hup and hdo
(hdo is known since the curve is a backwater curve). If this value
matches the value Q used for the backwater curve the solution is found. Else,
restart the backwater curve calculation with (Q+Q*)/2 until convergence.
- else the discharge was given at the sluice gate. From Q and hdo
the value of hup can be determined.