This icon shall be used for a package/library that contains base models and classes, respectively.
Extends from Modelica.Icons.BasesPackage
(Icon for packages containing base classes).
Name | Description |
---|---|
CharacteristicNumbers … | Functions to compute characteristic numbers |
FlowModels … | Flow models for pipes, including wall friction, static head and momentum flow |
HeatTransfer … | Heat transfer for flow models |
PartialStraightPipe | Base class for straight pipe models |
PartialTwoPortFlow | Base class for distributed flow models |
WallFriction … | Different variants for pressure drops due to pipe wall friction |
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).
Type | Name | Default | Description |
---|---|---|---|
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Real | nParallel | 1 | Number of identical parallel pipes |
Length | length | Length | |
Boolean | isCircular | true | = true if cross sectional area is circular |
Diameter | diameter | Diameter of circular pipe | |
Area | crossArea | 0.25 * (Modelica.Constants.pi * diameter * diameter) | Inner cross section area |
Length | perimeter | Modelica.Constants.pi * diameter | Inner perimeter |
Height | roughness | 2.5e-5 | Average height of surface asperities (default: smooth steel pipe) |
final Volume | V | crossArea * length * nParallel | volume size |
Length | height_ab | 0 | Height(port_b) - Height(port_a) |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
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) and Modelica.Fluid.Interfaces.PartialDistributedVolume
(Base class for distributed volume models).
Type | Name | Default | Description |
---|---|---|---|
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
final Integer | n | nNodes | Number of discrete volumes |
Dynamics | energyDynamics | system.energyDynamics | Formulation of energy balances |
Dynamics | massDynamics | system.massDynamics | Formulation of mass balances |
final Dynamics | substanceDynamics | massDynamics | Formulation of substance balances |
final Dynamics | traceDynamics | massDynamics | Formulation of trace substance balances |
AbsolutePressure | p_a_start | system.p_start | Start value of pressure at port a |
AbsolutePressure | p_b_start | p_a_start | Start value of pressure at port b |
final AbsolutePressure | ps_start[n] | if 1 < n then linspace(p_a_start, p_b_start, n) else {0.5 * (p_a_start + p_b_start)} | Start value of pressure |
Boolean | use_T_start | true | Use T_start if true, otherwise h_start |
Temperature | T_start | if use_T_start then system.T_start else Medium.temperature_phX(0.5 * (p_a_start + p_b_start), h_start, X_start) | Start value of temperature |
SpecificEnthalpy | h_start | if use_T_start then Medium.specificEnthalpy_pTX(0.5 * (p_a_start + p_b_start), T_start, X_start) else Medium.h_default | Start value of specific enthalpy |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m |
ExtraProperty | C_start[Medium.nC] | Medium.C_default | Start value of trace substances |
Real | nParallel | 1 | Number of identical parallel flow devices |
Length | lengths[n] | lengths of flow segments | |
Area | crossAreas[n] | cross flow areas of flow segments | |
Length | dimensions[n] | hydraulic diameters of flow segments | |
Height | roughnesses[n] | Average heights of surface asperities | |
Length | dheights[n] | zeros(n) | Differences in heights of flow segments |
Dynamics | momentumDynamics | system.momentumDynamics | Formulation of momentum balances |
MassFlowRate | m_flow_start | system.m_flow_start | Start value for mass flow rate |
Integer | nNodes | 2 | Number of discrete flow volumes |
ModelStructure | modelStructure | Types.ModelStructure.av_vb | Determines whether flow or volume models are present at the ports |
Boolean | useLumpedPressure | false | =true to lump pressure states together |
final Integer | nFM | if useLumpedPressure then nFMLumped else nFMDistributed | number of flow models in flowModel |
final Integer | nFMDistributed | if modelStructure == Types.ModelStructure.a_v_b then n + 1 else if modelStructure == Types.ModelStructure.a_vb or modelStructure == Types.ModelStructure.av_b then n else n - 1 |   |
final Integer | nFMLumped | if modelStructure == Types.ModelStructure.a_v_b then 2 else 1 |   |
final Integer | iLumped | integer(0.5 * n) + 1 | Index of control volume with representative state if useLumpedPressure |
Boolean | useInnerPortProperties | false | =true to take port properties for flow models from internal control volumes |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Generated 2018-12-12 12:13:24 EST by MapleSim.