Package Modelica.​Fluid.​Types
Common types for fluid models

Information

Extends from Modelica.​Icons.​TypesPackage (Icon for packages containing type definitions).

Package Contents

NameDescription
CvTypesEnumeration to define the choice of valve flow coefficient
DynamicsEnumeration to define definition of balance equations
HydraulicConductanceReal type for hydraulic conductance
HydraulicResistanceReal type for hydraulic resistance
ModelStructureEnumeration with choices for model structure in distributed pipe model
PortFlowDirectionEnumeration to define whether flow reversal is allowed
RoughnessReal type for roughness of a pipe

Type Modelica.​Fluid.​Types.​HydraulicConductance
Real type for hydraulic conductance

Information

This icon is designed for a Real type.

Extends from Modelica.​Icons.​TypeReal (Icon for Real types).

Attributes

NameValue
quantity"HydraulicConductance"
unit"kg/(s.Pa)"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Fluid.​Types.​HydraulicResistance
Real type for hydraulic resistance

Information

This icon is designed for a Real type.

Extends from Modelica.​Icons.​TypeReal (Icon for Real types).

Attributes

NameValue
quantity"HydraulicResistance"
unit"Pa.s/kg"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Fluid.​Types.​Roughness
Real type for roughness of a pipe

Information

This Real type defines the absolute roughness of the inner surface of a pipe or fitting, i.e., the absolute average height of surface asperities. It has usually to be estimated. In [Idelchik 1994, pp. 105-109, Table 2-5; Miller 1990, p. 190, Table 8-1] many examples are given. As a short summary:

Type of pipe Roughness
Smooth pipes Drawn brass, copper, aluminium, glass, etc. 0.0025 mm
Steel pipes New smooth pipes 0.025 mm
Mortar lined, average finish 0.1 mm
Heavy rust 1 mm
Concrete pipes Steel forms, first class workmanship 0.025 mm
Steel forms, average workmanship 0.1 mm
Block linings 1 mm

References

Idelchik I.E. (1994):
Handbook of Hydraulic Resistance. 3rd edition, Begell House, ISBN 0-8493-9908-4
Miller D. S. (1990):
Internal flow systems. 2nd edition. Cranfield:BHRA(Information Services).

Extends from Modelica.​Icons.​TypeReal (Icon for Real types).

Attributes

NameValue
quantity"Length"
unit"m"
displayUnit"mm"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Enumeration Modelica.​Fluid.​Types.​Dynamics
Enumeration to define definition of balance equations

Information

Enumeration to define the formulation of balance equations (to be selected via choices menu):

Dynamics.Meaning
DynamicFreeInitialDynamic balance, Initial guess value
FixedInitialDynamic balance, Initial value fixed
SteadyStateInitialDynamic balance, Steady state initial with guess value
SteadyStateSteady state balance, Initial guess value

The enumeration "Dynamics" is used for the mass, energy and momentum balance equations respectively. The exact meaning for the three balance equations is stated in the following tables:

Mass balance
Dynamics. Balance equation Initial condition
DynamicFreeInitial no restrictions no initial conditions
FixedInitial no restrictions if Medium.singleState then
  no initial condition
else p=p_start
SteadyStateInitial no restrictions if Medium.singleState then
  no initial condition
else der(p)=0
SteadyState der(m)=0 no initial conditions
 
Energy balance
Dynamics. Balance equation Initial condition
DynamicFreeInitial no restrictions no initial conditions
FixedInitial no restrictions T=T_start or h=h_start
SteadyStateInitial no restrictions der(T)=0 or der(h)=0
SteadyState der(U)=0 no initial conditions
 
Momentum balance
Dynamics. Balance equation Initial condition
DynamicFreeInitial no restrictions no initial conditions
FixedInitial no restrictions m_flow = m_flow_start
SteadyStateInitial no restrictions der(m_flow)=0
SteadyState der(m_flow)=0 no initial conditions

