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 Content

Name Description
Modelica.Fluid.Interfaces.FluidPort FluidPort Interface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)
Modelica.Fluid.Interfaces.FluidPort_a FluidPort_a Generic fluid connector at design inlet
Modelica.Fluid.Interfaces.FluidPort_b FluidPort_b Generic fluid connector at design outlet
Modelica.Fluid.Interfaces.FluidPorts_a FluidPorts_a Fluid connector with filled, large icon to be used for vectors of FluidPorts (vector dimensions must be added after dragging)
Modelica.Fluid.Interfaces.FluidPorts_b FluidPorts_b Fluid connector with outlined, large icon to be used for vectors of FluidPorts (vector dimensions must be added after dragging)
Modelica.Fluid.Interfaces.PartialTwoPort PartialTwoPort Partial component with two ports
Modelica.Fluid.Interfaces.PartialTwoPortTransport PartialTwoPortTransport Partial element transporting fluid between two ports without storage of mass or energy
Modelica.Fluid.Interfaces.HeatPorts_a HeatPorts_a HeatPort connector with filled, large icon to be used for vectors of HeatPorts (vector dimensions must be added after dragging)
Modelica.Fluid.Interfaces.HeatPorts_b HeatPorts_b HeatPort connector with filled, large icon to be used for vectors of HeatPorts (vector dimensions must be added after dragging)
Modelica.Fluid.Interfaces.PartialHeatTransfer PartialHeatTransfer Common interface for heat transfer models
Modelica.Fluid.Interfaces.PartialLumpedVolume PartialLumpedVolume Lumped volume with mass and energy balance
Modelica.Fluid.Interfaces.PartialLumpedFlow PartialLumpedFlow Base class for a lumped momentum balance
Modelica.Fluid.Interfaces.PartialDistributedVolume PartialDistributedVolume Base class for distributed volume models
Modelica.Fluid.Interfaces.PartialDistributedFlow PartialDistributedFlow Base class for a distributed momentum balance
Modelica.Fluid.Interfaces.PartialPressureLoss PartialPressureLoss Base flow model for pressure loss functions with the same area at port_a and at port_b

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)

Parameters

NameDescription
replaceable package MediumMedium model

Contents

NameDescription
replaceable package MediumMedium model
m_flowMass flow rate from the connection point into the component [kg/s]
pThermodynamic pressure in the connection point [Pa]
h_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0 [J/kg]
Xi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0 [kg/kg]
C_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Modelica.Fluid.Interfaces.FluidPort_a Modelica.Fluid.Interfaces.FluidPort_a

Generic fluid connector at design inlet

Information

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

Parameters

NameDescription
replaceable package MediumMedium model

Contents

NameDescription
m_flowMass flow rate from the connection point into the component [kg/s]
pThermodynamic pressure in the connection point [Pa]
h_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0 [J/kg]
Xi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0 [kg/kg]
C_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Modelica.Fluid.Interfaces.FluidPort_b Modelica.Fluid.Interfaces.FluidPort_b

Generic fluid connector at design outlet

Information

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

Parameters

NameDescription
replaceable package MediumMedium model

Contents

NameDescription
m_flowMass flow rate from the connection point into the component [kg/s]
pThermodynamic pressure in the connection point [Pa]
h_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0 [J/kg]
Xi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0 [kg/kg]
C_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Modelica.Fluid.Interfaces.FluidPorts_a 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)

Information

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

Parameters

NameDescription
replaceable package MediumMedium model

Contents

NameDescription
m_flowMass flow rate from the connection point into the component [kg/s]
pThermodynamic pressure in the connection point [Pa]
h_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0 [J/kg]
Xi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0 [kg/kg]
C_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Modelica.Fluid.Interfaces.FluidPorts_b 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)

Information

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

Parameters

NameDescription
replaceable package MediumMedium model

Contents

