Pressure loss after Darcy–Weisbach, for laminar, (transient?) and turbulent flow.
The friction factor is based on Haaland 1983.
Haaland, S. E. Simple and Explicit Formulas for the Friction Factor in Turbulent Pipe Flow. Journal of Fluids Engineering 105, 89-90; 10.1115/1.3240948 (1983).
function laminarTurbulentPressureLossHaaland extends Internal.FlowResistance.partialPressureLoss; import Modelica.Constants.pi; input SI.ReynoldsNumber Re_laminar = 2000 "Upper limit for laminar flow (Reynolds number)" annotation( Dialog(enable = true)); input SI.ReynoldsNumber Re_turbulent = 4000 "Lower limit for turbulent flow (Reynolds number)" annotation( Dialog(enable = true)); input Real shape_factor(unit = "1") = 64 "Laminar pressure loss factor (Hagen-Poiseuille)" annotation( Dialog(enable = true)); input Real n(unit = "1") = 1 "Transition coefficient (see documentation)" annotation( Dialog(enable = true)); 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 laminarTurbulentPressureLossHaaland;