modelPlugFlowTransportDelay

Delay time for given normalized velocity

Information

Calculates time delay at both sides of the pipe as the difference between the current simulation time and the inlet time of the fluid at both ends of the pipe.

Main equation

∂z(x,t)/∂t + v(t) ∂z(x,t)/∂x = 0,

where z(x,t) is the spatial distribution as a function of time of any property z of the fluid. For the inlet time propagation, z will be replaced by the inlet time of the fluid tin.

Implementation

The inlet time is approached as a fluid property and its propagation follows the one-dimensional wave equation, implemented using the spatialDistribution function. This components requires the mass flow through the pipe and the pipe dimensions in order to derive information about the fluid propagation.

The component calculates the delay time at the inlet and the outlet port of the pipe. For the forward flow, the time delay is exposed at the output tau, and for the backward flow, the time delay is exposed at the output tauRev.

Assumption

No axial mixing takes place in the pipe.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.LengthlengthPipe length
Modelica.Units.SI.LengthdhHydraulic diameter (assuming a round cross section area)
Modelica.Units.SI.DensityrhoStandard density of fluid
Modelica.Units.SI.Timet_in_startif initDelay and (abs(m_flow_start) > 1E-10*m_flow_nominal) then min(length/m_flow_start*(rho*dh^2/4*Modelica.Constants.pi), 0) else 0Initial value of input time at inlet
Modelica.Units.SI.Timet_out_startif initDelay and (abs(m_flow_start) > 1E-10*m_flow_nominal) then min(-length/m_flow_start*(rho*dh^2/4*Modelica.Constants.pi), 0) else 0Initial value of input time at outlet
RealconUM4/rho/dh/dh/Modelica.Constants.pi/lengthConstant to convert mass flow rate into velocity normalized by the pipe length
Initialization
BooleaninitDelayfalseInitialize delay for a constant m_flow_start if true, otherwise start from 0
Modelica.Units.SI.MassFlowRatem_flow_start0Initialization of mass flow rate to calculate initial time delay
Nominal condition
Modelica.Units.SI.MassFlowRatem_flow_nominalNominal mass flow rate

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputm_flowMass flow of fluid
Modelica.Blocks.Interfaces.RealOutputtauTime delay for design flow direction
Modelica.Blocks.Interfaces.RealOutputtauRevTime delay for reverse flow

Components

TypeNameDefaultDescription
Modelica.Units.SI.Timetime_out_revReverse flow direction output time
Modelica.Units.SI.Timetime_out_desDesign flow direction output time
RealxSpatial coordinate for spatialDistribution operator
RealuNormalized fluid velocity (1/s)

Revisions

  • June 25, 2026, by Michael Wetter:
    Added nominal attribute to x.
    This is for IBPSA, #2132.
  • December 2, 2020, by Philipp Mehrfeld:
    Corrected calculation of tau and tauRev to be be only positive.
    This is for #1427.
  • December 14, 2018, by Michael Wetter:
    Corrected argument of spatialDistribution operator to be a parameter expression.
    This is for #1055.
  • September 9, 2016 by Bram van der Heijde:
    Rename from PDETime_massFlowMod to PlugFlowTransportDelayMod
  • December 2015 by Carles Ribas Tugores:
    Modification in delay calculation to fix issues.
  • November 6, 2015 by Bram van der Heijde:
    Adapted flow parameter to mass flow rate instead of velocity. This change should also fix the reverse and zero flow issues.
  • October 13, 2015 by Marcus Fuchs:
    Use abs() of normalized velocity input in order to avoid negative delay times.
  • July 2015 by Arnout Aertgeerts:
    First implementation.