Package Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent
Pressure loss components that are mainly defined by a quadratic turbulent regime with constant loss factor data

Information

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).

Package Contents

NameDescription
BaseModelGeneric pressure drop component with constant turbulent loss factor data and without an icon
BaseModelNonconstantCrossSectionAreaGeneric pressure drop component with constant turbulent loss factor data and without an icon, for non-constant cross section area
LossFactorDataData structure defining constant loss factor data for dp = zeta*rho*v*|v|/2 and functions providing the data for some loss types
massFlowRate_dpReturn mass flow rate from constant loss factor data and pressure drop (m_flow = f(dp))
massFlowRate_dp_and_ReReturn mass flow rate from constant loss factor data, pressure drop and Re (m_flow = f(dp))
pressureLoss_m_flowReturn pressure drop from constant loss factor and mass flow rate (dp = f(m_flow))
pressureLoss_m_flow_and_ReReturn pressure drop from constant loss factor, mass flow rate and Re (dp = f(m_flow))
pressureLoss_m_flow_totalPressureReturn pressure drop from constant loss factor and mass flow rate (dp = f(m_flow))
TestWallFrictionPressure drop in pipe due to wall friction (only for test purposes; if needed use Pipes.StaticPipe instead)

Record Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​LossFactorData
Data structure defining constant loss factor data for dp = zeta*rho*v*|v|/2 and functions providing the data for some loss types

Information

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:

Fritsch F.N. and Carlson R.E. (1980):
Monotone piecewise cubic interpolation. SIAM J. Numerc. Anal., Vol. 17, No. 2, April 1980, pp. 238-246

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
Diameterdiameter_aDiameter at port_a
Diameterdiameter_bDiameter at port_b
Realzeta1Loss factor for flow port_a -> port_b
Realzeta2Loss factor for flow port_b -> port_a
ReynoldsNumberRe_turbulentLoss factors suited for Re >= Re_turbulent
DiameterD_ReDiameter used to compute Re
Booleanzeta1_at_adp = zeta1*(if zeta1_at_a then rho_a*v_a^2/2 else rho_b*v_b^2/2)
Booleanzeta2_at_adp = -zeta2*(if zeta2_at_a then rho_a*v_a^2/2 else rho_b*v_b^2/2)
BooleanzetaLaminarKnown= true, if zeta = c0/Re in laminar region
Realc0zeta = c0/Re; dp = zeta*rho_Re*v_Re^2/2, Re=v_Re*D_Re*rho_Re/mu_Re)

Function Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​massFlowRate_dp
Return mass flow rate from constant loss factor data and pressure drop (m_flow = f(dp))

Information

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).

Inputs

TypeNameDescription
PressuredpPressure drop (dp = port_a.p - port_b.p)
Densityrho_aDensity at port_a
Densityrho_bDensity at port_b
LossFactorDatadataConstant loss factors for both flow directions
AbsolutePressuredp_smallTurbulent flow if |dp| >= dp_small

Outputs

TypeNameDescription
MassFlowRatem_flowMass flow rate from port_a to port_b

Function Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​massFlowRate_dp_and_Re
Return mass flow rate from constant loss factor data, pressure drop and Re (m_flow = f(dp))

Information

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:

Fritsch F.N. and Carlson R.E. (1980):
Monotone piecewise cubic interpolation. SIAM J. Numerc. Anal., Vol. 17, No. 2, April 1980, pp. 238-246

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
PressuredpPressure drop (dp = port_a.p - port_b.p)
Densityrho_aDensity at port_a
Densityrho_bDensity at port_b
DynamicViscositymu_aDynamic viscosity at port_a
DynamicViscositymu_bDynamic viscosity at port_b
LossFactorDatadataConstant loss factors for both flow directions

Outputs

TypeNameDescription
MassFlowRatem_flowMass flow rate from port_a to port_b

Function Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​pressureLoss_m_flow
Return pressure drop from constant loss factor and mass flow rate (dp = f(m_flow))

Information

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).

Inputs

TypeNameDescription
MassFlowRatem_flowMass flow rate from port_a to port_b
Densityrho_aDensity at port_a
Densityrho_bDensity at port_b
LossFactorDatadataConstant loss factors for both flow directions
MassFlowRatem_flow_smallTurbulent flow if |m_flow| >= m_flow_small

Outputs

TypeNameDescription
PressuredpPressure drop (dp = port_a.p - port_b.p)

Function Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​pressureLoss_m_flow_and_Re
Return pressure drop from constant loss factor, mass flow rate and Re (dp = f(m_flow))

Information

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:

Fritsch F.N. and Carlson R.E. (1980):
Monotone piecewise cubic interpolation. SIAM J. Numerc. Anal., Vol. 17, No. 2, April 1980, pp. 238-246

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
MassFlowRatem_flowMass flow rate from port_a to port_b
Densityrho_aDensity at port_a
Densityrho_bDensity at port_b
DynamicViscositymu_aDynamic viscosity at port_a
DynamicViscositymu_bDynamic viscosity at port_b
LossFactorDatadataConstant loss factors for both flow directions

Outputs

TypeNameDescription
PressuredpPressure drop (dp = port_a.p - port_b.p)

Partial Model Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​BaseModel
Generic pressure drop component with constant turbulent loss factor data and without an icon

