UPF_cw_f(): Friction loss with Colebrooke-White equation

About:


Calculate the friction loss in a pipe, with uniform flow according to the Colebrook-White equation. 
\begin{equation} \frac{1}{\sqrt{f}} = -2 \times \log{\left( \frac{e}{3,7 \times D} + \frac{2.51}{Re \times \sqrt{f}}\right)} \end{equation} 
\begin{equation} f = \left( \frac{1}{-2 \times \log{\left( \frac{e}{3,7 \times D} + \frac{2.51}{Re \times \sqrt{f}} \right)}} \right)^2 \end{equation}

Where,



  • q, flow - $\frac{m^3}{s}$;
  • e, pipe roughness - $m$;
  • $\nu$, water kinematic viscosity » WATER_viscosity_kvisc() - $\frac{m^2}{s}$;
  • d, internal diameter - $m$.


  • Module: UniformPressurizedFlow
    Function: UPF_cw_f(q,e,t,s,d)
    Definition of variables:
    • q, flow - m3/s;
    • e, pipe roughness - m;
    • t, temperature - ÂșC;
    • s, salinity - g/kg;
    • d, internal diameter - m.
    Sample code:
    from UniformPressurizedFlow import*
    
    q= 1.0 #(m3/s)
    e= 0.000003 #(m)
    t = 15 #(oC)
    s = 2.5 #(g/kg)
    d= 0.75 #(m)
    
    f = UPF_cw_f(q,e,t,s,d)
    
    print("f:",f,"m/m")
    
    Result:
    f: 0.010998773939 m/m