Buildings.Fluid.FMI.Interfaces

Package with interfaces for models that serves as an FMU container

Information

This package contains connectors that are used to export fluid flow models as Functional Mockup Units.

The connectors Buildings.Fluid.FMI.Interfaces.Inlet and Buildings.Fluid.FMI.Interfaces.Outlet are hierarchical. This was done for the exported FMUs to have hierarchical names for their input and output signals.

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

Package Content

Name Description
Buildings.Fluid.FMI.Interfaces.FluidProperties FluidProperties Type definition for fluid properties
Buildings.Fluid.FMI.Interfaces.Inlet Inlet Connector for fluid inlet
Buildings.Fluid.FMI.Interfaces.MassFractionConnector MassFractionConnector Connector for mass fraction of water vapor per kg total mass
Buildings.Fluid.FMI.Interfaces.Outlet Outlet Connector for fluid outlet
Buildings.Fluid.FMI.Interfaces.PressureInput PressureInput Connector for pressure input
Buildings.Fluid.FMI.Interfaces.PressureOutput PressureOutput Connector for pressure output

Buildings.Fluid.FMI.Interfaces.FluidProperties

Type definition for fluid properties

Information

This is a connector that declares the following fluid properties:

These quantities are used in the connectors Buildings.Fluid.FMI.Interfaces.Inlet and Buildings.Fluid.FMI.Interfaces.Outlet.

Note that none of these quantities is declared to be an input or output, because the role is reversed whether the properties are in inlet or outlet connector.

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model

Contents

TypeNameDescription
replaceable package MediumMedium model
TemperatureTTemperature [K]
MassFractionConnectorX_wWater vapor mass fractions per kg total air [1]
ExtraPropertyC[Medium.nC]Properties c_i/m

Modelica definition

connector FluidProperties "Type definition for fluid properties" replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium model"; Medium.Temperature T "Temperature"; Buildings.Fluid.FMI.Interfaces.MassFractionConnector X_w if Medium.nXi > 0 "Water vapor mass fractions per kg total air"; Medium.ExtraProperty C[Medium.nC] "Properties c_i/m"; end FluidProperties;

Buildings.Fluid.FMI.Interfaces.Inlet Buildings.Fluid.FMI.Interfaces.Inlet

Connector for fluid inlet

Information

This is a connector for a fluid inlet. The connector takes as an input the following quantities:

If allowFlowReversal = true, the connector also outputs the following quantities.

If allowFlowReversal = false, then these outputs are not present.

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model
Booleanuse_p_intrue= true to use a pressure from connector, false to output Medium.p_default
Assumptions
BooleanallowFlowReversaltrue= true to allow flow reversal, false restricts to design direction (inlet -> outlet)

Contents

TypeNameDescription
replaceable package MediumMedium model
Booleanuse_p_in= true to use a pressure from connector, false to output Medium.p_default
input MassFlowRatem_flowMass flow rate from the connection point into the component [kg/s]
input PressureInputpThermodynamic pressure in the connection point [Pa]
input FluidPropertiesforwardInflowing properties
output FluidPropertiesbackwardOutflowing properties
Assumptions
BooleanallowFlowReversal= true to allow flow reversal, false restricts to design direction (inlet -> outlet)

Modelica definition

connector Inlet "Connector for fluid inlet" replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium model"; parameter Boolean use_p_in = true "= true to use a pressure from connector, false to output Medium.p_default"; parameter Boolean allowFlowReversal = true "= true to allow flow reversal, false restricts to design direction (inlet -> outlet)"; input Medium.MassFlowRate m_flow "Mass flow rate from the connection point into the component"; Buildings.Fluid.FMI.Interfaces.PressureInput p if use_p_in "Thermodynamic pressure in the connection point"; input Buildings.Fluid.FMI.Interfaces.FluidProperties forward( redeclare final package Medium = Medium) "Inflowing properties"; output Buildings.Fluid.FMI.Interfaces.FluidProperties backward( redeclare final package Medium = Medium) if allowFlowReversal "Outflowing properties"; end Inlet;

