Package Modelica.​Media.​Examples.​Utilities
Functions, connectors and models needed for the media model tests

Information

Extends from Modelica.​Icons.​UtilitiesPackage (Icon for utility packages).

Package Contents

NameDescription
FixedAmbientAmbient pressure, temperature and mass fraction source
FixedMassFlowRateIdeal pump that produces a constant mass flow rate from a large reservoir at fixed temperature and mass fraction
FluidPortInterface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)
FluidPort_aFluid connector with filled icon
FluidPort_bFluid connector with outlined icon
PartialTestModelBasic test model to test a medium
PartialTestModel2Slightly larger test model to test a medium
PortVolumeFixed volume associated with a port by the finite volume method
ShortPipeSimple pressure loss in pipe

Connector Modelica.​Media.​Examples.​Utilities.​FluidPort
Interface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)

Information

Fields

TypeNameDescription
AbsolutePressurepPressure in the connection point
flow MassFlowRatem_flowMass flow rate from the connection point into the component
SpecificEnthalpyhSpecific mixture enthalpy in the connection point
flow EnthalpyFlowRateH_flowEnthalpy flow rate into the component (if m_flow > 0, H_flow = m_flow*h)
MassFractionXi[Medium.nXi]Independent mixture mass fractions m_i/m in the connection point
flow MassFlowRatemXi_flow[Medium.nXi]Mass flow rates of the independent substances from the connection point into the component (if m_flow > 0, mX_flow = m_flow*X)
ExtraPropertyC[Medium.nC]Properties c_i/m in the connection point
flow ExtraPropertyFlowRatemC_flow[Medium.nC]Flow rates of auxiliary properties from the connection point into the component (if m_flow > 0, mC_flow = m_flow*C)

Connector Modelica.​Media.​Examples.​Utilities.​FluidPort_a
Fluid connector with filled icon

Information

Modelica.Media.Examples.Tests.Components.FluidPort_a

Extends from Modelica.​Media.​Examples.​Utilities.​FluidPort (Interface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)).

Fields

TypeNameDescription
AbsolutePressurepPressure in the connection point
flow MassFlowRatem_flowMass flow rate from the connection point into the component
SpecificEnthalpyhSpecific mixture enthalpy in the connection point
flow EnthalpyFlowRateH_flowEnthalpy flow rate into the component (if m_flow > 0, H_flow = m_flow*h)
MassFractionXi[Medium.nXi]Independent mixture mass fractions m_i/m in the connection point
flow MassFlowRatemXi_flow[Medium.nXi]Mass flow rates of the independent substances from the connection point into the component (if m_flow > 0, mX_flow = m_flow*X)
ExtraPropertyC[Medium.nC]Properties c_i/m in the connection point
flow ExtraPropertyFlowRatemC_flow[Medium.nC]Flow rates of auxiliary properties from the connection point into the component (if m_flow > 0, mC_flow = m_flow*C)

Connector Modelica.​Media.​Examples.​Utilities.​FluidPort_b
Fluid connector with outlined icon

Information

Extends from Modelica.​Media.​Examples.​Utilities.​FluidPort (Interface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)).

Fields

TypeNameDescription
AbsolutePressurepPressure in the connection point
flow MassFlowRatem_flowMass flow rate from the connection point into the component
SpecificEnthalpyhSpecific mixture enthalpy in the connection point
flow EnthalpyFlowRateH_flowEnthalpy flow rate into the component (if m_flow > 0, H_flow = m_flow*h)
MassFractionXi[Medium.nXi]Independent mixture mass fractions m_i/m in the connection point
flow MassFlowRatemXi_flow[Medium.nXi]Mass flow rates of the independent substances from the connection point into the component (if m_flow > 0, mX_flow = m_flow*X)
ExtraPropertyC[Medium.nC]Properties c_i/m in the connection point
flow ExtraPropertyFlowRatemC_flow[Medium.nC]Flow rates of auxiliary properties from the connection point into the component (if m_flow > 0, mC_flow = m_flow*C)

Model Modelica.​Media.​Examples.​Utilities.​PortVolume
Fixed volume associated with a port by the finite volume method

Information

