Modelica.Fluid.Pipes

Devices for conveying fluid

Information

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

Package Content

Name Description
Modelica.Fluid.Pipes.StaticPipe StaticPipe Basic pipe flow model without storage of mass or energy
Modelica.Fluid.Pipes.DynamicPipe DynamicPipe Dynamic pipe model with storage of mass and energy
Modelica.Fluid.Pipes.BaseClasses BaseClasses Base classes used in the Pipes package (only of interest to build new component models)

Modelica.Fluid.Pipes.StaticPipe Modelica.Fluid.Pipes.StaticPipe

Basic pipe flow model without storage of mass or energy

Information

Model of a straight pipe with constant cross section and with steady-state mass, momentum and energy balances, i.e., the model does not store mass or energy. There exist two thermodynamic states, one at each fluid port. The momentum balance is formulated for the two states, taking into account momentum flows, friction and gravity. The same result can be obtained by using DynamicPipe with steady-state dynamic settings. The intended use is to provide simple connections of vessels or other devices with storage, as it is done in:

Numerical Issues

With the stream connectors the thermodynamic states on the ports are generally defined by models with storage or by sources placed upstream and downstream of the static pipe. Other non storage components in the flow path may yield to state transformation. Note that this generally leads to nonlinear equation systems if multiple static pipes, or other flow models without storage, are directly connected.

Extends from Modelica.Fluid.Pipes.BaseClasses.PartialStraightPipe (Base class for straight pipe models).

Parameters

NameDescription
replaceable package MediumMedium in the component
Geometry
nParallelNumber of identical parallel pipes
lengthLength [m]
isCircular= true if cross sectional area is circular
diameterDiameter of circular pipe [m]
crossAreaInner cross section area [m2]
perimeterInner perimeter [m]
roughnessAverage height of surface asperities (default: smooth steel pipe) [m]
Static head
height_abHeight(port_b) - Height(port_a) [m]
Pressure loss
replaceable model FlowModelWall friction, gravity, momentum flow
Assumptions
allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Initialization
p_a_startStart value of pressure at port a [Pa]
p_b_startStart value of pressure at port b [Pa]
m_flow_startStart value for mass flow rate [kg/s]

Connectors

NameDescription
port_aFluid connector a (positive design flow direction is from port_a to port_b)
port_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica.Fluid.Pipes.DynamicPipe Modelica.Fluid.Pipes.DynamicPipe

Dynamic pipe model with storage of mass and energy

Information

Model of a straight pipe with distributed mass, energy and momentum balances. It provides the complete balance equations for one-dimensional fluid flow as formulated in UsersGuide.ComponentDefinition.BalanceEquations.

This generic model offers a large number of combinations of possible parameter settings. In order to reduce model complexity, consider defining and/or using a tailored model for the application at hand, such as HeatExchanger.

DynamicPipe treats the partial differential equations with the finite volume method and a staggered grid scheme for momentum balances. The pipe is split into nNodes equally spaced segments along the flow path. The default value is nNodes=2. This results in two lumped mass and energy balances and one lumped momentum balance across the dynamic pipe.

Note that this generally leads to high-index DAEs for pressure states if dynamic pipes are directly connected to each other, or generally to models with storage exposing a thermodynamic state through the port. This may not be valid if the dynamic pipe is connected to a model with non-differentiable pressure, like a Sources.Boundary_pT with prescribed jumping pressure. The modelStructure can be configured as appropriate in such situations, in order to place a momentum balance between a pressure state of the pipe and a non-differentiable boundary condition.

The default modelStructure is av_vb (see Advanced tab). The simplest possible alternative symmetric configuration, avoiding potential high-index DAEs at the cost of the potential introduction of nonlinear equation systems, is obtained with the setting nNodes=1, modelStructure=a_v_b. Depending on the configured model structure, the first and the last pipe segment, or the flow path length of the first and the last momentum balance, are of half size. See the documentation of the base class Pipes.BaseClasses.PartialTwoPortFlow, also covering asymmetric configurations.

The HeatTransfer component specifies the source term Qb_flows of the energy balance. The default component uses a constant coefficient for the heat transfer between the bulk flow and the segment boundaries exposed through the heatPorts. The HeatTransfer model is replaceable and can be exchanged with any model extended from BaseClasses.HeatTransfer.PartialFlowHeatTransfer.

The intended use is for complex networks of pipes and other flow devices, like valves. See, e.g.,

Extends from Modelica.Fluid.Pipes.BaseClasses.PartialStraightPipe (Base class for straight pipe models), BaseClasses.PartialTwoPortFlow (Base class for distributed flow models).

Parameters

NameDescription
replaceable package MediumMedium in the component
Geometry
nParallelNumber of identical parallel pipes
lengthLength [m]
isCircular= true if cross sectional area is circular
diameterDiameter of circular pipe [m]
crossAreaInner cross section area [m2]
perimeterInner perimeter [m]
roughnessAverage height of surface asperities (default: smooth steel pipe) [m]
lengths[n]lengths of flow segments [m]
crossAreas[n]cross flow areas of flow segments [m2]
dimensions[n]hydraulic diameters of flow segments [m]
roughnesses[n]Average heights of surface asperities [m]
Static head
height_abHeight(port_b) - Height(port_a) [m]
dheights[n]Differences in heights of flow segments [m]
Pressure loss
replaceable model FlowModelWall friction, gravity, momentum flow
Assumptions
allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
energyDynamicsFormulation of energy balances
massDynamicsFormulation of mass balances
momentumDynamicsFormulation of momentum balances
Heat transfer
use_HeatTransfer= true to use the HeatTransfer model
replaceable model HeatTransferWall heat transfer
Initialization
p_a_startStart value of pressure at port a [Pa]
p_b_startStart value of pressure at port b [Pa]
use_T_startUse T_start if true, otherwise h_start
T_startStart value of temperature [K]
h_startStart value of specific enthalpy [J/kg]
X_start[Medium.nX]Start value of mass fractions m_i/m [kg/kg]
C_start[Medium.nC]Start value of trace substances
m_flow_startStart value for mass flow rate [kg/s]
Advanced
nNodesNumber of discrete flow volumes
modelStructureDetermines whether flow or volume models are present at the ports
useLumpedPressure=true to lump pressure states together
useInnerPortProperties=true to take port properties for flow models from internal control volumes

Connectors

NameDescription
port_aFluid connector a (positive design flow direction is from port_a to port_b)
port_bFluid connector b (positive design flow direction is from port_a to port_b)
heatPorts[nNodes] 
Assumptions
Heat transfer
replaceable model HeatTransferWall heat transfer
Automatically generated Thu Dec 19 17:20:10 2019.