Buildings.Fluid.FMI.Interfaces.MassFractionConnector

Connector for mass fraction of water vapor per kg total mass

Buildings.Fluid.FMI.Interfaces.MassFractionConnector

Information

Connector with variable of type Modelica.SIunits.MassFraction. Note that the mass fraction is in kg water vapor per total mass of air, rathern than per kg of dry air.

This connector has been implemented to conditionally remove the mass fraction if the medium has only one species. While this could have been done using a vector of mass fractions with zero length, as is used in fluid connectors, this implemantation uses a scalar to avoid vectorized inputs and outputs of FMUs.

Extends from Modelica.SIunits.MassFraction.

Modelica definition

connector MassFractionConnector = Modelica.SIunits.MassFraction "Connector for mass fraction of water vapor per kg total mass";

Buildings.Fluid.FMI.Interfaces.Outlet Buildings.Fluid.FMI.Interfaces.Outlet

Connector for fluid outlet

Information

This is a connector for a fluid outlet. The connector produces as an output the following quantities:

If allowFlowReversal = true, the connector requires as input the following quantities.

If allowFlowReversal = false, then these inputs are not present and hence not required to be provided.

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model
Booleanuse_p_intrue= true to use pressure connector, false to remove it
Assumptions
BooleanallowFlowReversaltrue= true to allow flow reversal, false restricts to design direction (inlet -> outlet)

Contents

TypeNameDescription
replaceable package MediumMedium model
Booleanuse_p_in= true to use pressure connector, false to remove it
output MassFlowRatem_flowMass flow rate from the connection point into the component [kg/s]
output PressureOutputpThermodynamic pressure in the connection point [Pa]
input FluidPropertiesbackwardInflowing properties
output FluidPropertiesforwardOutflowing properties
Assumptions
BooleanallowFlowReversal= true to allow flow reversal, false restricts to design direction (inlet -> outlet)

Modelica definition

connector Outlet "Connector for fluid outlet" replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium model"; parameter Boolean use_p_in = true "= true to use pressure connector, false to remove it"; parameter Boolean allowFlowReversal = true "= true to allow flow reversal, false restricts to design direction (inlet -> outlet)"; output Medium.MassFlowRate m_flow "Mass flow rate from the connection point into the component"; Buildings.Fluid.FMI.Interfaces.PressureOutput p if use_p_in "Thermodynamic pressure in the connection point"; input Buildings.Fluid.FMI.Interfaces.FluidProperties backward( redeclare final package Medium = Medium) if allowFlowReversal "Inflowing properties"; output Buildings.Fluid.FMI.Interfaces.FluidProperties forward( redeclare final package Medium = Medium) "Outflowing properties"; end Outlet;

Buildings.Fluid.FMI.Interfaces.PressureInput Buildings.Fluid.FMI.Interfaces.PressureInput

Connector for pressure input

Buildings.Fluid.FMI.Interfaces.PressureInput

Information

Connector with one input signal of type Modelica.SIunits.AbsolutePressure. This connector has been implemented to conditionally remove the pressure if no pressure drop calculation is requested.

Extends from Modelica.SIunits.AbsolutePressure.

Parameters

TypeNameDefaultDescription
 displayUnit"Pa" 

Modelica definition

connector PressureInput = input Modelica.SIunits.AbsolutePressure(displayUnit="Pa") "Connector for pressure input";

Buildings.Fluid.FMI.Interfaces.PressureOutput Buildings.Fluid.FMI.Interfaces.PressureOutput

Connector for pressure output

Buildings.Fluid.FMI.Interfaces.PressureOutput

Information

Connector with one output signal of type Modelica.SIunits.AbsolutePressure. This connector has been implemented to conditionally remove the pressure if no pressure drop calculation is requested.

Extends from Modelica.SIunits.AbsolutePressure.

Parameters

TypeNameDefaultDescription
 displayUnit"Pa" 

Modelica definition

connector PressureOutput = output Modelica.SIunits.AbsolutePressure(displayUnit="Pa") "Connector for pressure output";