Pressure loss according to Darcy–Weisbach, for laminar, transient and turbulent flow.
In order to avoid a 0^0 for Re=0 (and therefore a = 1) in the computation of lambda_aux, we add epsilon=0.01 to Re to lower bound it in a smooth way.
ks_input defines the pipe roughness. It can be selected from a list of materials or given directly.
Cheng, Nian-Sheng (2008). Formulas for friction factor in transitional regimes. In:Journal of Hydraulic Engineering134.9, pp. 1357-1362
Elmqvist, Hilding, Hubertus Tummescheit, and Martin Otter (2003). Object-orientedmodeling of thermo-fluid systems. In:3rd International Modelica Conference,pp. 269-286.
function laminarTurbulentPressureLoss extends Internal.FlowResistance.partialPressureLoss; import Modelica.Constants.pi; input SI.Length ks_input(min = 1e-7) = 1e-7 "Surface roughness" annotation( Dialog(enable = (material == ThermofluidStream.Processes.Internal.Material.other))); input ThermofluidStream.Processes.Internal.Material material = ThermofluidStream.Processes.Internal.Material.other "Material of pipe" annotation( Dialog(enable = true)); end laminarTurbulentPressureLoss;