Block Pipe (2P) simulates the dynamics of a two-phase liquid flow in a rigid pipe. It is assumed that the dynamic compressibility and heat capacity of the liquid are not negligible. The non-directional ports of the two-phase liquid A and B are the pipe entrances. The non-directional heat port H is a pipe wall through which heat is exchanged with the environment.
Inertia of the fluid
The unit provides the ability to simulate fluid inertia, that is, resistance to sudden changes in mass flow. By default, fluid inertia modeling is disabled, which is suitable for cases where the pressure forces driving the fluid significantly exceed the inertial forces acting on the flow.
Ignoring inertia reduces computational costs, which is why it is recommended for most models. However, fluid inertia can become important if the mass flow rate changes rapidly. In such cases, the consideration of inertia helps to increase the accuracy of modeling.
Energy conservation
The energy conservation equation for a pipe has the form:
where
— the mass of liquid in the pipe;
— specific internal energy of the liquid in the pipe;
and — mass expenses via ports A and B, respectively;
and — energy flows through ports A and B respectively.
— heat flow into the pipe through the wall marked with port H.
The thermal flow
The heat transfer between the pipe wall and the internal volume of the liquid is modeled as a convective process, while the heat flow is calculated as follows:
where
— average heat transfer coefficient in the pipe;
— pipe surface area;
— pipe wall temperature;
— the temperature of the liquid in the pipe.
The calculation of the heat transfer coefficient depends on the phase of the liquid. In the supercooled liquid and superheated vapor phases, the coefficient is
where
index means the phase in question (liquid or vapor);
— the average number of Nusselts in a pipe;
— average thermal conductivity in the pipe;
— the hydraulic diameter of the pipe (i.e., the diameter of an equivalent cylindrical pipe with the same cross-sectional area).
In a two-phase mixture, the same coefficient is
where is the index means a two-phase mixture, and the index means saturated liquid.
The Nusselt number
In laminar flows, the Nusselt number is considered constant and is set in the block parameters. The Nusselt number for laminar flow is used when the Reynolds number is less than the parameter value. Laminar flow upper Reynolds number limit.
The Nusselt number for turbulent flow is used when the Reynolds number is greater than the parameter value. Laminar flow upper Reynolds number limit. In the transition region between laminar and turbulent flow, the Nusselt number changes between the values for laminar and turbulent flow using a cubic polynomial function. This ensures a smooth transition between flow modes.
In the liquid and vapor phases, the Nusselt number for turbulent flow is calculated from the Gnelinsky equation:
where
as before, the index means the phase in question;
— coefficient of friction of the pipe;
— the Reynolds number;
— Prandtl’s number.
The coefficient of friction is defined as
where — roughness of the pipe walls.
The Reynolds number is defined as
where
— the cross-sectional area of the pipe;
— specific volume;
— kinematic viscosity.
In a two—phase mixture, the Nusselt number for a turbulent flow is determined from the Cavallini-Zekkin equation:
where
index means saturated liquid;
index means saturated steam;
— degree of dryness;
— specific volume.
The Reynolds number of a saturated liquid is defined as:
Conservation of mass
The law of conservation of mass for a pipe can be written as follows:
where
— density of the liquid;
— pressure in the pipe;
— the volume of liquid in the pipe;
and — mass expenses via ports A and B, respectively;
is a correction term that takes into account the smoothing of partial density derivatives at the boundaries of phase transitions.
The partial derivatives of the density vary between regions using a cubic polynomial function. With a degree of dryness in the range 0–0.1 This function ensures a smooth change of derivatives between the regions of the supercooled liquid and the two-phase mixture. With a degree of dryness in the range 0.9–1 it provides a smooth change of derivatives between the regions of the two-phase mixture and superheated steam. A correction term is added to the equation of conservation of mass to correct numerical errors introduced by the cubic polynomial function.:
where
— the mass of the liquid in the pipe, calculated by the equation:
— specific volume of liquid in the pipe;
— The phase transition time constant is the characteristic duration of the phase transition event. This constant ensures that phase transitions do not occur instantaneously, effectively introducing a time delay whenever they occur.
Conservation of momentum
The momentum conservation equations are determined separately for each section of the pipe half. In the half of the pipe adjacent to the port But:
where
— port pressure But;
— the cross-sectional area of the pipe;
ν — specific volume of liquid in the port But;
— the force of viscous friction in the half of the pipe adjacent to the port But;
— inertia of the fluid in the port A:
where — pipe length.
In the half of the pipe adjacent to port B:
where
— port pressure B;
ν — specific volume of liquid in port B;
— the force of viscous friction in the half of the pipe adjacent to the port B;
— inertia of the liquid in the port B:
Terms describing the inertia of a fluid and , are equal to zero when the flag Fluid inertia removed, that is, when fluid inertia simulation is disabled. Calculation of viscous friction forces and it depends on the flow mode: laminar or turbulent.
Viscous friction forces in laminar flows_
In laminar mode — when the Reynolds number is less than the parameter value Laminar flow upper Reynolds number limit — the viscous friction force in the half of the pipe adjacent to port A is
and in the half of the pipe adjacent to port B:
where
— pipe shape coefficient;
— effective pipe length is the sum of the pipe length and the total equivalent length of local resistances;
— the hydraulic diameter of the pipe.
Viscous friction forces in turbulent flows_
In turbulent mode — when the Reynolds number is greater than the parameter value Turbulent flow lower Reynolds number limit — the viscous friction force in the half of the pipe adjacent to port A is
and in the half of the pipe adjacent to port B:
where and is the Darcy coefficient of friction for the turbulent flow in the half of the pipe adjacent to the ports A and B, respectively.
The Darcy coefficient of friction for a turbulent flow in the half of the pipe adjacent to port A is determined from the Haaland equation as follows:
and in the half of the pipe adjacent to port B:
where
— relative roughness of the pipe walls;
— the Reynolds number in the half of the pipe adjacent to the port A,
— the Reynolds number in half of the pipe adjacent to port B,
The friction losses in the transition region between laminar and turbulent flows are varied using a cubic polynomial function.
Assumptions and limitations
The pipe wall is rigid.
The stream is fully developed.
The effect of gravity is negligible.
Heat transfer is calculated relative to the temperature of the liquid volume in the pipe. To simulate the temperature gradient caused by heat transfer along a long pipe, connect several blocks Pipe (2P) consistently.
#Hydraulic diameter —
hydraulic diameter
m | um | mm | cm | km | in | ft | yd | mi | nmi
Details
The diameter of an equivalent cylindrical tube with the same cross-sectional area.
Units
m | um | mm | cm | km | in | ft | yd | mi | nmi
Default value
0.1 m
Program usage name
hydraulic_diameter
Evaluatable
Yes
Friction and Heat Transfer
#Aggregate equivalent length of local resistances —
the total length of all local resistances present in the pipe
m | um | mm | cm | km | in | ft | yd | mi | nmi
Details
The total length of all local resistances present in the pipe.
Local resistances include bends, fittings, fittings, and pipe entrances and exits. The effect of local resistances is to increase the effective length of the pipe section. This length is added to the geometric length of the pipe only for friction calculations.
The volume of liquid inside the pipe depends only on the geometric length of the pipe, determined by the parameter Pipe length.
Units
m | um | mm | cm | km | in | ft | yd | mi | nmi
Default value
0.1 m
Program usage name
length_add
Evaluatable
Yes
#Internal surface absolute roughness —
the average depth of all surface defects on the inner surface of the pipe
m | um | mm | cm | km | in | ft | yd | mi | nmi
Details
The average depth of all surface defects on the inner surface of the pipe that affect pressure loss in a turbulent flow regime.
Units
m | um | mm | cm | km | in | ft | yd | mi | nmi
Default value
1.5e-5 m
Program usage name
roughness
Evaluatable
Yes
#Laminar flow upper Reynolds number limit —
the Reynolds number, when exceeded, the flow begins to transition from laminar to turbulent
Details
The Reynolds number, when exceeded, the flow begins to transition from laminar to turbulent.
This number is equal to the maximum Reynolds number corresponding to a fully developed laminar flow.
Default value
2000.0
Program usage name
Re_laminar
Evaluatable
Yes
#Turbulent flow lower Reynolds number limit —
the Reynolds number, below which the flow begins to transition from turbulent to laminar
Details
The Reynolds number, below which the flow begins to transition from turbulent to laminar.
This number is equal to the minimum Reynolds number corresponding to a fully developed turbulent flow.
Default value
4000.0
Program usage name
Re_turbulent
Evaluatable
Yes
#Laminar friction constant for Darcy friction factor —
the effect of pipe geometry on viscous friction losses
Details
A dimensionless coefficient that determines the effect of the geometry of the pipe cross-section on viscous friction losses in the laminar flow regime. Typical values: 64 for circular cross-section, 57 for a square section, 62 for a rectangular section with an aspect ratio 2 and 96 for a thin annular section [1].
Default value
64.0
Program usage name
shape_factor
Evaluatable
Yes
#Nusselt number for laminar flow heat transfer —
the ratio of convective to conductive heat exchange
Details
The ratio of convective to conductive heat transfer in the laminar flow regime. Its value depends on the geometry of the pipe’s cross-section and the thermal boundary conditions on the pipe wall, such as constant temperature or constant heat flow.
Typical value — 3.66 for a circular section with a constant wall temperature [2].
Check the box for this parameter to take into account the inertia of the fluid flow — the resistance of the fluid to rapid acceleration.
Default value
false (switched off)
Program usage name
inertia
Evaluatable
No
#Initial fluid energy specification —
a thermodynamic variable used to determine initial conditions
Temperature | Vapor quality | Vapor void fraction | Specific enthalpy | Specific internal energy
Details
A thermodynamic variable used to determine the initial conditions of a block.
Parameter Value Initial fluid energy specification limits the available initial states for a two-phase liquid. When the value is Initial fluid energy specification set as follows:
Temperature — specify the initial state, which is a supercooled liquid or superheated steam. It is not possible to specify a mixture of liquid and steam, since the temperature is constant in the region of the mixture of liquid and steam.
Vapor quality — specify the initial state, which is a mixture of liquid and steam. You cannot specify a supercooled liquid or superheated steam, since the mass fraction is 0 and 1 accordingly, in the entire region. In addition, the unit limits the pressure to a value below the critical pressure.
Vapor void fraction — specify the initial state, which is a mixture of liquid and steam. You cannot specify a supercooled liquid or superheated steam, since the mass fraction is 0 and 1 accordingly, in the entire region. In addition, the unit limits the pressure to a value below the critical pressure.
Specific enthalpy — specify the specific enthalpy of the liquid. The block does not limit the initial state.
Specific internal energy — specify the specific internal energy of the liquid. The block does not limit the initial state.
Values
Temperature | Vapor quality | Vapor void fraction | Specific enthalpy | Specific internal energy
Default value
Temperature
Program usage name
energy_type
Evaluatable
No
#Initial pressure —
absolute pressure at the beginning of the simulation
Pa | uPa | hPa | kPa | MPa | GPa | kgf/m^2 | kgf/cm^2 | kgf/mm^2 | mbar | bar | kbar | atm | ksi | psi | mmHg | inHg
Details
The pressure of the liquid in the pipe at the beginning of the simulation, set relative to absolute zero.
#Phase change time constant —
the characteristic duration of the phase transition event
s | ns | us | ms | min | hr | d
Details
The characteristic time to reach equilibrium during a phase transition in a pipe. This constant introduces a time delay in the transition between phases. Increase this parameter to decrease the speed of the phase transition, or decrease it to increase the speed.
Units
s | ns | us | ms | min | hr | d
Default value
0.1 s
Program usage name
tau
Evaluatable
Yes
#Initial mass flow rate from port A to port B —
mass flow rate at the beginning of the simulation
kg/s | kg/hr | kg/min | g/hr | g/min | g/s | t/hr | lbm/hr | lbm/min | lbm/s
Details
The mass flow of liquid from port A to port B at the beginning of the simulation.