Main Content

Chamber with three ports and fixed volume of two-phase fluid

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

The 3-Port 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 three inlets, labeled **A**, **B**, and **C**, 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 an 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 each inlet and the interior of the chamber is assumed to be negligible. The pressure in the interior is therefore equal to that at the inlets. Similarly, the thermal resistance between the thermal port and the 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 ports **A**, **B**, and **C**. 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 rates in through ports
**A**, **B**, and
**C**:

$$\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}}+{\dot{m}}_{\text{B}}+{\dot{m}}_{\text{C}}+{\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}+{\dot{m}}_{B}+{\dot{m}}_{C}.$$

Energy can enter and exit the chamber in two ways: with fluid flow through ports
**A**, **B**, and
**C**, 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**,
**B**, **C**, and
**H**:

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

where:

*ϕ*is the energy flow rate.*Q*is the heat flow rate.*E*is the 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 the individual ports 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**, port **B**, and
port **C**:

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

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.