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 |
---|---|
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 |
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)) |
pressureLoss_m_flow_totalPressure | Return pressure drop from constant loss factor and mass flow rate (dp = f(m_flow)) |
TestWallFriction | Pressure drop in pipe due to wall friction (only for test purposes; if needed use Pipes.StaticPipe instead) |
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).
Type | Name | Description |
---|---|---|
Diameter | diameter_a | Diameter at port_a |
Diameter | diameter_b | Diameter at port_b |
Real | zeta1 | Loss factor for flow port_a -> port_b |
Real | zeta2 | Loss factor for flow port_b -> port_a |
ReynoldsNumber | Re_turbulent | Loss factors suited for Re >= Re_turbulent |
Diameter | D_Re | Diameter used to compute Re |
Boolean | zeta1_at_a | dp = zeta1*(if zeta1_at_a then rho_a*v_a^2/2 else rho_b*v_b^2/2) |
Boolean | zeta2_at_a | dp = -zeta2*(if zeta2_at_a then rho_a*v_a^2/2 else rho_b*v_b^2/2) |
Boolean | zetaLaminarKnown | = true, if zeta = c0/Re in laminar region |
Real | c0 | zeta = c0/Re; dp = zeta*rho_Re*v_Re^2/2, Re=v_Re*D_Re*rho_Re/mu_Re) |
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).
Type | Name | Description |
---|---|---|
Pressure | dp | Pressure drop (dp = port_a.p - port_b.p) |
Density | rho_a | Density at port_a |
Density | rho_b | Density at port_b |
LossFactorData | data | Constant loss factors for both flow directions |
AbsolutePressure | dp_small | Turbulent flow if |dp| >= dp_small |
Type | Name | Description |
---|---|---|
MassFlowRate | m_flow | Mass flow rate from port_a to port_b |
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).
Type | Name | Description |
---|---|---|
Pressure | dp | Pressure drop (dp = port_a.p - port_b.p) |
Density | rho_a | Density at port_a |
Density | rho_b | Density at port_b |
DynamicViscosity | mu_a | Dynamic viscosity at port_a |
DynamicViscosity | mu_b | Dynamic viscosity at port_b |
LossFactorData | data | Constant loss factors for both flow directions |
Type | Name | Description |
---|---|---|
MassFlowRate | m_flow | Mass flow rate from port_a to port_b |
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).
Type | Name | Description |
---|---|---|
MassFlowRate | m_flow | Mass flow rate from port_a to port_b |
Density | rho_a | Density at port_a |
Density | rho_b | Density at port_b |
LossFactorData | data | Constant loss factors for both flow directions |
MassFlowRate | m_flow_small | Turbulent flow if |m_flow| >= m_flow_small |
Type | Name | Description |
---|---|---|
Pressure | dp | Pressure drop (dp = port_a.p - port_b.p) |
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).
Type | Name | Description |
---|---|---|
MassFlowRate | m_flow | Mass flow rate from port_a to port_b |
Density | rho_a | Density at port_a |
Density | rho_b | Density at port_b |
DynamicViscosity | mu_a | Dynamic viscosity at port_a |
DynamicViscosity | mu_b | Dynamic viscosity at port_b |
LossFactorData | data | Constant loss factors for both flow directions |
Type | Name | Description |
---|---|---|
Pressure | dp | Pressure drop (dp = port_a.p - port_b.p) |
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) and Modelica.Fluid.Interfaces.PartialLumpedFlow
(Base class for a lumped momentum balance).
Type | Name | Default | Description |
---|---|---|---|
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
AbsolutePressure | dp_start | dp_nominal | Guess value of dp = port_a.p - port_b.p |
MassFlowRate | m_flow_start | system.m_flow_start | Guess value of m_flow = port_a.m_flow |
MassFlowRate | m_flow_small | if system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_small | Small mass flow rate for regularization of zero flow |
Boolean | show_T | true | = true, if temperatures at port_a and port_b are computed |
Boolean | show_V_flow | true | = true, if volume flow rate at inflowing port is computed |
final Dynamics | momentumDynamics | Types.Dynamics.SteadyState | Formulation of momentum balance |
LossFactorData | data | Loss factor data | |
MassFlowRate | m_flow_nominal | if system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_small | Nominal mass flow rate |
Boolean | use_Re | system.use_eps_Re | = true, if turbulent region is defined by Re, otherwise by m_flow_small |
Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | show_Re | false | = true, if Reynolds number is included for plotting |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Extends from Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.BaseModel
(Generic pressure drop component with constant turbulent loss factor data and without an icon).
Type | Name | Default | Description |
---|---|---|---|
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
AbsolutePressure | dp_start | dp_nominal | Guess value of dp = port_a.p - port_b.p |
MassFlowRate | m_flow_start | system.m_flow_start | Guess value of m_flow = port_a.m_flow |
MassFlowRate | m_flow_small | if system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_small | Small mass flow rate for regularization of zero flow |
Boolean | show_T | true | = true, if temperatures at port_a and port_b are computed |
Boolean | show_V_flow | true | = true, if volume flow rate at inflowing port is computed |
final Dynamics | momentumDynamics | Types.Dynamics.SteadyState | Formulation of momentum balance |
final LossFactorData | data | LossFactorData.wallFriction(length, diameter, roughness) | Loss factor data |
MassFlowRate | m_flow_nominal | if system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_small | Nominal mass flow rate |
Boolean | use_Re | system.use_eps_Re | = true, if turbulent region is defined by Re, otherwise by m_flow_small |
Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | show_Re | false | = true, if Reynolds number is included for plotting |
Length | length | Length of pipe | |
Diameter | diameter | Inner diameter of pipe | |
Roughness | roughness | Absolute roughness of pipe (> 0 required, details see info layer) |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
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) and Modelica.Fluid.Interfaces.PartialLumpedFlow
(Base class for a lumped momentum balance).
Type | Name | Default | Description |
---|---|---|---|
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
final AbsolutePressure | dp_start | dp_nominal | Guess value of dp = port_a.p - port_b.p |
MassFlowRate | m_flow_start | system.m_flow_start | Guess value of m_flow = port_a.m_flow |
MassFlowRate | m_flow_small | if system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_small | Small mass flow rate for regularization of zero flow |
Boolean | show_T | true | = true, if temperatures at port_a and port_b are computed |
Boolean | show_V_flow | true | = true, if volume flow rate at inflowing port is computed |
final Dynamics | momentumDynamics | Types.Dynamics.SteadyState | Formulation of momentum balance |
LossFactorData | data | Loss factor data | |
MassFlowRate | m_flow_nominal | if system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_small | Nominal mass flow rate |
final Boolean | use_Re | false | = true, if turbulent region is defined by Re, otherwise by m_flow_small |
final Boolean | from_dp | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | show_Re | false | = true, if Reynolds number is included for plotting |
Boolean | show_totalPressures | false | = true, if total pressures are included for plotting |
Boolean | show_portVelocities | false | = true, if port velocities are included for plotting |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
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).
Type | Name | Description |
---|---|---|
MassFlowRate | m_flow | Mass flow rate from port_a to port_b |
Density | rho_a_des | Density at port_a, mass flow in design direction a -> b |
Density | rho_b_des | Density at port_b, mass flow in design direction a -> b |
Density | rho_b_nondes | Density at port_b, mass flow against design direction a <- b |
Density | rho_a_nondes | Density at port_a, mass flow against design direction a <- b |
LossFactorData | data | Constant loss factors for both flow directions |
MassFlowRate | m_flow_small | Turbulent flow if |m_flow| >= m_flow_small |
Type | Name | Description |
---|---|---|
Pressure | dp | Pressure drop (dp = port_a.p - port_b.p) |