function pressureLoss_m_flow_WallFriction
extends Modelica.Icons.Function;
input SI.MassFlowRate m_flow "Mass flow rate from port_a to port_b";
input SI.Density d_a "Density at port_a";
input SI.Density d_b "Density at port_b";
input SI.DynamicViscosity eta_a "Dynamic viscosity at port_a (dummy if use_eta = false)";
input SI.DynamicViscosity eta_b "Dynamic viscosity at port_b (dummy if use_eta = false)";
input SI.Length length "Length of pipe";
input SI.Diameter diameter "Inner (hydraulic) diameter of pipe";
input SI.Length roughness(min = 0) = 2.5e-5 "Absolute roughness of pipe, with a default for a smooth steel pipe";
output SI.Pressure dp "Pressure drop (dp = port_a.p - port_b.p)";
import Modelica.Constants.pi;
end pressureLoss_m_flow_WallFriction;