PartialStaggeredFlowModel

Base class for momentum balances in flow models

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

This partial model defines a common interface for m=n-1 flow models between n device segments. The flow models provide a steady-state or dynamic momentum balance using an upwind discretization scheme per default. Extending models must add pressure loss terms for friction and gravity.

The fluid is specified in the interface with the thermodynamic states[n] for a given Medium model. The geometry is specified with the pathLengths[n-1] between the device segments as well as with the crossAreas[n] and the roughnesses[n] of the device segments. Moreover the fluid flow is characterized for different types of devices by the characteristic dimensions[n] and the average velocities vs[n] of fluid flow in the device segments. See Pipes.BaseClasses.CharacteristicNumbers.ReynoldsNumber for example definitions.

The parameter Re_turbulent can be specified for the least mass flow rate of the turbulent regime. It defaults to 4000, which is appropriate for pipe flow. The m_flows_turbulent[n-1] resulting from Re_turbulent can optionally be calculated together with the Reynolds numbers Res[n] of the device segments (show_Res=true).

Using the thermodynamic states[n] of the device segments, the densities rhos[n] and the dynamic viscosities mus[n] of the segments as well as the actual densities rhos_act[n-1] and the actual viscosities mus_act[n-1] of the flows are predefined in this base model. Note that no events are raised on flow reversal. This needs to be treated by an extending model, e.g., with numerical smoothing or by raising events as appropriate.

Parameters (13)

m

Value: n - 1

Type: Integer

Description: Number of flow segments

n

Value: 2

Type: Integer

Description: Number of discrete flow volumes

nParallel

Value:

Type: Real

Description: number of identical parallel flow devices

g

Value: system.g

Type: Acceleration (m/s²)

Description: Constant gravity acceleration

allowFlowReversal

Value: system.allowFlowReversal

Type: Boolean

Description: = true to allow flow reversal, false restricts to design direction (states[1] -> states[n+1])

momentumDynamics

Value: system.momentumDynamics

Type: Dynamics

Description: Formulation of momentum balance

m_flow_start

Value: system.m_flow_start

Type: MassFlowRate (kg/s)

Description: Start value of mass flow rates

p_a_start

Value:

Type: AbsolutePressure (Pa)

Description: Start value for p[1] at design inflow

p_b_start

Value:

Type: AbsolutePressure (Pa)

Description: Start value for p[n+1] at design outflow

useUpstreamScheme

Value: true

Type: Boolean

Description: = false to average upstream and downstream properties across flow segments

use_Ib_flows

Value: momentumDynamics <> Types.Dynamics.SteadyState

Type: Boolean

Description: = true to consider differences in flow of momentum through boundaries

Re_turbulent

Value: 4000

Type: ReynoldsNumber

Description: Start of turbulent regime, depending on type of flow device

show_Res

Value: false

Type: Boolean

Description: = true, if Reynolds numbers are included for plotting

Inputs (7)

pathLengths

Type: Length[m] (m)

Description: Lengths along flow path

states

Type: ThermodynamicState[n]

Description: Thermodynamic states along design flow

vs

Type: Velocity[n] (m/s)

Description: Mean velocities of fluid flow

crossAreas

Type: Area[n] (m²)

Description: Cross flow areas at segment boundaries

dimensions

Type: Length[n] (m)

Description: Characteristic dimensions for fluid flow (diameters for pipe flow)

roughnesses

Type: Roughness[n] (m)

Description: Average height of surface asperities

dheights

Type: Length[n - 1] (m)

Description: Height(states[2:n]) - Height(states[1:n-1])

Components (2)

system

Type: System

Description: System properties

states

Type: ThermodynamicState[n]

Description: Thermodynamic states along design flow

Extended by (2)

PartialGenericPipeFlow

Modelica.Fluid.Pipes.BaseClasses.FlowModels

GenericPipeFlow: Pipe flow pressure loss and gravity with replaceable WallFriction package

NominalLaminarFlow

Modelica.Fluid.Pipes.BaseClasses.FlowModels

NominalLaminarFlow: Linear laminar flow for given nominal values