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 Content

NameDescription
Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.LossFactorData LossFactorData Data structure defining constant loss factor data for dp = zeta*rho*v*|v|/2 and functions providing the data for some loss types
Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.massFlowRate_dp massFlowRate_dp Return mass flow rate from constant loss factor data and pressure drop (m_flow = f(dp))
Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.massFlowRate_dp_and_Re massFlowRate_dp_and_Re Return mass flow rate from constant loss factor data, pressure drop and Re (m_flow = f(dp))
Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.pressureLoss_m_flow pressureLoss_m_flow Return pressure drop from constant loss factor and mass flow rate (dp = f(m_flow))
Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.pressureLoss_m_flow_and_Re pressureLoss_m_flow_and_Re Return pressure drop from constant loss factor, mass flow rate and Re (dp = f(m_flow))
Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.BaseModel BaseModel Generic pressure drop component with constant turbulent loss factor data and without an icon
Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.TestWallFriction TestWallFriction Pressure drop in pipe due to wall friction (only for test purposes; if needed use Pipes.StaticPipe instead)
Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.BaseModelNonconstantCrossSectionArea BaseModelNonconstantCrossSectionArea Generic pressure drop component with constant turbulent loss factor data and without an icon, for non-constant cross section area
Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.pressureLoss_m_flow_totalPressure pressureLoss_m_flow_totalPressure Return pressure drop from constant loss factor and mass flow rate (dp = f(m_flow))

Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.LossFactorData 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).

Parameters

NameDescription
diameter_aDiameter at port_a [m]
diameter_bDiameter at port_b [m]
zeta1Loss factor for flow port_a -> port_b
zeta2Loss factor for flow port_b -> port_a
Re_turbulentLoss factors suited for Re >= Re_turbulent [1]
D_ReDiameter used to compute Re [m]
zeta1_at_adp = zeta1*(if zeta1_at_a then rho_a*v_a^2/2 else rho_b*v_b^2/2)
zeta2_at_adp = -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
c0zeta = c0/Re; dp = zeta*rho_Re*v_Re^2/2, Re=v_Re*D_Re*rho_Re/mu_Re)

Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.massFlowRate_dp 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

NameDescription
dpPressure drop (dp = port_a.p - port_b.p) [Pa]
rho_aDensity at port_a [kg/m3]
rho_bDensity at port_b [kg/m3]
dataConstant loss factors for both flow directions
dp_smallTurbulent flow if |dp| >= dp_small [Pa]

Outputs

NameDescription
m_flowMass flow rate from port_a to port_b [kg/s]

Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.massFlowRate_dp_and_Re 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

NameDescription
dpPressure drop (dp = port_a.p - port_b.p) [Pa]
rho_aDensity at port_a [kg/m3]
rho_bDensity at port_b [kg/m3]
mu_aDynamic viscosity at port_a [Pa.s]
mu_bDynamic viscosity at port_b [Pa.s]
dataConstant loss factors for both flow directions

Outputs

NameDescription
m_flowMass flow rate from port_a to port_b [kg/s]

Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.pressureLoss_m_flow 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

NameDescription
m_flowMass flow rate from port_a to port_b [kg/s]
rho_aDensity at port_a [kg/m3]
rho_bDensity at port_b [kg/m3]
dataConstant loss factors for both flow directions
m_flow_smallTurbulent flow if |m_flow| >= m_flow_small [kg/s]

Outputs

NameDescription
dpPressure drop (dp = port_a.p - port_b.p) [Pa]

Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.pressureLoss_m_flow_and_Re 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

NameDescription
m_flowMass flow rate from port_a to port_b [kg/s]
rho_aDensity at port_a [kg/m3]
rho_bDensity at port_b [kg/m3]
mu_aDynamic viscosity at port_a [Pa.s]
mu_bDynamic viscosity at port_b [Pa.s]
dataConstant loss factors for both flow directions

Outputs

NameDescription
dpPressure drop (dp = port_a.p - port_b.p) [Pa]

Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.BaseModel 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), Modelica.Fluid.Interfaces.PartialLumpedFlow (Base class for a lumped momentum balance).

Parameters

NameDescription
replaceable package MediumMedium in the component
pathLengthLength flow path [m]
dataLoss factor data
Nominal operating point
m_flow_nominalNominal mass flow rate [kg/s]
Assumptions
allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
momentumDynamicsFormulation of momentum balance
Advanced
dp_startGuess value of dp = port_a.p - port_b.p [Pa]
m_flow_startGuess value of m_flow = port_a.m_flow [kg/s]
m_flow_smallSmall 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

Connectors

NameDescription
port_aFluid connector a (positive design flow direction is from port_a to port_b)
port_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.TestWallFriction 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 BaseModel (Generic pressure drop component with constant turbulent loss factor data and without an icon).

Parameters

NameDescription
replaceable package MediumMedium in the component
dataLoss factor data
lengthLength of pipe [m]
diameterInner diameter of pipe [m]
roughnessAbsolute roughness of pipe (> 0 required, details see info layer) [m]
Nominal operating point
m_flow_nominalNominal mass flow rate [kg/s]
Assumptions
allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
dp_startGuess value of dp = port_a.p - port_b.p [Pa]
m_flow_startGuess value of m_flow = port_a.m_flow [kg/s]
m_flow_smallSmall 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

Connectors

NameDescription
port_aFluid connector a (positive design flow direction is from port_a to port_b)
port_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.BaseModelNonconstantCrossSectionArea 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), Modelica.Fluid.Interfaces.PartialLumpedFlow (Base class for a lumped momentum balance).

Parameters

NameDescription
replaceable package MediumMedium in the component
pathLengthLength flow path [m]
dataLoss factor data
Nominal operating point
m_flow_nominalNominal mass flow rate [kg/s]
Assumptions
allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
momentumDynamicsFormulation of momentum balance
Advanced
dp_startGuess value of dp = port_a.p - port_b.p [Pa]
m_flow_startGuess value of m_flow = port_a.m_flow [kg/s]
m_flow_smallSmall 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

Connectors

NameDescription
port_aFluid connector a (positive design flow direction is from port_a to port_b)
port_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.pressureLoss_m_flow_totalPressure 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

NameDescription
m_flowMass flow rate from port_a to port_b [kg/s]
rho_a_desDensity at port_a, mass flow in design direction a -> b [kg/m3]
rho_b_desDensity at port_b, mass flow in design direction a -> b [kg/m3]
rho_b_nondesDensity at port_b, mass flow against design direction a <- b [kg/m3]
rho_a_nondesDensity at port_a, mass flow against design direction a <- b [kg/m3]
dataConstant loss factors for both flow directions
m_flow_smallTurbulent flow if |m_flow| >= m_flow_small [kg/s]

Outputs

NameDescription
dpPressure drop (dp = port_a.p - port_b.p) [Pa]

Automatically generated Mon Sep 23 17:20:48 2013.