UFSF_prismatic_y(): height of a prismatic open-channel.

About:
Calculate the uniform flow height in a prismatic open-channel.

Channel sections considerations:

  • for a triangle section, b = 0.0
  • for a rectangular section, ml = mr = 0.0


Module: UniformFreeSurfaceFlow
Function:
UFSF_prismatic_y(q, n, s, b, ml, mr, maxerror, maxloop)
Definition of variables:
  • q, flow - m3/s;
  • n, Manning coefficient;
  • s, slope, m/m;
  • b, channel bottom, m/m;
  • ml, slope of left embankment of the channel (1/ml);
  • mr, Slop of the embankment of the channel (1/mr);
  • maxerror, maximum "y" error between two iterations before stop, m;
  • maxloop, maximum number of loops.

Sample code
from UniformFreeSurfaceFlow import *

q = 5.0 #(m3/s)
n = 0.013333
s = .001 #(m/m)
b = 3.0 # (m)
ml = 1.0 #(1/ml)
mr = 3.0 #(1/mr)
maxerror = .001
maxloop = 100

(y,err,loop) = UFSF_prismatic_y(q, n, s, b, ml, mr, maxerror, maxloop)

print("y:",y,"err:",err,"loop:",loop)
Results:
y: 0.7343086060249905 err: 0.0008870970624864638 loop: 64