Buildings.Fluid.Delays

Package with delay models

Information

This package contains component models for transport delays in piping networks.

The model Buildings.Fluid.Delays.DelayFirstOrder approximates transport delays using a first order differential equation.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Fluid.Delays.DelayFirstOrder DelayFirstOrder Delay element, approximated by a first order differential equation
Buildings.Fluid.Delays.Examples Examples Collection of models that illustrate model use and test models

Buildings.Fluid.Delays.DelayFirstOrder Buildings.Fluid.Delays.DelayFirstOrder

Delay element, approximated by a first order differential equation

Buildings.Fluid.Delays.DelayFirstOrder

Information

This model approximates a transport delay using a first order differential equations.

The model consists of a mixing volume with two ports. The size of the mixing volume is such that at the nominal mass flow rate m_flow_nominal, the time constant of the volume is equal to the parameter tau.

The heat flux connector is optional, it need not be connnected.

Extends from Buildings.Fluid.MixingVolumes.MixingVolume (Mixing volume with inlet and outlet ports (flow reversal is allowed)).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
VolumeVV_nominalVolume [m3]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
RealmSenFac1Factor for scaling the sensible thermal mass of the volume
Nominal condition
Timetau60Time constant at nominal flow [s]
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Booleanuse_C_flowfalseSet to true to enable input connector for trace substance
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal. Used only if model has two ports.

Connectors

TypeNameDescription
VesselFluidPorts_bports[nPorts]Fluid inlets and outlets
output RealOutputUInternal energy of the component [J]
output RealOutputmMass of the component [kg]
output RealOutputmXi[Medium.nXi]Species mass of the component [kg]
output RealOutputmC[Medium.nC]Trace substance mass of the component [kg]
HeatPort_aheatPortHeat port for heat exchange with the control volume
input RealInputC_flow[Medium.nC]Trace substance mass flow rate added to the medium

Modelica definition

model DelayFirstOrder "Delay element, approximated by a first order differential equation" extends Buildings.Fluid.MixingVolumes.MixingVolume(final V=V_nominal, final mSenFac=1); parameter Modelica.SIunits.Time tau = 60 "Time constant at nominal flow"; protected parameter Modelica.SIunits.Volume V_nominal = m_flow_nominal*tau/rho_default "Volume of delay element"; end DelayFirstOrder;