Information

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:

Fritsch F.N. and Carlson R.E. (1980):
Monotone piecewise cubic interpolation. SIAM J. Numerc. Anal., Vol. 17, No. 2, April 1980, pp. 238-246

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).

Parameters

TypeNameDefaultDescription
BooleanallowFlowReversalsystem.​allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
AbsolutePressuredp_startdp_nominalGuess value of dp = port_a.p - port_b.p
MassFlowRatem_flow_startsystem.​m_flow_startGuess value of m_flow = port_a.m_flow
MassFlowRatem_flow_smallif system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_smallSmall mass flow rate for regularization of zero flow
Booleanshow_Ttrue= true, if temperatures at port_a and port_b are computed
Booleanshow_V_flowtrue= true, if volume flow rate at inflowing port is computed
final DynamicsmomentumDynamicsTypes.​Dynamics.​SteadyStateFormulation of momentum balance
LossFactorDatadata Loss factor data
MassFlowRatem_flow_nominalif system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_smallNominal mass flow rate
Booleanuse_Resystem.​use_eps_Re= true, if turbulent region is defined by Re, otherwise by m_flow_small
Booleanfrom_dptrue= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanshow_Refalse= true, if Reynolds number is included for plotting

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Model Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​TestWallFriction
Pressure drop in pipe due to wall friction (only for test purposes; if needed use Pipes.StaticPipe instead)

Information

Extends from Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​BaseModel (Generic pressure drop component with constant turbulent loss factor data and without an icon).

Parameters

TypeNameDefaultDescription
BooleanallowFlowReversalsystem.​allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
AbsolutePressuredp_startdp_nominalGuess value of dp = port_a.p - port_b.p
MassFlowRatem_flow_startsystem.​m_flow_startGuess value of m_flow = port_a.m_flow
MassFlowRatem_flow_smallif system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_smallSmall mass flow rate for regularization of zero flow
Booleanshow_Ttrue= true, if temperatures at port_a and port_b are computed
Booleanshow_V_flowtrue= true, if volume flow rate at inflowing port is computed
final DynamicsmomentumDynamicsTypes.​Dynamics.​SteadyStateFormulation of momentum balance
final LossFactorDatadataLossFactorData.wallFriction(length, diameter, roughness)Loss factor data
MassFlowRatem_flow_nominalif system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_smallNominal mass flow rate
Booleanuse_Resystem.​use_eps_Re= true, if turbulent region is defined by Re, otherwise by m_flow_small
Booleanfrom_dptrue= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanshow_Refalse= true, if Reynolds number is included for plotting
Lengthlength Length of pipe
Diameterdiameter Inner diameter of pipe
Lengthroughness Absolute roughness of pipe (> 0 required, details see info layer)

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Partial Model Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​BaseModelNonconstantCrossSectionArea
Generic pressure drop component with constant turbulent loss factor data and without an icon, for non-constant cross section area

Information

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:

Fritsch F.N. and Carlson R.E. (1980):
Monotone piecewise cubic interpolation. SIAM J. Numerc. Anal., Vol. 17, No. 2, April 1980, pp. 238-246

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).

Parameters

TypeNameDefaultDescription
BooleanallowFlowReversalsystem.​allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
final AbsolutePressuredp_startdp_nominalGuess value of dp = port_a.p - port_b.p
MassFlowRatem_flow_startsystem.​m_flow_startGuess value of m_flow = port_a.m_flow
MassFlowRatem_flow_smallif system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_smallSmall mass flow rate for regularization of zero flow
Booleanshow_Ttrue= true, if temperatures at port_a and port_b are computed
Booleanshow_V_flowtrue= true, if volume flow rate at inflowing port is computed
final DynamicsmomentumDynamicsTypes.​Dynamics.​SteadyStateFormulation of momentum balance
LossFactorDatadata Loss factor data
MassFlowRatem_flow_nominalif system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_smallNominal mass flow rate
final Booleanuse_Refalse= true, if turbulent region is defined by Re, otherwise by m_flow_small
final Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanshow_Refalse= true, if Reynolds number is included for plotting
Booleanshow_totalPressuresfalse= true, if total pressures are included for plotting
Booleanshow_portVelocitiesfalse= true, if port velocities are included for plotting

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Function Modelica.​Fluid.​Fittings.​BaseClasses.​QuadraticTurbulent.​pressureLoss_m_flow_totalPressure
Return pressure drop from constant loss factor and mass flow rate (dp = f(m_flow))

Information

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).

Inputs

TypeNameDescription
MassFlowRatem_flowMass flow rate from port_a to port_b
Densityrho_a_desDensity at port_a, mass flow in design direction a -> b
Densityrho_b_desDensity at port_b, mass flow in design direction a -> b
Densityrho_b_nondesDensity at port_b, mass flow against design direction a <- b
Densityrho_a_nondesDensity at port_a, mass flow against design direction a <- b
LossFactorDatadataConstant loss factors for both flow directions
MassFlowRatem_flow_smallTurbulent flow if |m_flow| >= m_flow_small

Outputs

TypeNameDescription
PressuredpPressure drop (dp = port_a.p - port_b.p)

Generated 2018-12-12 12:13:28 EST by MapleSim.