NameDescription
m_flowMass flow rate from the connection point into the component [kg/s]
pThermodynamic pressure in the connection point [Pa]
h_outflowSpecific thermodynamic enthalpy close to the connection point if m_flow < 0 [J/kg]
Xi_outflow[Medium.nXi]Independent mixture mass fractions m_i/m close to the connection point if m_flow < 0 [kg/kg]
C_outflow[Medium.nC]Properties c_i/m close to the connection point if m_flow < 0

Modelica.Fluid.Interfaces.PartialTwoPort 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

NameDescription
replaceable package MediumMedium in the component
Assumptions
allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)

Connectors

NameDescription
replaceable package MediumMedium in the component
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.Interfaces.PartialTwoPortTransport 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 PartialTwoPort (Partial component with two ports).

Parameters

NameDescription
replaceable package MediumMedium in the component
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]
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

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

Contents

NameDescription
TPort temperature [K]
Q_flowHeat flow rate (positive if flowing from outside into the component) [W]

Modelica.Fluid.Interfaces.HeatPorts_b 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).

Contents

NameDescription
TPort temperature [K]
Q_flowHeat flow rate (positive if flowing from outside into the component) [W]

Modelica.Fluid.Interfaces.PartialHeatTransfer 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

NameDescription
Ambient
kHeat transfer coefficient to ambient [W/(m2.K)]
T_ambientAmbient temperature [K]
Internal Interface
replaceable package MediumMedium in the component
nNumber of heat transfer segments
use_k= true to use k value for thermal isolation

Connectors

NameDescription
heatPorts[n]Heat port to component boundary
Internal Interface
replaceable package MediumMedium in the component

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

NameDescription
replaceable package MediumMedium in the component
Assumptions
Dynamics
energyDynamicsFormulation of energy balance
massDynamicsFormulation of mass balance
Initialization
p_startStart value of pressure [Pa]
use_T_start= true, use T_start, otherwise h_start
T_startStart value of temperature [K]
h_startStart value of specific enthalpy [J/kg]
X_start[Medium.nX]Start value of mass fractions m_i/m [kg/kg]
C_start[Medium.nC]Start value of trace substances

Connectors

NameDescription
replaceable package MediumMedium in the component

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

NameDescription
replaceable package MediumMedium in the component
Assumptions
allowFlowReversal= true to allow flow reversal, false restricts to design direction (m_flow >= 0)
Dynamics
momentumDynamicsFormulation of momentum balance
Initialization
m_flow_startStart value of mass flow rates [kg/s]

Connectors

NameDescription
replaceable package MediumMedium in the component

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

NameDescription
replaceable package MediumMedium in the component
nNumber of discrete volumes
Assumptions
Dynamics
energyDynamicsFormulation of energy balances
massDynamicsFormulation of mass balances
Initialization
p_a_startStart value of pressure at port a [Pa]
p_b_startStart value of pressure at port b [Pa]
use_T_startUse T_start if true, otherwise h_start
T_startStart value of temperature [K]
h_startStart value of specific enthalpy [J/kg]
X_start[Medium.nX]Start value of mass fractions m_i/m [kg/kg]
C_start[Medium.nC]Start value of trace substances

Connectors

NameDescription
replaceable package MediumMedium in the component

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

NameDescription
replaceable package MediumMedium in the component
mNumber of flow segments
Assumptions
allowFlowReversal= true to allow flow reversal, false restricts to design direction (m_flows >= zeros(m))
Dynamics
momentumDynamicsFormulation of momentum balance
Initialization
m_flow_startStart value of mass flow rates [kg/s]

Connectors

NameDescription
replaceable package MediumMedium in the component

Modelica.Fluid.Interfaces.PartialPressureLoss Modelica.Fluid.Interfaces.PartialPressureLoss

Base flow model for pressure loss functions with the same area at port_a and at port_b

Information

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

Parameters

NameDescription
replaceable package MediumMedium in the component
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]
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

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)
Automatically generated Mon Oct 1 14:51:07 2018.