modelPlugFlow

Lossless pipe model with spatialDistribution plug flow implementation

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

Information

Model that computes the temperature propagation of a fluid flow through a pipe, idealized as a plug flow.

Main equation

The transport delay is computed using the one-dimensional wave equation without source or sink terms,

∂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 temperature propagation, z will be replaced by T.

Assumptions

This model is based on the following assumptions:

  • Axial diffusion in water is assumed to be negligibe.
  • The water temperature is assumed uniform in a cross section.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.LengthdhHydraulic diameter (assuming a round cross section area)
Modelica.Units.SI.LengthlengthPipe length
Modelica.Units.SI.AreaAModelica.Constants.pi*(dh/2)^2Cross-sectional area of pipe
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
Medium.MassFlowRatem_flow_smallSmall mass flow rate for regularization of zero flow
Initialization
Modelica.Units.SI.TemperatureT_start_inMedium.T_defaultInitial temperature in pipe at inlet
Modelica.Units.SI.TemperatureT_start_outMedium.T_defaultInitial temperature in pipe at outlet

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a (from PartialTwoPort)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bport_b (from PartialTwoPort)Fluid connector b (positive design flow direction is from port_a to port_b)

Components

TypeNameDefaultDescription
Modelica.Units.SI.LengthxSpatial coordinate for spatialDistribution operator
Modelica.Units.SI.VelocityvFlow velocity of medium in pipe
Modelica.Units.SI.VolumeFlowRateV_flowport_a.m_flow/Modelica.Fluid.Utilities.regStep(port_a.m_flow, Medium.density(Medium.setState_phX(p = port_a.p, h = inStream(port_a.h_outflow), X = inStream(port_a.Xi_outflow))), Medium.density(Medium.setState_phX(p = port_b.p, h = inStream(port_b.h_outflow), X = inStream(port_b.Xi_outflow))), m_flow_small)Volume flow rate at inflowing port (positive when flow from port_a to port_b)

Revisions

  • October 20, 2017, by Michael Wetter:
    Deleted various parameters and variables that were not used.
    Revised documentation to follow the guidelines.
  • May 19, 2016 by Marcus Fuchs:
    Remove condition on show_V_flow for calculation of V_flow to conform with pedantic checking.
  • October 10, 2015 by Marcus Fuchs:
    Copy Icon from KUL implementation and rename model.
  • June 23, 2015 by Marcus Fuchs:
    First implementation.