modelPartialStaggeredFlowModel
Extends from Modelica.Fluid.Interfaces.PartialDistributedFlow (Base class for a distributed momentum balance).
Information
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
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | m (from PartialDistributedFlow) | 1 | Number of flow segments |
| SI.ReynoldsNumber | Re_turbulent | 4000 | Start of turbulent regime, depending on type of flow device |
| Internal interface | |||
| Integer | n | 2 | Number of discrete flow volumes |
| Internal interface › Geometry | |||
| Real | nParallel | Number of identical parallel flow devices | |
| Internal interface › Static head | |||
| SI.Acceleration | g | system.g | Constant gravity acceleration |
| Internal interface › Assumptions | |||
| Boolean | allowFlowReversal | system.allowFlowReversal | = true, if flow reversal is enabled, otherwise restrict flow to design direction (states[1] -> states[n+1]) |
| Modelica.Fluid.Types.Dynamics | momentumDynamics | system.momentumDynamics | Formulation of momentum balance |
| Internal interface › Initialization | |||
| Medium.MassFlowRate | m_flow_start | system.m_flow_start | Start value of mass flow rates |
| Medium.AbsolutePressure | p_a_start | Start value for p[1] at design inflow | |
| Medium.AbsolutePressure | p_b_start | Start value for p[n+1] at design outflow | |
| Advanced | |||
| Boolean | useUpstreamScheme | true | = false to average upstream and downstream properties across flow segments |
| Boolean | use_Ib_flows | momentumDynamics <> Types.Dynamics.SteadyState | = true to consider differences in flow of momentum through boundaries |
| Diagnostics | |||
| Boolean | show_Res | false | = true, if Reynolds numbers are included for plotting |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium.ThermodynamicState | states | Thermodynamic states along design flow | |
| SI.Velocity | vs | Mean velocities of fluid flow | |
| SI.Area | crossAreas | Cross flow areas at segment boundaries | |
| SI.Length | dimensions | Characteristic dimensions for fluid flow (diameters for pipe flow) | |
| Modelica.Fluid.Types.Roughness | roughnesses | Average height of surface asperities | |
| SI.Length | dheights | Height(states[2:n]) - Height(states[1:n-1]) | |
| Modelica.Fluid.System | system (from PartialDistributedFlow) | System properties | |
| SI.Length | pathLengths (from PartialDistributedFlow) | Lengths along flow path | |
| Medium.MassFlowRate | m_flows (from PartialDistributedFlow) | Mass flow rates between states | |
| SI.Momentum | Is (from PartialDistributedFlow) | Momenta of flow segments | |
| SI.Force | Ib_flows (from PartialDistributedFlow) | Flow of momentum across boundaries | |
| SI.Force | Fs_p (from PartialDistributedFlow) | Pressure forces | |
| SI.Force | Fs_fg (from PartialDistributedFlow) | Friction and gravity forces | |
| Medium.Density | rhos | if use_rho_nominal then fill(rho_nominal, n) else Medium.density(states) | |
| Medium.Density | rhos_act | Actual density per segment | |
| Medium.DynamicViscosity | mus | if use_mu_nominal then fill(mu_nominal, n) else Medium.dynamicViscosity(states) | |
| Medium.DynamicViscosity | mus_act | Actual viscosity per segment | |
| SI.Pressure | dps_fg | Pressure drop between states | |
| SI.ReynoldsNumber | Res | Modelica.Fluid.Pipes.BaseClasses.CharacteristicNumbers.ReynoldsNumber(vs, rhos, mus, dimensions) | Reynolds numbers |
| Medium.MassFlowRate | m_flows_turbulent | {nParallel*(crossAreas[i] + crossAreas[i + 1])/(dimensions[i] + dimensions[i + 1])*mus_act[i]*Re_turbulent for i in 1:n - 1} | Start of turbulent flow |
Contents
| Name | Description |
|---|---|
| Medium in the component |