Pressure loss components that are mainly defined by a quadratic turbulent regime with constant loss factor data
This library provides pressure loss factors of a pipe segment (orifice, bending etc.) with a minimum amount of data. If available, data can be provided for both flow directions, i.e., flow from port_a to port_b and from port_b to port_a, as well as for the laminar and the turbulent region. It is also an option to provide the loss factor only for the turbulent region for a flow from port_a to port_b. Basically, the pressure drop is defined by the following equation:
Δp = 0.5*ζ*ρ*v*|v| = 0.5*ζ/A^2 * (1/ρ) * m_flow*|m_flow| = 8*ζ/(π^2*D^4*ρ) * m_flow*|m_flow|
where
Extends from Modelica.Icons.Package (Icon for standard packages).
Name | Description |
---|---|
LossFactorData | Data structure defining constant loss factor data for dp = zeta*rho*v*|v|/2 and functions providing the data for some loss types |
massFlowRate_dp | Return mass flow rate from constant loss factor data and pressure drop (m_flow = f(dp)) |
massFlowRate_dp_and_Re | Return mass flow rate from constant loss factor data, pressure drop and Re (m_flow = f(dp)) |
pressureLoss_m_flow | Return pressure drop from constant loss factor and mass flow rate (dp = f(m_flow)) |
pressureLoss_m_flow_and_Re | Return pressure drop from constant loss factor, mass flow rate and Re (dp = f(m_flow)) |
BaseModel | Generic pressure drop component with constant turbulent loss factor data and without an icon |
BaseModelNonconstantCrossSectionArea | Generic pressure drop component with constant turbulent loss factor data and without an icon, for non-constant cross section area |
pressureLoss_m_flow_totalPressure | Return pressure drop from constant loss factor and mass flow rate (dp = f(m_flow)) |
Data structure defining constant loss factor data for dp = zeta*rho*v*|v|/2 and functions providing the data for some loss types
This record defines the pressure loss factors of a pipe segment (orifice, bending etc.) with a minimum amount of data. If available, data should be provided for both flow directions, i.e., flow from port_a to port_b and from port_b to port_a, as well as for the laminar and the turbulent region. It is also an option to provide the loss factor only for the turbulent region for a flow from port_a to port_b.
The following equations are used:
Δp = 0.5*ζ*ρ*v*|v| = 0.5*ζ/A^2 * (1/ρ) * m_flow*|m_flow| = 8*ζ/(π^2*D^4*ρ) * m_flow*|m_flow| Re = |v|*D*ρ/μ
flow type | ζ = | flow region |
turbulent | zeta1 = const. | Re ≥ Re_turbulent, v ≥ 0 |
zeta2 = const. | Re ≥ Re_turbulent, v < 0 | |
laminar | c0/Re | both flow directions, Re small; c0 = const. |
where
The laminar and the transition region is usually of not much technical interest because the operating point is mostly in the turbulent regime. For simplification and for numerical reasons, this whole region is described by two polynomials of third order, one polynomial for m_flow ≥ 0 and one for m_flow < 0. The polynomials start at Re = |m_flow|*4/(π*D_Re*μ), where D_Re is the smallest diameter between port_a and port_b. The common derivative of the two polynomials at Re = 0 is computed from the equation "c0/Re". Note, the pressure drop equation above in the laminar region is always defined with respect to the smallest diameter D_Re.
If no data for c0 is available, the derivative at Re = 0 is computed in such a way, that the second derivatives of the two polynomials are identical at Re = 0. The polynomials are constructed, such that they smoothly touch the characteristic curves in the turbulent regions. The whole characteristic is therefore continuous and has a finite, continuous first derivative everywhere. In some cases, the constructed polynomials would "vibrate". This is avoided by reducing the derivative at Re=0 in such a way that the polynomials are guaranteed to be monotonically increasing. The used sufficient criteria for monotonicity follows from:
Extends from Modelica.Icons.Record (Icon for records).
Name | Description |
---|---|
diameter_a | Diameter at port_a [m] |
diameter_b | Diameter at port_b [m] |
zeta1 | Loss factor for flow port_a -> port_b |
zeta2 | Loss factor for flow port_b -> port_a |
Re_turbulent | Loss factors suited for Re >= Re_turbulent [1] |
D_Re | Diameter used to compute Re [m] |
zeta1_at_a | dp = zeta1*(if zeta1_at_a then rho_a*v_a^2/2 else rho_b*v_b^2/2) |
zeta2_at_a | dp = -zeta2*(if zeta2_at_a then rho_a*v_a^2/2 else rho_b*v_b^2/2) |
zetaLaminarKnown | = true, if zeta = c0/Re in laminar region |
c0 | zeta = c0/Re; dp = zeta*rho_Re*v_Re^2/2, Re=v_Re*D_Re*rho_Re/mu_Re) |
Return mass flow rate from constant loss factor data and pressure drop (m_flow = f(dp))
Compute mass flow rate from constant loss factor and pressure drop (m_flow = f(dp)). For small pressure drops (dp < dp_small), the characteristic is approximated by a polynomial in order to have a finite derivative at zero mass flow rate.
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
dp | Pressure drop (dp = port_a.p - port_b.p) [Pa] |
rho_a | Density at port_a [kg/m3] |
rho_b | Density at port_b [kg/m3] |
data | Constant loss factors for both flow directions |
dp_small | Turbulent flow if |dp| >= dp_small [Pa] |
Name | Description |
---|---|
m_flow | Mass flow rate from port_a to port_b [kg/s] |
Return mass flow rate from constant loss factor data, pressure drop and Re (m_flow = f(dp))
Compute mass flow rate from constant loss factor and pressure drop (m_flow = f(dp)). If the Reynolds-number Re ≥ data.Re_turbulent, the flow is treated as a turbulent flow with constant loss factor zeta. If the Reynolds-number Re < data.Re_turbulent, the flow is laminar and/or in a transition region between laminar and turbulent. This region is approximated by two polynomials of third order, one polynomial for m_flow ≥ 0 and one for m_flow < 0. The common derivative of the two polynomials at Re = 0 is computed from the equation "data.c0/Re".
If no data for c0 is available, the derivative at Re = 0 is computed in such a way, that the second derivatives of the two polynomials are identical at Re = 0. The polynomials are constructed, such that they smoothly touch the characteristic curves in the turbulent regions. The whole characteristic is therefore continuous and has a finite, continuous first derivative everywhere. In some cases, the constructed polynomials would "vibrate". This is avoided by reducing the derivative at Re=0 in such a way that the polynomials are guaranteed to be monotonically increasing. The used sufficient criteria for monotonicity follows from:
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
dp | Pressure drop (dp = port_a.p - port_b.p) [Pa] |
rho_a | Density at port_a [kg/m3] |
rho_b | Density at port_b [kg/m3] |
mu_a | Dynamic viscosity at port_a [Pa.s] |
mu_b | Dynamic viscosity at port_b [Pa.s] |
data | Constant loss factors for both flow directions |
Name | Description |
---|---|
m_flow | Mass flow rate from port_a to port_b [kg/s] |
Return pressure drop from constant loss factor and mass flow rate (dp = f(m_flow))
Compute pressure drop from constant loss factor and mass flow rate (dp = f(m_flow)). For small mass flow rates(|m_flow| < m_flow_small), the characteristic is approximated by a polynomial in order to have a finite derivative at zero mass flow rate.
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
m_flow | Mass flow rate from port_a to port_b [kg/s] |
rho_a | Density at port_a [kg/m3] |
rho_b | Density at port_b [kg/m3] |
data | Constant loss factors for both flow directions |
m_flow_small | Turbulent flow if |m_flow| >= m_flow_small [kg/s] |
Name | Description |
---|---|
dp | Pressure drop (dp = port_a.p - port_b.p) [Pa] |
Return pressure drop from constant loss factor, mass flow rate and Re (dp = f(m_flow))
Compute pressure drop from constant loss factor and mass flow rate (dp = f(m_flow)). If the Reynolds-number Re ≥ data.Re_turbulent, the flow is treated as a turbulent flow with constant loss factor zeta. If the Reynolds-number Re < data.Re_turbulent, the flow is laminar and/or in a transition region between laminar and turbulent. This region is approximated by two polynomials of third order, one polynomial for m_flow ≥ 0 and one for m_flow < 0. The common derivative of the two polynomials at Re = 0 is computed from the equation "data.c0/Re".
If no data for c0 is available, the derivative at Re = 0 is computed in such a way, that the second derivatives of the two polynomials are identical at Re = 0. The polynomials are constructed, such that they smoothly touch the characteristic curves in the turbulent regions. The whole characteristic is therefore continuous and has a finite, continuous first derivative everywhere. In some cases, the constructed polynomials would "vibrate". This is avoided by reducing the derivative at Re=0 in such a way that the polynomials are guaranteed to be monotonically increasing. The used sufficient criteria for monotonicity follows from:
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
m_flow | Mass flow rate from port_a to port_b [kg/s] |
rho_a | Density at port_a [kg/m3] |
rho_b | Density at port_b [kg/m3] |
mu_a | Dynamic viscosity at port_a [Pa.s] |
mu_b | Dynamic viscosity at port_b [Pa.s] |
data | Constant loss factors for both flow directions |
Name | Description |
---|---|
dp | Pressure drop (dp = port_a.p - port_b.p) [Pa] |
Generic pressure drop component with constant turbulent loss factor data and without an icon
This model computes the pressure loss of a pipe segment (orifice, bending etc.) with a minimum amount of data provided via parameter data. If available, data should be provided for both flow directions, i.e., flow from port_a to port_b and from port_b to port_a, as well as for the laminar and the turbulent region. It is also an option to provide the loss factor only for the turbulent region for a flow from port_a to port_b.
The following equations are used:
Δp = 0.5*ζ*ρ*v*|v| = 0.5*ζ/A^2 * (1/ρ) * m_flow*|m_flow| Re = |v|*D*ρ/μ
flow type | ζ = | flow region |
turbulent | zeta1 = const. | Re ≥ Re_turbulent, v ≥ 0 |
zeta2 = const. | Re ≥ Re_turbulent, v < 0 | |
laminar | c0/Re | both flow directions, Re small; c0 = const. |
where
The laminar and the transition region is usually of not much technical interest because the operating point is mostly in the turbulent regime. For simplification and for numerical reasons, this whole region is described by two polynomials of third order, one polynomial for m_flow ≥ 0 and one for m_flow < 0. The polynomials start at Re = |m_flow|*4/(π*D_Re*μ), where D_Re is the smallest diameter between port_a and port_b. The common derivative of the two polynomials at Re = 0 is computed from the equation "c0/Re". Note, the pressure drop equation above in the laminar region is always defined with respect to the smallest diameter D_Re.
If no data for c0 is available, the derivative at Re = 0 is computed in such a way, that the second derivatives of the two polynomials are identical at Re = 0. The polynomials are constructed, such that they smoothly touch the characteristic curves in the turbulent regions. The whole characteristic is therefore continuous and has a finite, continuous first derivative everywhere. In some cases, the constructed polynomials would "vibrate". This is avoided by reducing the derivative at Re=0 in such a way that the polynomials are guaranteed to be monotonically increasing. The used sufficient criteria for monotonicity follows from:
Extends from Modelica.Fluid.Interfaces.PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy), Modelica.Fluid.Interfaces.PartialLumpedFlow (Base class for a lumped momentum balance).
Name | Description |
---|---|
replaceable package Medium | Medium in the component |
data | Loss factor data |
Custom Parameters | |
pathLength | Length flow path [m] |
Nominal operating point | |
m_flow_nominal | Nominal mass flow rate [kg/s] |
Assumptions | |
allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |
momentumDynamics | Formulation of momentum balance |
Advanced | |
dp_start | Guess value of dp = port_a.p - port_b.p [Pa] |
m_flow_start | Guess value of m_flow = port_a.m_flow [kg/s] |
m_flow_small | Small mass flow rate for regularization of zero flow [kg/s] |
use_Re | = true, if turbulent region is defined by Re, otherwise by m_flow_small |
from_dp | = true, use m_flow = f(dp) else dp = f(m_flow) |
Diagnostics | |
show_T | = true, if temperatures at port_a and port_b are computed |
show_V_flow | = true, if volume flow rate at inflowing port is computed |
show_Re | = true, if Reynolds number is included for plotting |
Name | Description |
---|---|
port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Generic pressure drop component with constant turbulent loss factor data and without an icon, for non-constant cross section area
This model computes the pressure loss of a pipe segment (orifice, bending etc.) with a minimum amount of data provided via parameter data. If available, data should be provided for both flow directions, i.e., flow from port_a to port_b and from port_b to port_a, as well as for the laminar and the turbulent region. It is also an option to provide the loss factor only for the turbulent region for a flow from port_a to port_b.
The following equations are used:
Δp = 0.5*ζ*ρ*v*|v| = 0.5*ζ/A^2 * (1/ρ) * m_flow*|m_flow| Re = |v|*D*ρ/μ
flow type | ζ = | flow region |
turbulent | zeta1 = const. | Re ≥ Re_turbulent, v ≥ 0 |
zeta2 = const. | Re ≥ Re_turbulent, v < 0 | |
laminar | c0/Re | both flow directions, Re small; c0 = const. |
where
The laminar and the transition region is usually of not much technical interest because the operating point is mostly in the turbulent regime. For simplification and for numerical reasons, this whole region is described by two polynomials of third order, one polynomial for m_flow ≥ 0 and one for m_flow < 0. The polynomials start at Re = |m_flow|*4/(π*D_Re*μ), where D_Re is the smallest diameter between port_a and port_b. The common derivative of the two polynomials at Re = 0 is computed from the equation "c0/Re". Note, the pressure drop equation above in the laminar region is always defined with respect to the smallest diameter D_Re.
If no data for c0 is available, the derivative at Re = 0 is computed in such a way, that the second derivatives of the two polynomials are identical at Re = 0. The polynomials are constructed, such that they smoothly touch the characteristic curves in the turbulent regions. The whole characteristic is therefore continuous and has a finite, continuous first derivative everywhere. In some cases, the constructed polynomials would "vibrate". This is avoided by reducing the derivative at Re=0 in such a way that the polynomials are guaranteed to be monotonically increasing. The used sufficient criteria for monotonicity follows from:
Extends from Modelica.Fluid.Interfaces.PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy), Modelica.Fluid.Interfaces.PartialLumpedFlow (Base class for a lumped momentum balance).
Name | Description |
---|---|
replaceable package Medium | Medium in the component |
data | Loss factor data |
Custom Parameters | |
pathLength | Length flow path [m] |
Nominal operating point | |
m_flow_nominal | Nominal mass flow rate [kg/s] |
Assumptions | |
allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |
momentumDynamics | Formulation of momentum balance |
Advanced | |
dp_start | Guess value of dp = port_a.p - port_b.p [Pa] |
m_flow_start | Guess value of m_flow = port_a.m_flow [kg/s] |
m_flow_small | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |
show_T | = true, if temperatures at port_a and port_b are computed |
show_V_flow | = true, if volume flow rate at inflowing port is computed |
show_Re | = true, if Reynolds number is included for plotting |
show_totalPressures | = true, if total pressures are included for plotting |
show_portVelocities | = true, if port velocities are included for plotting |
Name | Description |
---|---|
port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Return pressure drop from constant loss factor and mass flow rate (dp = f(m_flow))
Compute pressure drop from constant loss factor and mass flow rate (dp = f(m_flow)). For small mass flow rates(|m_flow| < m_flow_small), the characteristic is approximated by a polynomial in order to have a finite derivative at zero mass flow rate.
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
m_flow | Mass flow rate from port_a to port_b [kg/s] |
rho_a_des | Density at port_a, mass flow in design direction a -> b [kg/m3] |
rho_b_des | Density at port_b, mass flow in design direction a -> b [kg/m3] |
rho_b_nondes | Density at port_b, mass flow against design direction a <- b [kg/m3] |
rho_a_nondes | Density at port_a, mass flow against design direction a <- b [kg/m3] |
data | Constant loss factors for both flow directions |
m_flow_small | Turbulent flow if |m_flow| >= m_flow_small [kg/s] |
Name | Description |
---|---|
dp | Pressure drop (dp = port_a.p - port_b.p) [Pa] |