Modelica.Fluid.Pipes.BaseClasses

Base classes used in the Pipes package (only of interest to build new component models)

Information

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Modelica.Fluid.Pipes.BaseClasses.PartialStraightPipe PartialStraightPipe Base class for straight pipe models
Modelica.Fluid.Pipes.BaseClasses.PartialTwoPortFlow PartialTwoPortFlow Base class for distributed flow models
Modelica.Fluid.Pipes.BaseClasses.FlowModels FlowModels Flow models for pipes, including wall friction, static head and momentum flow
Modelica.Fluid.Pipes.BaseClasses.HeatTransfer HeatTransfer Heat transfer for flow models
Modelica.Fluid.Pipes.BaseClasses.CharacteristicNumbers CharacteristicNumbers Functions to compute characteristic numbers
Modelica.Fluid.Pipes.BaseClasses.WallFriction WallFriction Different variants for pressure drops due to pipe wall friction

Modelica.Fluid.Pipes.BaseClasses.PartialStraightPipe Modelica.Fluid.Pipes.BaseClasses.PartialStraightPipe

Base class for straight pipe models

Information

Base class for one dimensional flow models. It specializes a PartialTwoPort with a parameter interface and icon graphics.

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

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)

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)
Pressure loss
replaceable model FlowModelWall friction, gravity, momentum flow

Modelica.Fluid.Pipes.BaseClasses.PartialTwoPortFlow Modelica.Fluid.Pipes.BaseClasses.PartialTwoPortFlow

Base class for distributed flow models

Information

Base class for distributed flow models. The total volume is split into nNodes segments along the flow path. The default value is nNodes=2.

Mass and Energy balances

The mass and energy balances are inherited from Interfaces.PartialDistributedVolume. One total mass and one energy balance is formed across each segment according to the finite volume approach. Substance mass balances are added if the medium contains more than one component.

An extending model needs to define the geometry and the difference in heights between the flow segments (static head). Moreover it needs to define two vectors of source terms for the distributed energy balance:

Momentum balance

The momentum balance is determined by the FlowModel component, which can be replaced with any model extended from BaseClasses.FlowModels.PartialStaggeredFlowModel. The default setting is DetailedPipeFlow.

This considers

Model Structure

The momentum balances are formulated across the segment boundaries along the flow path according to the staggered grid approach. The configurable modelStructure determines the formulation of the boundary conditions at port_a and port_b. The options include (default: av_vb):

When connecting two components, e.g., two pipes, the momentum balance across the connection point reduces to

pipe1.port_b.p = pipe2.port_a.p

This is only true if the flow velocity remains the same on each side of the connection. Consider using a fitting for any significant change in diameter or fluid density, if the resulting effects, such as change in kinetic energy, cannot be neglected. This also allows for taking into account friction losses with respect to the actual geometry of the connection point.

Extends from Modelica.Fluid.Interfaces.PartialTwoPort (Partial component with two ports), Modelica.Fluid.Interfaces.PartialDistributedVolume (Base class for distributed volume models).

Parameters

NameDescription
replaceable package MediumMedium in the component
nNumber of discrete volumes
Custom Parameters
fluidVolumes[n]Discretized volume, determine in inheriting class [m3]
Geometry
nParallelNumber of identical parallel flow devices
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
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
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)
Pressure loss
replaceable model FlowModelWall friction, gravity, momentum flow
Automatically generated Thu Dec 19 17:20:10 2019.