function dp_twoPhaseMomentum_DP
extends Modelica.Icons.Function;
import PI = Modelica.Constants.pi;
import MIN = Modelica.Constants.eps;
import SMOOTH = Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower;
input Modelica.Fluid.Dissipation.Utilities.Types.VoidFractionApproach voidFractionApproach = Modelica.Fluid.Dissipation.Utilities.Types.VoidFractionApproach.Homogeneous "Choice of void fraction approach" annotation(
Dialog(group = "Choices"));
input Boolean massFlowRateCorrection = false "Consider heterogeneous mass flow rate correction" annotation(
Dialog(group = "Choices"));
input SI.Area A_cross(min = Modelica.Constants.eps) = PI * 0.1 ^ 2 / 4 "Cross sectional area" annotation(
Dialog(group = "Geometry"));
input SI.Length perimeter(min = Modelica.Constants.eps) = PI * 0.1 "Perimeter" annotation(
Dialog(group = "Geometry"));
input SI.Density rho_g(min = Modelica.Constants.eps) "Density of gas" annotation(
Dialog(group = "Fluid properties"));
input SI.Density rho_l(min = Modelica.Constants.eps) "Density of liquid" annotation(
Dialog(group = "Fluid properties"));
input Real x_flow_end(min = 0, max = 1) = 0 "Mass flow rate quality at end of length" annotation(
Dialog(group = "Fluid properties"));
input Real x_flow_sta(min = 0, max = 1) = 0 "Mass flow rate quality at start of length" annotation(
Dialog(group = "Fluid properties"));
input SI.MassFlowRate m_flow "Mass flow rate" annotation(
Dialog(group = "Input"));
output SI.Pressure DP_mom "Momentum pressure loss";
end dp_twoPhaseMomentum_DP;