Package Modelica.​Fluid.​Interfaces
Interfaces for steady state and unsteady, mixed-phase, multi-substance, incompressible and compressible flow

Information

Extends from Modelica.​Icons.​InterfacesPackage (Icon for packages containing interfaces).

Package Contents

NameDescription
FluidPortInterface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)
FluidPort_aGeneric fluid connector at design inlet
FluidPort_bGeneric fluid connector at design outlet
FluidPorts_aFluid connector with filled, large icon to be used for vectors of FluidPorts (vector dimensions must be added after dragging)
FluidPorts_bFluid connector with outlined, large icon to be used for vectors of FluidPorts (vector dimensions must be added after dragging)
HeatPorts_aHeatPort connector with filled, large icon to be used for vectors of HeatPorts (vector dimensions must be added after dragging)
HeatPorts_bHeatPort connector with filled, large icon to be used for vectors of HeatPorts (vector dimensions must be added after dragging)
PartialDistributedFlowBase class for a distributed momentum balance
PartialDistributedVolumeBase class for distributed volume models
PartialHeatTransferCommon interface for heat transfer models
PartialLumpedFlowBase class for a lumped momentum balance
PartialLumpedVolumeLumped volume with mass and energy balance
PartialPressureLossBase flow model for pressure loss functions with the same area at port_a and at port_b
PartialTwoPortPartial component with two ports
PartialTwoPortTransportPartial element transporting fluid between two ports without storage of mass or energy

Connector Modelica.​Fluid.​Interfaces.​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
flow MassFlowRatem_flowMass flow rate from the connection point into the component
AbsolutePressurepThermodynamic pressure in the connection point
stream SpecificEnthalpyh_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0
stream MassFractionXi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0
stream ExtraPropertyC_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Connector Modelica.​Fluid.​Interfaces.​FluidPort_a
Generic fluid connector at design inlet

Extends from Modelica.​Fluid.​Interfaces.​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
flow MassFlowRatem_flowMass flow rate from the connection point into the component
AbsolutePressurepThermodynamic pressure in the connection point
stream SpecificEnthalpyh_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0
stream MassFractionXi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0
stream ExtraPropertyC_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Connector Modelica.​Fluid.​Interfaces.​FluidPort_b
Generic fluid connector at design outlet

Extends from Modelica.​Fluid.​Interfaces.​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
flow MassFlowRatem_flowMass flow rate from the connection point into the component
AbsolutePressurepThermodynamic pressure in the connection point
stream SpecificEnthalpyh_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0
stream MassFractionXi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0
stream ExtraPropertyC_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Connector Modelica.​Fluid.​Interfaces.​FluidPorts_a
Fluid connector with filled, large icon to be used for vectors of FluidPorts (vector dimensions must be added after dragging)

Extends from Modelica.​Fluid.​Interfaces.​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
flow MassFlowRatem_flowMass flow rate from the connection point into the component
AbsolutePressurepThermodynamic pressure in the connection point
stream SpecificEnthalpyh_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0
stream MassFractionXi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0
stream ExtraPropertyC_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Connector Modelica.​Fluid.​Interfaces.​FluidPorts_b
Fluid connector with outlined, large icon to be used for vectors of FluidPorts (vector dimensions must be added after dragging)

Extends from Modelica.​Fluid.​Interfaces.​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
flow MassFlowRatem_flowMass flow rate from the connection point into the component
AbsolutePressurepThermodynamic pressure in the connection point
stream SpecificEnthalpyh_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0
stream MassFractionXi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0
stream ExtraPropertyC_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Partial Model Modelica.​Fluid.​Interfaces.​PartialTwoPort
Partial component with two ports

Information

This partial model defines an interface for components with two ports. The treatment of the design flow direction and of flow reversal are predefined based on the parameter allowFlowReversal. The component may transport fluid and may have internal storage for a given fluid Medium.

An extending model providing direct access to internal storage of mass or energy through port_a or port_b should redefine the protected parameters port_a_exposesState and port_b_exposesState appropriately. This will be visualized at the port icons, in order to improve the understanding of fluid model diagrams.

Parameters

TypeNameDefaultDescription
BooleanallowFlowReversalsystem.​allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> 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)

Partial Model Modelica.​Fluid.​Interfaces.​PartialTwoPortTransport
Partial element transporting fluid between two ports without storage of mass or energy

Information

This component transports fluid between its two ports, without storing mass or energy. Energy may be exchanged with the environment though, e.g., in the form of work. PartialTwoPortTransport is intended as base class for devices like orifices, valves and simple fluid machines.

Three equations need to be added by an extending class using this component:

Moreover appropriate values shall be assigned to the following parameters:

Extends from Modelica.​Fluid.​Interfaces.​PartialTwoPort (Partial component with two ports).

Parameters

TypeNameDefaultDescription
BooleanallowFlowReversalsystem.​allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
AbsolutePressuredp_start0.01 * system.p_startGuess 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 * system.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

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)

Connector Modelica.​Fluid.​Interfaces.​HeatPorts_a
HeatPort connector with filled, large icon to be used for vectors of HeatPorts (vector dimensions must be added after dragging)

Information

Extends from Modelica.​Thermal.​HeatTransfer.​Interfaces.​HeatPort (Thermal port for 1-dim. heat transfer).

Fields

TypeNameDescription
TemperatureTPort temperature
flow HeatFlowRateQ_flowHeat flow rate (positive if flowing from outside into the component)

Connector Modelica.​Fluid.​Interfaces.​HeatPorts_b
HeatPort connector with filled, large icon to be used for vectors of HeatPorts (vector dimensions must be added after dragging)

Information

Extends from Modelica.​Thermal.​HeatTransfer.​Interfaces.​HeatPort (Thermal port for 1-dim. heat transfer).

