Python高克勒-曼宁-斯特里克勒公式计算一维流量

54 篇文章 0 订阅
54 篇文章 0 订阅

📜曼宁公式-用例

📜Python流体数据统计模型和浅水渗流平流模型模拟 | 📜Python蒸发散物理问题(微积分-线性代数-拉普拉斯和傅立叶变换)

✒️Python计算一维流量

高克勒-曼宁-斯特里克勒公式公式基于一维(横截面平均)流动特性的假设,将明渠水流的水深和流速联系起来。斯特里克勒公式是对纳维-斯托克斯方程和连续性方程进行大幅简化的结果。 尽管一维方法在很大程度上已被至少二维数值模型所取代,但一维斯特里克勒公式公式仍经常用作边界条件的第一近似值。

斯特里克勒公式的基本形式为:
u = k s t ⋅ S 1 / 2 ⋅ R h 2 / 3 u=k_{s t} \cdot S^{1 / 2} \cdot R_h^{2 / 3} u=kstS1/2Rh2/3
其中,

  • u u u 是 ( m / s m / s m/s ) 中的横截面平均流速
  • k s t k_{s t} kst 是斯特里克勒系数 ( m 1 / 3 / s m ^{1 / 3} / s m1/3/s ),对应于曼宁 n m n_m nm​ 的倒数。
    • k s t ≈ 20 ( n m ≈ 0.05 ) k_{s t} \approx 20\left(n_m \approx 0.05\right) kst20(nm0.05) 对于粗糙、复杂和接近自然的河流
    • k s t ≈ 90 ( n m ≈ 0.011 ) k_{s t} \approx 90\left(n_m \approx 0.011\right) kst90(nm0.011) 用于光滑、混凝土内衬的渠道
    • k s t ≈ 26 / D 90 1 / 6 k_{s t} \approx 26 / D_{90}^{1 / 6} kst26/D901/6 (基于颗粒尺寸 D 90 D_{90} D90 进行近似,其中 90 % 90 \% 90% 的表面沉积物颗粒较小)
  • S S S 是假设的能量斜率 ( m / m ) ( m / m ) (m/m)​,可以假设其对应于稳定、均匀流动条件下的河道斜率。
  • R h R_h Rh 是水力半径(米)

水力半径 R h R_h Rh是润湿面积 A A A与润湿周长 P P P的比率。 A A A P P P 都可以作为水深 h h h 和河道底部宽度 b b b 的函数进行计算。许多河道横截面可以近似为梯形,其中水面宽度 B = b + 2 ⋅ h ⋅ m B=b+2 \cdot h \cdot m B=b+2hm(其中 m m m是下图所示的岸坡)。

因此, A A A P P P 由以下公式得出:
A = h ⋅ 0.5 ⋅ ( b + B ) = h ⋅ ( b + h ⋅ m ) P = b + 2 h ⋅ ( m 2 + 1 ) 1 / 2 \begin{gathered} A=h \cdot 0.5 \cdot(b+B)=h \cdot(b+h \cdot m) \\ P=b+2 h \cdot\left(m^2+1\right)^{1 / 2} \end{gathered} A=h0.5(b+B)=h(b+hm)P=b+2h(m2+1)1/2
最后,排水 Q ( m 3 / s ) Q\left( m ^3 / s \right) Q(m3/s)​可计算为:
Q = u ⋅ A = k s t ⋅ S 1 / 2 ⋅ R h 2 / 3 ⋅ A Q=u \cdot A=k_{s t} \cdot S^{1 / 2} \cdot R_h^{2 / 3} \cdot A Q=uA=kstS1/2Rh2/3A
编写一个脚本,将流量打印为河道底宽 b b b、岸坡 m m m、水深 h h h、坡度 S S S 和斯特里克勒系数 k s t k_{s t} kst 的函数。

def reversed_mannings_fun(tar, args):
   
    Q, b, m_l, m_r, n_m, S_0 = args
    area = ((((tar * m_l) + (tar * m_r) + b) + b) / 2) * tar
    perimeter = b + (tar * (m_l * m_l + 1) ** 0.5) + (tar * (m_r * m_r + 1) ** 0.5)
    ratio = area / perimeter
    return (Q * n_m / S_0 ** 0.5) - (area * ratio ** (2.0 / 3.0))


def solve(fun, x0, precision, args):
  
    last_x = x0
    next_x = last_x + 10 * precision  

    while abs(last_x - next_x) > precision:

        next_y = fun(next_x, args)
        last_x = next_x
        next_x = last_x - next_y / derivative(fun, last_x, precision, args)  # update estimate using N-R
    return next_x

def derivative(fun, x, delta_x, args):
    
    return (fun(x + delta_x, args) - fun(x - delta_x, args)) / (2.0 * delta_x)

if __name__ == '__main__':
  
    Q = 15.5        
    b = 5.1         
    m_left = 2.5   
    m_right = 2.5   
    n_m = 1/20      
    S_0 = 0.005     
    init_value = .01  
   
    args0 = [Q, b, m_left, m_right, n_m, S_0]
   
    x_found = solve(reversed_mannings_fun, init_value, init_value / 10.0, args0)
    print("Iterated water depth = %.3f" % x_found)

🔗参阅:亚图跨际

  • 12
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值