This component models the volume of fixed size that is associated with the fluid port to which it is connected. This means that all medium properties inside the volume, are identical to the port medium properties. In particular, the specific enthalpy inside the volume (= medium.h) is always identical to the specific enthalpy in the port (port.h = medium.h). Usually, this model is used when discretizing a component according to the finite volume method into volumes in internal ports that only store energy and mass and into transport elements that just transport energy, mass and momentum between the internal ports without storing these quantities during the transport.

Parameters

TypeNameDefaultDescription
VolumeV1e-6Fixed size of junction volume
Booleanuse_p_starttrueSelect p_start or d_start
AbsolutePressurep_start101325Initial pressure
Densityd_start1Initial density
Booleanuse_T_starttrueSelect T_start or h_start
TemperatureT_startModelica.SIunits.Conversions.from_degC(20)Initial temperature
SpecificEnthalpyh_start10000Initial specific enthalpy
MassFractionX_start[Medium.nX] Initial mass fractions m_i/m

Connectors

TypeNameDescription
FluidPort_aport 

Model Modelica.​Media.​Examples.​Utilities.​FixedMassFlowRate
Ideal pump that produces a constant mass flow rate from a large reservoir at fixed temperature and mass fraction

Information

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow Fixed mass flow rate from an infinite reservoir to the fluid port
Booleanuse_T_ambienttrueSelect T_ambient or h_ambient
TemperatureT_ambientModelica.SIunits.Conversions.from_degC(20)Ambient temperature
SpecificEnthalpyh_ambient10000Ambient specific enthalpy
MassFractionX_ambient[Medium.nX] Ambient mass fractions m_i/m of reservoir

Connectors

TypeNameDescription
FluidPort_bport 

Model Modelica.​Media.​Examples.​Utilities.​FixedAmbient
Ambient pressure, temperature and mass fraction source

Information

Model FixedAmbient_pt defines constant values for ambient conditions:

Note, that ambient temperature and mass fractions have only an effect if the mass flow is from the ambient into the port. If mass is flowing from the port into the ambient, the ambient definitions, with exception of ambient pressure, do not have an effect.

Parameters

TypeNameDefaultDescription
Booleanuse_p_ambienttrueSelect p_ambient or d_ambient
AbsolutePressurep_ambient101325Ambient pressure
Densityd_ambient1Ambient density
Booleanuse_T_ambienttrueSelect T_ambient or h_ambient
TemperatureT_ambientModelica.SIunits.Conversions.from_degC(20)Ambient temperature
SpecificEnthalpyh_ambient10000Ambient specific enthalpy
MassFractionX_ambient[Medium.nX] Ambient mass fractions m_i/m

Connectors

TypeNameDescription
FluidPort_bport 

Model Modelica.​Media.​Examples.​Utilities.​ShortPipe
Simple pressure loss in pipe

Information

Model ShortPipe defines a simple pipe model with pressure loss due to friction. It is assumed that no mass or energy is stored in the pipe.

Parameters

TypeNameDefaultDescription
AbsolutePressuredp_nominal Nominal pressure drop
MassFlowRatem_flow_nominal Nominal mass flow rate at nominal pressure drop

Connectors

TypeNameDescription
FluidPort_aport_a 
FluidPort_bport_b 

Partial Model Modelica.​Media.​Examples.​Utilities.​PartialTestModel
Basic test model to test a medium

Information

Parameters

TypeNameDefaultDescription
AbsolutePressurep_startMedium.​p_defaultInitial value of pressure
TemperatureT_startMedium.​T_defaultInitial value of temperature
SpecificEnthalpyh_startMedium.​h_defaultInitial value of specific enthalpy
RealX_start[Medium.nX]Medium.​X_defaultInitial value of mass fractions

Partial Model Modelica.​Media.​Examples.​Utilities.​PartialTestModel2
Slightly larger test model to test a medium

Information

Parameters

TypeNameDefaultDescription
AbsolutePressurep_start100000Initial value of pressure
TemperatureT_start300Initial value of temperature
SpecificEnthalpyh_start1Initial value of specific enthalpy
RealX_start[Medium.nX]Medium.​reference_XInitial value of mass fractions