Constant Volume Chamber (2P)
A chamber with a fixed volume of two-phase liquid and a variable number of ports.
blockType: AcausalFoundation.TwoPhaseFluid.Elements.ConstantVolumeChamber
Path in the library:
|
Description
Block Constant Volume Chamber (2P) simulates the accumulation of mass and energy in a chamber containing a fixed volume of a two-phase liquid. The chamber can have from one to four ports, designated A, B, C, D, through which liquid can flow. The volume of liquid can exchange heat with a thermal network, for example, with a network representing the surrounding space of the chamber, through the thermal port H.
The mass of the liquid in the chamber varies depending on the density, which usually depends on pressure and temperature. The liquid enters the chamber when the pressure in front of the inlet exceeds the pressure in the chamber, and flows out when the pressure gradient is reversed. The effect in the model is often to smooth out sudden pressure changes, just as an electric capacitor smooths out the voltage.
The flow resistance between the inlet and the inside of the chamber is considered negligible. Therefore, the pressure inside the chamber is equal to the pressure at the inlet. Similarly, the thermal resistance between the thermal port and the interior of the chamber is considered negligible. The temperature inside the chamber is equal to the temperature at the thermal port.
Conservation of mass
Liquid can flow in and out of the chamber through ports A, B, C and D. The volume of the chamber is fixed, but due to the compressibility of the liquid, its mass may vary depending on pressure and temperature.
The mass accumulation rate in the chamber must be exactly equal to the mass flow rate through ports A, B, C and D:
where
-
— density;
-
— pressure;
-
— specific internal energy;
-
— volume;
-
— mass consumption;
-
— correction term that takes into account the numerical error caused by smoothing partial derivatives.
The correction term for smoothing partial derivatives
The block calculates partial derivatives in the mass balance equation, then smooths them at the boundaries of phase transitions using cubic polynomial functions. These functions are applied:
-
in the area of a supercooled liquid and a two-phase mixture with a degree of dryness in the range of
0before0.1; -
in the field of a two-phase mixture and superheated steam with a degree of dryness in the range of
0before0.9.
Smoothing introduces a small numerical error, which the block compensates for by adding a correction term to the mass balance. , defined as follows:
where
-
— the mass of liquid in the chamber;
-
— specific volume;
-
— the characteristic duration of the phase transition event.
The unit calculates the mass of the liquid in the chamber using the equation
Energy conservation
Energy can enter and exit the chamber in two ways: through the flow of liquid through ports A, B, C and D and through heat flow through port H. No work is done on the liquid inside the chamber. Therefore, the rate of energy accumulation in the internal volume of the liquid should be equal to the sum of the energy flows through ports A, B, C, D and H:
where
-
— energy flow;
-
— heat flow;
-
— full energy.
With a negligible kinetic energy of the liquid, the total energy in the chamber is
Conservation of momentum
The pressure drop due to viscous friction between the individual openings and the interior of the chamber is considered negligible. Gravity and other volumetric forces can be ignored. Therefore, the pressure in the internal volume of the liquid must be equal to the pressure at ports A, B, C and D:
Assumptions and limitations
-
There is a fixed volume of liquid in the chamber.
-
The flow resistance between the inlet and the inside of the chamber is negligible.
-
The thermal resistance between the thermal port and the interior of the chamber is negligible.
-
The kinetic energy of the liquid in the chamber is negligible.
Ports
Conserving
#
A
—
entrance to the camera
two-phase liquid
Details
The two-phase liquid port corresponds to the entrance to the chamber.
| Program usage name |
|
#
H
—
thermal port
warm
Details
The thermal port through which the liquid in the chamber exchanges heat with the heating network.
| Program usage name |
|
#
B
—
entrance to the camera
two-phase liquid
Details
The two-phase liquid port corresponds to the second entrance to the chamber.
Dependencies
To use this port, set the parameter Number of ports meaning 2, 3 or 4.
| Program usage name |
|
#
C
—
entrance to the camera
two-phase liquid
Details
The two-phase liquid port corresponds to the third entrance to the chamber.
Dependencies
To use this port, set the parameter Number of ports meaning 3 or 4.
| Program usage name |
|
#
D
—
entrance to the camera
two-phase liquid
Details
The two-phase liquid port corresponds to the fourth entrance to the chamber.
Dependencies
To use this port, set the parameter Number of ports meaning 4.
| Program usage name |
|
Parameters
Parameters
#
Chamber volume —
volume of liquid inside the chamber
m^3 | um^3 | mm^3 | cm^3 | km^3 | ml | l | gal | igal | in^3 | ft^3 | yd^3 | mi^3
Details
The volume of liquid in the tank. This volume is constant during the simulation.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Number of ports —
number of input ports in the camera
1 | 2 | 3 | 4
Details
The number of input ports in the camera.
The camera can have from one to four ports, designated A, B, C, D.
When the parameter value is changed, the corresponding ports open or hide on the block icon.
| Values |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
No |
#
Cross-sectional area at port A —
the area of the input port A is normal to the flow path
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac
Details
The cross-sectional area of the input port A is normal to the flow path.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Cross-sectional area at port B —
the area of the input port B is normal to the flow path
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac
Details
The cross-sectional area of the input port B is normal to the flow path.
Dependencies
To use this parameter, set for the parameter Number of ports meaning 2, 3 or 4.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Cross-sectional area at port C —
the area of the input port C is normal to the flow path
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac
Details
The cross-sectional area of the input port C is normal to the flow path.
Dependencies
To use this parameter, set for the parameter Number of ports meaning 3 or 4.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Cross-sectional area at port D —
the area of the input port D is normal to the flow path
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac
Details
The cross-sectional area of the input port D is normal to the flow path.
Dependencies
To use this parameter, set for the parameter Number of ports meaning 4.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
Effects and Initial Conditions
#
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 is0and1accordingly, 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 is0and1accordingly, 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 |
|
| Default value |
|
| Program usage name |
|
| 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 in the chamber at the beginning of the simulation, set relative to absolute zero.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Initial temperature —
the absolute temperature at the beginning of the simulation
K | degC | degF | degR | deltaK | deltadegC | deltadegF | deltadegR
Details
The temperature in the chamber at the beginning of the simulation, set relative to absolute zero.
Dependencies
To use this parameter, set for the parameter Initial fluid energy specification meaning Temperature.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Phase change time constant —
the characteristic duration of the phase transition event
s | ns | us | ms | min | hr | d
Details
The characteristic time of reaching equilibrium is the phase transition event occurring in the chamber. Increase this parameter to decrease the speed of the phase transition, or decrease it to increase the speed.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
# Initial vapor quality — mass fraction of steam at the beginning of the simulation
Details
The mass fraction of steam in the chamber at the beginning of the simulation.
Dependencies
To use this parameter, set for the parameter Initial fluid energy specification meaning Vapor quality.
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
# Initial vapor void fraction — volume fraction of steam at the beginning of the simulation
Details
The volume fraction of steam in the chamber at the beginning of the simulation.
Dependencies
To use this parameter, set for the parameter Initial fluid energy specification meaning Vapor void fraction.
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Initial specific enthalpy —
specific enthalpy of the liquid at the beginning of the simulation
J/kg | kJ/kg | cal/kg | kcal/kg | mm^2/s^2 | cm^2/s^2 | m^2/s^2 | km^2/s^2 | km^2/hr^2 | in^2/s^2 | ft^2/s^2 | ft^2/min^2 | mi^2/s^2 | mi^2/hr^2 | Pa/(kg/m^3) | psi/(lbm/ft^3) | bar/(kg/m^3)
Details
The specific enthalpy of the liquid in the chamber at the beginning of the simulation.
Dependencies
To use this parameter, set for the parameter Initial fluid energy specification meaning Specific enthalpy.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |
#
Initial specific internal energy —
specific internal energy of the liquid at the beginning of the simulation
J/kg | kJ/kg | cal/kg | kcal/kg | mm^2/s^2 | cm^2/s^2 | m^2/s^2 | km^2/s^2 | km^2/hr^2 | in^2/s^2 | ft^2/s^2 | ft^2/min^2 | mi^2/s^2 | mi^2/hr^2 | Pa/(kg/m^3) | psi/(lbm/ft^3) | bar/(kg/m^3)
Details
The specific internal energy of the liquid in the chamber at the beginning of the simulation.
Dependencies
To use this parameter, set for the parameter Initial fluid energy specification meaning Specific internal energy.
| Units |
|
| Default value |
|
| Program usage name |
|
| Evaluatable |
Yes |