In the tables above, the equations are given for one-substance fluids. For multiple-substance fluids and for trace substances, equivalent equations hold.

Medium.singleState is a medium property and defines whether the medium is only described by one state (+ the mass fractions in case of a multi-substance fluid). In such a case one initial condition less must be provided. For example, incompressible media have Medium.singleState = true.

Literals

NameDescription
DynamicFreeInitialDynamicFreeInitial -- Dynamic balance, Initial guess value
FixedInitialFixedInitial -- Dynamic balance, Initial value fixed
SteadyStateInitialSteadyStateInitial -- Dynamic balance, Steady state initial with guess value
SteadyStateSteadyState -- Steady state balance, Initial guess value

Enumeration Modelica.​Fluid.​Types.​CvTypes
Enumeration to define the choice of valve flow coefficient

Information

Enumeration to define the choice of valve flow coefficient (to be selected via choices menu):

CvTypes. Meaning
Av Av (metric) flow coefficient
Kv Kv (metric) flow coefficient
Cv Cv (US) flow coefficient
OpPoint Av defined by operating point

The details of the coefficients are explained in the User's Guide .

Literals

NameDescription
AvAv (metric) flow coefficient
KvKv (metric) flow coefficient
CvCv (US) flow coefficient
OpPointAv defined by operating point

Enumeration Modelica.​Fluid.​Types.​PortFlowDirection
Enumeration to define whether flow reversal is allowed

Information

Enumeration to define the assumptions on the model for the direction of fluid flow at a port (to be selected via choices menu):

PortFlowDirection. Meaning
Entering Fluid flow is only entering the port from the outside
Leaving Fluid flow is only leaving the port to the outside
Bidirectional No restrictions on fluid flow (flow reversal possible)

The default is "PortFlowDirection.Bidirectional". If you are completely sure that the flow is only in one direction, then the other settings may make the simulation of your model faster.

Literals

NameDescription
EnteringFluid flow is only entering
LeavingFluid flow is only leaving
BidirectionalNo restrictions on fluid flow (flow reversal possible)

Enumeration Modelica.​Fluid.​Types.​ModelStructure
Enumeration with choices for model structure in distributed pipe model

Information

Enumeration to define the discretization structure of distributed pipe models according to the staggered grid scheme:

ModelStructure. Meaning
av_vb port_a - volume - flow model - volume - port_b
a_v_b port_a - flow model - volume - flow model - port_b
av_b port_a - volume - flow model - port_b
a_vb port_a - flow model - volume - port_b

The default is "ModelStructure.av_vb", i.e., the distributed pipe has "volumes" at its both ends. The advantage is that connections of the pipe to flow models (like fittings) lead to the desirable structure of alternating volume and flow models, which means that no non-linear algebraic equations occur.

Direct connections of distributed pipes with this option means that two volumes are directly connected together. Due to the stream concept this means that the pressures of the two connected volumes are identical, but the temperatures are not set equal (this corresponds to volumes that are connected together with a very short distance and it needs some time until different volume temperatures are equilibrated). Since the pressures of the volumes are identical, the number of states is reduced and index reduction takes place (which means that medium equations depending on pressure are differentiated and the number of required initial conditions is reduced by one).

The default option "av_vb" cannot be used, if the dynamic pipe is connected to a model with non-differentiable pressure, like a Sources.Boundary_pT with prescribed jumping pressure. The modelStructure can be configured as appropriate in such situations, in order to place a momentum balance between a pressure state of the pipe and a non-differentiable boundary condition (e.g., if the jumping pressure component is connected to port_a, use model structure ModelStructure.a_vb).

Literals

NameDescription
av_vbav_vb: port_a - volume - flow model - volume - port_b
a_v_ba_v_b: port_a - flow model - volume - flow model - port_b
av_bav_b: port_a - volume - flow model - port_b
a_vba_vb: port_a - flow model - volume - port_b

Generated 2018-12-12 12:13:29 EST by MapleSim.