Sort algorithm for the reaches of the loop before the steady flow computation - Initial solution

An initial discharge value is chosen in each reach of the loop, compatible with the discharge continuity at the nodes, using for example a discharge division proportional to the mean cross area of the reach (reach volume at the overtopping bank elevation divided by its length).

Then, the backwater curve is computed in each reach, in sequence and following the above described order (Cf. Classification of reaches). The water elevation at a distributory node (boundary condition for the upstream reach) is taken as the average computed elevation of the downstream reaches starting from this node.

For a given portion of the reach n°i, defined by two sections, the Zij elevation (in the upstream cross section n°j) is to be computed, knowing the Zij+1 elevation (in the downstream cross section n°j+1) and the Qij discharge flowing through the cross section n°j.

This is done by solving (numerically) the backwater equation that can be written as:

$f(Z^{i}_{j}, Z^{i}_{j+1},Q^{i}_{j}) = 0$ [1]