Fields

TypeNameDescription
TemperatureTPort temperature
flow HeatFlowRateQ_flowHeat flow rate (positive if flowing from outside into the component)

Partial Model Modelica.​Fluid.​Interfaces.​PartialHeatTransfer
Common interface for heat transfer models

Information

This component is a common interface for heat transfer models. The heat flow rates Q_flows[n] through the boundaries of n flow segments are obtained as function of the thermodynamic states of the flow segments for a given fluid Medium, the surfaceAreas[n] and the boundary temperatures heatPorts[n].T.

The heat loss coefficient k can be used to model a thermal isolation between heatPorts.T and T_ambient.

An extending model implementing this interface needs to define one equation: the relation between the predefined fluid temperatures Ts[n], the boundary temperatures heatPorts[n].T, and the heat flow rates Q_flows[n].

Parameters

TypeNameDefaultDescription
Integern1Number of heat transfer segments
Booleanuse_kfalse= true to use k value for thermal isolation
CoefficientOfHeatTransferk0Heat transfer coefficient to ambient
TemperatureT_ambientsystem.​T_ambientAmbient temperature

Connectors

TypeNameDescription
HeatPorts_aheatPorts[n]Heat port to component boundary

Partial Model Modelica.​Fluid.​Interfaces.​PartialLumpedVolume
Lumped volume with mass and energy balance

Information

Interface and base class for an ideally mixed fluid volume with the ability to store mass and energy. The following boundary flow and source terms are part of the energy balance and must be specified in an extending class:

The component volume fluidVolume is an input that needs to be set in the extending class to complete the model.

Further source terms must be defined by an extending class for fluid flow across the segment boundary:

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

Partial Model Modelica.​Fluid.​Interfaces.​PartialLumpedFlow
Base class for a lumped momentum balance

Information

Interface and base class for a momentum balance, defining the mass flow rate m_flow of a given Medium in a flow model.

The following boundary flow and force terms are part of the momentum balance and must be specified in an extending model (to zero if not considered):

The length of the flow path pathLength is an input that needs to be set in an extending class to complete the model.

Parameters

TypeNameDefaultDescription
BooleanallowFlowReversalsystem.​allowFlowReversal= true to allow flow reversal, false restricts to design direction (m_flow >= 0)
DynamicsmomentumDynamicssystem.​momentumDynamicsFormulation of momentum balance
MassFlowRatem_flow_startsystem.​m_flow_startStart value of mass flow rates

Partial Model Modelica.​Fluid.​Interfaces.​PartialDistributedVolume
Base class for distributed volume models

Information

Interface and base class for n ideally mixed fluid volumes with the ability to store mass and energy. It is intended to model a one-dimensional spatial discretization of fluid flow according to the finite volume method. The following boundary flow and source terms are part of the energy balance and must be specified in an extending class:

The component volumes fluidVolumes[n] are an input that needs to be set in an extending class to complete the model.

Further source terms must be defined by an extending class for fluid flow across the segment boundary:

Parameters

TypeNameDefaultDescription
Integern2Number of discrete volumes
DynamicsenergyDynamicssystem.​energyDynamicsFormulation of energy balances
DynamicsmassDynamicssystem.​massDynamicsFormulation of mass balances
final DynamicssubstanceDynamicsmassDynamicsFormulation of substance balances
final DynamicstraceDynamicsmassDynamicsFormulation of trace substance balances
AbsolutePressurep_a_startsystem.​p_startStart value of pressure at port a
AbsolutePressurep_b_startp_a_startStart value of pressure at port b
final AbsolutePressureps_start[n]if 1 < n then linspace(p_a_start, p_b_start, n) else {0.5 * (p_a_start + p_b_start)}Start value of pressure
Booleanuse_T_starttrueUse T_start if true, otherwise h_start
TemperatureT_startif use_T_start then system.T_start else Medium.temperature_phX(0.5 * (p_a_start + p_b_start), h_start, X_start)Start value of temperature
SpecificEnthalpyh_startif use_T_start then Medium.specificEnthalpy_pTX(0.5 * (p_a_start + p_b_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

Partial Model Modelica.​Fluid.​Interfaces.​PartialDistributedFlow
Base class for a distributed momentum balance

Information

Interface and base class for m momentum balances, defining the mass flow rates m_flows[m] of a given Medium in m flow segments.

The following boundary flow and force terms are part of the momentum balances and must be specified in an extending model (to zero if not considered):

The lengths along the flow path pathLengths[m] are an input that needs to be set in an extending class to complete the model.

Parameters

TypeNameDefaultDescription
BooleanallowFlowReversalsystem.​allowFlowReversal= true to allow flow reversal, false restricts to design direction (m_flows >= zeros(m))
Integerm1Number of flow segments
DynamicsmomentumDynamicssystem.​momentumDynamicsFormulation of momentum balance
MassFlowRatem_flow_startsystem.​m_flow_startStart value of mass flow rates

Partial Model Modelica.​Fluid.​Interfaces.​PartialPressureLoss
Base flow model for pressure loss functions with the same area at port_a and at port_b

Information

This component transports fluid between its two ports, without storing mass or energy. Energy may be exchanged with the environment though, e.g., in the form of work. PartialTwoPortTransport is intended as base class for devices like orifices, valves and simple fluid machines.

Three equations need to be added by an extending class using this component:

Moreover appropriate values shall be assigned to the following parameters:

Extends from Modelica.​Fluid.​Interfaces.​PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy).

Parameters

TypeNameDefaultDescription
BooleanallowFlowReversalsystem.​allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
AbsolutePressuredp_start0.01 * system.p_startGuess 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 * system.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

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)

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