Hello
The problem is that you are applying 2 conditions at each boundary, which could be wrong.
Actually, depending on the regime of the flow, the code needs 0, 1 or 2 conditions;
for an inlet: if subritical: 1 condition (discharge or elevation)
if supercritical: 2 condition (discharge+elevation)
for an outlet: if subcritical : 1 condition (discharge or elevation)
if supercritical: 0 condition
with my best regards
Riadh