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
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Length | dh | Hydraulic diameter (assuming a round cross section area) | |
| Modelica.Units.SI.Length | length | Pipe length | |
| Modelica.Units.SI.Area | A | Modelica.Constants.pi*(dh/2)^2 | Cross-sectional area of pipe |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Advanced | |||
| Medium.MassFlowRate | m_flow_small | Small mass flow rate for regularization of zero flow | |
| Initialization | |||
| Modelica.Units.SI.Temperature | T_start_in | Medium.T_default | Initial temperature in pipe at inlet |
| Modelica.Units.SI.Temperature | T_start_out | Medium.T_default | Initial temperature in pipe at outlet |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a (from PartialTwoPort) | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from PartialTwoPort) | Fluid connector b (positive design flow direction is from port_a to port_b) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Length | x | Spatial coordinate for spatialDistribution operator | |
| Modelica.Units.SI.Velocity | v | Flow velocity of medium in pipe | |
| Modelica.Units.SI.VolumeFlowRate | V_flow | port_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 onshow_V_flowfor calculation ofV_flowto 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.