The contraction, enlargement, step and fall are all treated in subroutine
contraction.c. For these type of elements the width 'b' and the angle
'' may differ upstream and downstream, they are labeled bup, bdo,
thetaup and thetado. The length of the element can be given explicitly by the
user, or if it is zero it is calculated from the coordinates of nup and
ndo. This length is used to calculate a contraction or expansion angle
. Based on this angle a head loss coefficient is calculated and the
earth acceleration
is appropriately corrected. For the theory behind this
the reader is referred to Section 6.6.5.
For a frontwater curve the specific energy is calculated in nup. Then, using subroutine henergy.f a supercritical depth is calculated corresponding to the same specific energy and discharge for the downstream geometry of the element (cf. Section 6.6.5) and defined as hdo. Two cases arise:
For a backwater curve the specific energy is calculated in ndo. Then, using subroutine henergy.f a subcricital depth is calculated corresponding to the same specific energy and discharge for the upstream geometry of the element