function m_flow_of_dp_fric extends Modelica.Icons.Function; input SI.Pressure dp_fric "Pressure loss due to friction (dp = port_a.p - port_b.p)"; input SI.Density rho_a "Density at port_a"; input SI.Density rho_b "Density at port_b"; input SI.DynamicViscosity mu_a "Dynamic viscosity at port_a (dummy if use_mu = false)"; input SI.DynamicViscosity mu_b "Dynamic viscosity at port_b (dummy if use_mu = false)"; input SI.Length length "Length of pipe"; input SI.Diameter diameter "Inner (hydraulic) diameter of pipe"; input SI.Area crossArea "Inner cross section area"; input SI.ReynoldsNumber Re1 "Boundary between laminar regime and transition"; input SI.ReynoldsNumber Re2 "Boundary between transition and turbulent regime"; input Real Delta(min = 0) "Relative roughness"; output SI.MassFlowRate m_flow "Mass flow rate from port_a to port_b"; output Real dm_flow_ddp_fric "Derivative of mass flow rate with dp_fric"; end m_flow_of_dp_fric;