Package Modelica.​Fluid.​Fittings
Adaptors for connections of fluid components and the regulation of fluid flow

Information

This sublibrary contains models and functions providing pressure loss correlations. All models in this library have the property that no mass and no energy is stored in the component. Therefore, none of the models have a state.

All functions are continuous and have a finite, non-zero, smooth, first derivative. The functions are all guaranteed to be strict monotonically increasing. The mentioned properties guarantee that a unique inverse of every function exists. Note, the usual quadratic pressure loss correlation

The two mentioned problems are solved in this package by approximating the characteristics around zero mass flow rates with appropriate polynomials. The monotonicity is guaranteed using results 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.​VariantsPackage (Icon for package containing variants).

Package Contents

NameDescription
AbruptAdaptorPressure drop in pipe due to suddenly expanding or reducing area (for both flow directions)
BaseClassesBase classes used in the Fittings package (only of interest to build new component models)
BendsFlow models for bends
GenericResistancesFlow models for generic resistances
MultiPortMultiply a port; useful if multiple connections shall be made to a port exposing a state
OrificesFlow models for orifices
SharpEdgedOrificePressure drop due to sharp edged orifice (for both flow directions)
SimpleGenericOrificeSimple generic orifice defined by pressure loss coefficient and diameter (only for flow from port_a to port_b)
TeeJunctionIdealSplitting/joining component with static balances for an infinitesimal control volume
TeeJunctionVolumeSplitting/joining component with static balances for a dynamic control volume

Model Modelica.​Fluid.​Fittings.​SimpleGenericOrifice
Simple generic orifice defined by pressure loss coefficient and diameter (only for flow from port_a to port_b)

Information

This pressure drop component defines a simple, generic orifice, where the loss factor ζ is provided for one flow direction (e.g., from loss table of a book):

   Δp = 0.5*ζ*ρ*v*|v|
      = 8*ζ/(π^2*D^4*ρ) * m_flow*|m_flow|

where

Since the pressure loss factor zeta is provided only for a mass flow from port_a to port_b, the pressure loss is not correct when the flow is reversing. If reversing flow only occurs in a short time interval, this is most likely uncritical. If significant reversing flow can appear, this component should not be used.

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
Diameterdiameter Diameter of orifice
Realzeta Loss factor for flow of port_a -> port_b
Booleanuse_zetatrue= false to obtain zeta from dp_nominal and m_flow_nominal
MassFlowRatem_flow_nominalif system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_smallMass flow rate for dp_nominal
Pressuredp_nominalif not system.use_eps_Re then 1000 else BaseClasses.lossConstant_D_zeta(diameter, zeta) / Medium.density_pTX(Medium.p_default, Medium.T_default, Medium.X_default) * m_flow_nominal ^ 2Nominal pressure drop
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)

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.​SharpEdgedOrifice
Pressure drop due to sharp edged orifice (for both flow directions)

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 LossFactorDatadataBaseClasses.QuadraticTurbulent.LossFactorData.sharpEdgedOrifice(diameter, leastDiameter, length, alpha)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 orifice
Diameterdiameter Inner diameter of pipe (= same at port_a and port_b)
DiameterleastDiameter Smallest diameter of orifice
Angle_degalpha Angle of orifice

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.​AbruptAdaptor
Pressure drop in pipe due to suddenly expanding or reducing area (for both flow directions)

Information

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

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
final LossFactorDatadataBaseClasses.QuadraticTurbulent.LossFactorData.suddenExpansion(diameter_a, diameter_b)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
Diameterdiameter_a Inner diameter of pipe at port_a
Diameterdiameter_b Inner diameter of pipe at port_b

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.​MultiPort
Multiply a port; useful if multiple connections shall be made to a port exposing a state

Information

This model is useful if multiple connections shall be made to a port of a volume model exposing a state, like a pipe with ModelStructure av_vb. The mixing is shifted into the volume connected to port_a and the result is propagated back to each ports_b.

If multiple connections were directly made to the volume, then ideal mixing would take place in the connection set, outside the volume. This is normally not intended.

Parameters

TypeNameDefaultDescription
IntegernPorts_b0Number of outlet ports (mass is distributed evenly between the outlet ports

Connectors

TypeNameDescription
FluidPort_aport_a 
FluidPorts_bports_b[nPorts_b] 

Model Modelica.​Fluid.​Fittings.​TeeJunctionIdeal
Splitting/joining component with static balances for an infinitesimal control volume

Information

This model is the simplest implementation for a splitting/joining component for three flows. Its use is not required. It just formulates the balance equations in the same way that the connect semantics would formulate them anyways. The main advantage of using this component is, that the user does not get confused when looking at the specific enthalpy at each port which might be confusing when not using a splitting/joining component. The reason for the confusion is that one examines the mixing enthalpy of the infinitesimal control volume introduced with the connect statement when looking at the specific enthalpy in the connector which might not be equal to the specific enthalpy at the port in the "real world".

Extends from Modelica.​Fluid.​Fittings.​BaseClasses.​PartialTeeJunction (Base class for a splitting/joining component with three ports).

Connectors

TypeNameDescription
FluidPort_aport_1 
FluidPort_bport_2 
FluidPort_aport_3 

Model Modelica.​Fluid.​Fittings.​TeeJunctionVolume
Splitting/joining component with static balances for a dynamic control volume

Information

This model introduces a mixing volume into a junction. This might be useful to examine the non-ideal mixing taking place in a real junction.

Extends from Modelica.​Fluid.​Fittings.​BaseClasses.​PartialTeeJunction (Base class for a splitting/joining component with three ports) and Modelica.​Fluid.​Interfaces.​PartialLumpedVolume (Lumped volume with mass and energy balance).

Parameters

TypeNameDefaultDescription
DynamicsenergyDynamicssystem.​energyDynamicsFormulation of energy balance
DynamicsmassDynamicssystem.​massDynamicsFormulation of mass balance
final DynamicssubstanceDynamicsmassDynamicsFormulation of substance balance
final DynamicstraceDynamicsmassDynamicsFormulation of trace substance balance
AbsolutePressurep_startsystem.​p_startStart value of pressure
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then system.T_start else Medium.temperature_phX(p_start, h_start, X_start)Start value of temperature
SpecificEnthalpyh_startif use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_defaultStart value of specific enthalpy
MassFractionX_start[Medium.nX]Medium.​X_defaultStart value of mass fractions m_i/m
ExtraPropertyC_start[Medium.nC]Medium.​C_defaultStart value of trace substances
VolumeV Mixing volume inside junction

Connectors

TypeNameDescription
FluidPort_aport_1 
FluidPort_bport_2 
FluidPort_aport_3