Constant Volume Chamber (2P)

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

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

Description

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 Balance

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={\stackrel{˙}{m}}_{\text{A}}+{ϵ}_{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.

• $\stackrel{˙}{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.

Correction Term for Partial-Derivative Smoothing

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:

`${ϵ}_{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}={\stackrel{˙}{m}}_{A}.$`

Energy Balance

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:

`$\stackrel{˙}{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.$`

Momentum Balance

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}}.$`

Assumptions

• 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.

Ports

Conserving

expand all

Opening through which fluid enters or exits the chamber.

Interface through which the fluid in the chamber exchanges heat with a thermal network.

Parameters

expand all

Parameters Tab

Volume of fluid in the chamber. This volume is constant during simulation.

Inlet area normal to the direction of flow.

Effects and Initial Conditions Tab

Thermodynamic variable in terms of which to define the initial conditions of the component.

Pressure in the chamber at the start of simulation, specified against absolute zero.

Temperature in the chamber at the start of simulation, specified against absolute zero.

Dependencies

This parameter is active when the Initial fluid energy specification option is set to `Temperature`.

Mass fraction of vapor in the chamber at the start of simulation.

Dependencies

This parameter is active when the Initial fluid energy specification option is set to ```Vapor quality```.

Volume fraction of vapor in the chamber at the start of simulation.

Dependencies

This parameter is active when the Initial fluid energy specification option is set to ```Vapor void fraction```.

Specific enthalpy of the fluid in the chamber at the start of simulation.

Dependencies

This parameter is active when the Initial fluid energy specification option is set to ```Specific enthalpy```.

Specific internal energy of the fluid in the chamber at the start of simulation.

Dependencies

This parameter is active when the Initial fluid energy specification option is set to ```Specific internal energy```.

Characteristic time to equilibrium of a phase-change event taking place in the chamber. Increase this parameter to slow the rate of phase change or decrease it to speed the rate.

Extended Capabilities

C/C++ Code GenerationGenerate C and C++ code using Simulink® Coder™.

Introduced in R2015b