Base classes used in the Pipes package (only of interest to build new component models)
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Name | Description |
---|---|
PartialStraightPipe | Base class for straight pipe models |
PartialTwoPortFlow | Base class for distributed flow models |
FlowModels | Flow models for pipes, including wall friction, static head and momentum flow |
HeatTransfer | Heat transfer for flow models |
CharacteristicNumbers | Functions to compute characteristic numbers |
WallFriction | Different variants for pressure drops due to pipe wall friction |
Base class for straight pipe models
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).
Name | Description |
---|---|
replaceable package Medium | Medium in the component |
Geometry | |
nParallel | Number of identical parallel pipes |
length | Length [m] |
isCircular | = true if cross sectional area is circular |
diameter | Diameter of circular pipe [m] |
crossArea | Inner cross section area [m2] |
perimeter | Inner perimeter [m] |
roughness | Average height of surface asperities (default: smooth steel pipe) [m] |
Static head | |
height_ab | Height(port_b) - Height(port_a) [m] |
Pressure loss | |
replaceable model FlowModel | Wall friction, gravity, momentum flow |
Assumptions | |
allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Name | Description |
---|---|
port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Pressure loss | |
replaceable model FlowModel | Wall friction, gravity, momentum flow |
Base class for distributed flow models
Base class for distributed flow models. The total volume is split into nNodes segments along the flow path. The default value is nNodes=2.
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:
Qb_flows[nNodes]
, the heat flow source terms, e.g., conductive heat flows across segment boundaries, andWb_flows[nNodes]
, the work source terms.
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
flowModel.use_Ib_flows
is true.
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):
av_vb
: Symmetric setting with nNodes-1 momentum balances between nNodes flow segments.
The ports port_a
and port_b
expose the first and the last thermodynamic state, respectively.
Connecting two or more flow devices therefore may result in high-index DAEs for the pressures of connected flow segments.a_v_b
: Alternative symmetric setting with nNodes+1 momentum balances across nNodes flow segments.
Half momentum balances are placed between port_a
and the first flow segment as well as between the last flow segment and port_b
.
Connecting two or more flow devices therefore results in algebraic pressures at the ports.
The specification of good start values for the port pressures is essential for the solution of large nonlinear equation systems.av_b
: Asymmetric setting with nNodes momentum balances, one between nth volume and port_b
, potential pressure state at port_a
a_vb
: Asymmetric setting with nNodes momentum balance, one between first volume and port_a
, potential pressure state at port_b
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).
Name | Description |
---|---|
replaceable package Medium | Medium in the component |
n | Number of discrete volumes |
Custom Parameters | |
fluidVolumes[n] | Discretized volume, determine in inheriting class [m3] |
Geometry | |
nParallel | Number 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 FlowModel | Wall friction, gravity, momentum flow |
Assumptions | |
allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |
energyDynamics | Formulation of energy balances |
massDynamics | Formulation of mass balances |
momentumDynamics | Formulation of momentum balances |
Initialization | |
p_a_start | Start value of pressure at port a [Pa] |
p_b_start | Start value of pressure at port b [Pa] |
use_T_start | Use T_start if true, otherwise h_start |
T_start | Start value of temperature [K] |
h_start | Start 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_start | Start value for mass flow rate [kg/s] |
Advanced | |
nNodes | Number of discrete flow volumes |
modelStructure | Determines 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 |
Name | Description |
---|---|
port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Pressure loss | |
replaceable model FlowModel | Wall friction, gravity, momentum flow |