Main Content

Chamber with one port and fixed volume of two-phase fluid

**Library:**Simscape / Foundation Library / Two-Phase Fluid / Elements

The Constant Volume Chamber (2P) block models the accumulation of mass
and energy in a chamber containing a fixed volume of two-phase fluid. The chamber has
one inlet, labeled **A**, through which fluid can flow. The
fluid volume can exchange heat with a thermal network, for example one representing the
chamber surroundings, through a thermal port labeled **H**.

The mass of the fluid in the chamber varies with density, a property that in a two-phase fluid is generally a function of pressure and temperature. Fluid enters when the pressure upstream of the inlet rises above that in the chamber and exits when the pressure gradient is reversed. The effect in a model is often to smooth out sudden changes in pressure, much like an electrical capacitor does with voltage.

The flow resistance between the inlet and interior of the chamber is assumed to be negligible. The pressure in the interior is therefore equal to that at the inlet. Similarly, the thermal resistance between the thermal port and interior of the chamber is assumed to be negligible. The temperature in the interior is equal to that at the thermal port.

Mass can enter and exit the chamber through port **A**. The volume of the chamber is fixed but the compressibility of the
fluid means that its mass can change with pressure and temperature. The rate of mass
accumulation in the chamber must exactly equal the mass flow rate in through port
**A**:

$$\left[{\left(\frac{\partial \rho}{\partial p}\right)}_{u}\frac{dp}{dt}+{\left(\frac{\partial \rho}{\partial u}\right)}_{p}\frac{du}{dt}\right]V={\dot{m}}_{\text{A}}+{\u03f5}_{M},$$

where the left-hand side is the rate of mass accumulation and:

*ρ*is the density.*p*is the pressure.*u*is the specific internal energy.*V*is the volume.$$\dot{m}$$ is the mass flow rate.

*ϵ*_{M}is a correction term introduced to account for a numerical error caused by the smoothing of the partial derivatives.

The partial derivatives in the mass balance equation are computed by applying the finite-difference method to the tabulated data in the Two-Phase Fluid Properties (2P) block and interpolating the results. The partial derivatives are then smoothed at the phase-transition boundaries by means of cubic polynomial functions. These functions apply between:

The subcooled liquid and two-phase mixture phase domains when the vapor quality is in the 0–0.1 range.

The two-phase mixture and superheated vapor phase domains when the vapor quality is in the 0–0.9 range.

The smoothing introduces a small numerical error that the block adjusts for by
adding to the mass balance the correction term
*ϵ*_{M}, defined as:

$${\u03f5}_{M}=\frac{M-V/\nu}{\tau}.$$

where:

*M*is the fluid mass in the chamber.*ν*is the specific volume.*τ*is the characteristic duration of a phase-change event.

The fluid mass in the chamber is obtained from the equation:

$$\frac{dM}{dt}={\dot{m}}_{A}.$$

Energy can enter and exit the chamber in two ways: with fluid flow through port
**A** and with heat flow through port **H**. No work is done on or by the fluid inside the chamber.
The rate of energy accumulation in the internal fluid volume must then equal the sum
of the energy flow rates in through ports **A** and
**H**:

$$\dot{E}={\varphi}_{\text{A}}+\text{}{Q}_{\text{H}},$$

where:

*ϕ*is energy flow rate.*Q*is heat flow rate.*E*is total energy.

Neglecting the kinetic energy of the fluid, the total energy in the chamber is:

$$E=Mu.$$

The pressure drop due to viscous friction between port **A** and the interior of the chamber is assumed to be negligible.
Gravity is ignored as are other body forces. The pressure in the internal fluid
volume must then equal that at port **A**:

$$p={p}_{\text{A}}.$$

The chamber has a fixed volume of fluid.

The flow resistance between the inlet and the interior 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 fluid in the chamber is negligible.