# Constant Volume Chamber (MA)

Chamber with fixed volume of moist air and variable number of ports

• Library:
• Simscape / Foundation Library / Moist Air / Elements

## Description

The Constant Volume Chamber (MA) block models mass and energy storage in a moist air network. The chamber contains a constant volume of moist air. It can have between one and four inlets. The enclosure can exchange mass and energy with the connected moist air network and exchange heat with the environment, allowing its internal pressure and temperature to evolve over time. The pressure and temperature evolve based on the compressibility and thermal capacity of the moist air volume. Liquid water condenses out of the moist air volume when it reaches saturation.

The block equations use these symbols. Subscripts `a`, `w`, and `g` indicate the properties of dry air, water vapor, and trace gas, respectively. Subscript `ws` indicates water vapor at saturation. Subscripts `A`, `B`, `C`, `D`, `H`, and `S` indicate the appropriate port. Subscript `I` indicates the properties of the internal moist air volume.

 $\stackrel{˙}{m}$ Mass flow rate Φ Energy flow rate Q Heat flow rate p Pressure ρ Density R Specific gas constant V Volume of moist air inside the chamber cv Specific heat at constant volume h Specific enthalpy u Specific internal energy x Mass fraction (xw is specific humidity, which is another term for water vapor mass fraction) y Mole fraction φ Relative humidity r Humidity ratio T Temperature t Time

The net flow rates into the moist air volume inside the chamber are

`$\begin{array}{l}{\stackrel{˙}{m}}_{net}={\stackrel{˙}{m}}_{A}+{\stackrel{˙}{m}}_{B}+{\stackrel{˙}{m}}_{C}+{\stackrel{˙}{m}}_{D}-{\stackrel{˙}{m}}_{condense}+{\stackrel{˙}{m}}_{wS}+{\stackrel{˙}{m}}_{gS}\\ {\Phi }_{net}={\Phi }_{A}+{\Phi }_{B}+{\Phi }_{C}+{\Phi }_{D}+{Q}_{H}-{\Phi }_{condense}+{\Phi }_{S}\\ {\stackrel{˙}{m}}_{w,net}={\stackrel{˙}{m}}_{wA}+{\stackrel{˙}{m}}_{wB}+{\stackrel{˙}{m}}_{wC}+{\stackrel{˙}{m}}_{wD}-{\stackrel{˙}{m}}_{condense}+{\stackrel{˙}{m}}_{wS}\\ {\stackrel{˙}{m}}_{g,net}={\stackrel{˙}{m}}_{gA}+{\stackrel{˙}{m}}_{gB}+{\stackrel{˙}{m}}_{gC}+{\stackrel{˙}{m}}_{gD}+{\stackrel{˙}{m}}_{gS}\end{array}$`

where:

• $\stackrel{˙}{m}$condense is the rate of condensation.

• Φcondense is the rate of energy loss from the condensed water.

• ΦS is the rate of energy added by the sources of moisture and trace gas. ${\stackrel{˙}{m}}_{wS}$ and ${\stackrel{˙}{m}}_{gS}$ are mass flow rates of water and gas, respectively, through port S. The values of ${\stackrel{˙}{m}}_{wS}$, ${\stackrel{˙}{m}}_{gS}$, and ΦS are determined by the moisture and trace gas sources connected to port S of the chamber, or by the corresponding parameter values on the Moisture and Trace Gas tab.

If a port is not visible, then the terms with the subscript corresponding to the port name are 0.

Water vapor mass conservation relates the water vapor mass flow rate to the dynamics of the moisture level in the internal moist air volume:

`$\frac{d{x}_{wI}}{dt}{\rho }_{I}V+{x}_{wI}{\stackrel{˙}{m}}_{net}={\stackrel{˙}{m}}_{w,net}$`

Similarly, trace gas mass conservation relates the trace gas mass flow rate to the dynamics of the trace gas level in the internal moist air volume:

`$\frac{d{x}_{gI}}{dt}{\rho }_{I}V+{x}_{gI}{\stackrel{˙}{m}}_{net}={\stackrel{˙}{m}}_{g,net}$`

Mixture mass conservation relates the mixture mass flow rate to the dynamics of the pressure, temperature, and mass fractions of the internal moist air volume:

`$\left(\frac{1}{{p}_{I}}\frac{d{p}_{I}}{dt}-\frac{1}{{T}_{I}}\frac{d{T}_{I}}{dt}\right){\rho }_{I}V+\frac{{R}_{a}-{R}_{w}}{{R}_{I}}\left({\stackrel{˙}{m}}_{w,net}-{x}_{w}{\stackrel{˙}{m}}_{net}\right)+\frac{{R}_{a}-{R}_{g}}{{R}_{I}}\left({\stackrel{˙}{m}}_{g,net}-{x}_{g}{\stackrel{˙}{m}}_{net}\right)={\stackrel{˙}{m}}_{net}$`

Finally, energy conservation relates the energy flow rate to the dynamics of the pressure, temperature, and mass fractions of the internal moist air volume:

`${\rho }_{I}{c}_{vI}V\frac{d{T}_{I}}{dt}+\left({u}_{wI}-{u}_{aI}\right)\left({\stackrel{˙}{m}}_{w,net}-{x}_{w}{\stackrel{˙}{m}}_{net}\right)+\left({u}_{gI}-{u}_{aI}\right)\left({\stackrel{˙}{m}}_{g,net}-{x}_{g}{\stackrel{˙}{m}}_{net}\right)+{u}_{I}{\stackrel{˙}{m}}_{net}={\Phi }_{net}$`

The equation of state relates the mixture density to the pressure and temperature:

`${p}_{I}={\rho }_{I}{R}_{I}{T}_{I}$`

The mixture specific gas constant is

`${R}_{I}={x}_{aI}{R}_{a}+{x}_{wI}{R}_{w}+{x}_{gI}{R}_{g}$`

Flow resistance and thermal resistance are not modeled in the chamber:

`$\begin{array}{l}{p}_{A}={p}_{B}={p}_{C}={p}_{D}={p}_{I}\\ {T}_{H}={T}_{I}\end{array}$`

When the moist air volume reaches saturation, condensation may occur. The specific humidity at saturation is

`${x}_{wsI}={\phi }_{ws}\frac{{R}_{I}}{{R}_{w}}\frac{{p}_{wsI}}{{p}_{I}}$`

where:

• φws is the relative humidity at saturation (typically 1).

• pwsI is the water vapor saturation pressure evaluated at TI.

The rate of condensation is

where τcondense is the value of the Condensation time constant parameter.

The condensed water is subtracted from the moist air volume, as shown in the conservation equations. The energy associated with the condensed water is

`${\Phi }_{condense}={\stackrel{˙}{m}}_{condense}\left({h}_{wI}-\Delta {h}_{vapI}\right)$`

where ΔhvapI is the specific enthalpy of vaporization evaluated at TI.

Other moisture and trace gas quantities are related to each other as follows:

`$\begin{array}{l}{\phi }_{wI}=\frac{{y}_{wI}{p}_{I}}{{p}_{wsI}}\\ {y}_{wI}=\frac{{x}_{wI}{R}_{w}}{{R}_{I}}\\ {r}_{wI}=\frac{{x}_{wI}}{1-{x}_{wI}}\\ {y}_{gI}=\frac{{x}_{gI}{R}_{g}}{{R}_{I}}\\ {x}_{aI}+{x}_{wI}+{x}_{gI}=1\end{array}$`

### Variables

To set the priority and initial target values for the block variables prior to simulation, use the Initial Targets section in the block dialog box or Property Inspector. For more information, see Set Priority and Initial Target for Block Variables and Initial Conditions for Blocks with Finite Moist Air Volume.

Nominal values provide a way to specify the expected magnitude of a variable in a model. Using system scaling based on nominal values increases the simulation robustness. Nominal values can come from different sources, one of which is the Nominal Values section in the block dialog box or Property Inspector. For more information, see Modify Nominal Values for a Block Variable.

### Assumptions and Limitations

• The chamber walls are perfectly rigid.

• Flow resistance between the chamber inlet and the moist air volume is not modeled. Connect a Local Restriction (MA) block or a Flow Resistance (MA) block to port A to model the pressure losses associated with the inlet.

• Thermal resistance between port H and the moist air volume is not modeled. Use Thermal library blocks to model thermal resistances between the moist air mixture and the environment, including any thermal effects of a chamber wall.

## Ports

### Output

expand all

Physical signal output port that measures the rate of condensation in the chamber.

Physical signal output port that outputs a vector signal. The vector contains the pressure (in Pa), temperature (in K), moisture level, and trace gas level measurements inside the component. Use the Measurement Selector (MA) block to unpack this vector signal.

### Conserving

expand all

Moist air conserving port associated with the chamber inlet.

Moist air conserving port associated with the second chamber inlet.

#### Dependencies

This port is visible if you set the Number of ports parameter to `2`, `3`, or `4`.

Moist air conserving port associated with the third chamber inlet.

#### Dependencies

This port is visible if you set the Number of ports parameter to `3` or `4`.

Moist air conserving port associated with the fourth chamber inlet. If a chamber has four inlet ports, you can use it as a junction in a cross connection.

#### Dependencies

This port is visible only if you set the Number of ports parameter to `4`.

Thermal conserving port associated with the temperature of the air mixture inside the chamber.

Connect this port to port S of a block from the Moisture & Trace Gas Sources library to add or remove moisture and trace gas. For more information, see Using Moisture and Trace Gas Sources.

#### Dependencies

This port is visible only if you set the Moisture and trace gas source parameter to `Controlled`.

## Parameters

expand all

### Main

Volume of moist air in the chamber. The chamber is rigid and therefore its volume is constant during simulation. The chamber is assumed to be completely filled with moist air at all times.

Number of inlet ports in the chamber. The chamber can have between one and four ports, labeled from A to D. When you modify the parameter value, the corresponding ports are exposed or hidden in the block icon.

Cross-sectional area of the chamber inlet at port A, in the direction normal to air flow path.

Cross-sectional area of the chamber inlet at port B, in the direction normal to air flow path.

#### Dependencies

Enabled when port B is visible, that is, when the Number of ports parameter is set to `2`, `3`, or `4`.

Cross-sectional area of the chamber inlet at port C, in the direction normal to air flow path.

#### Dependencies

Enabled when port C is visible, that is, when the Number of ports parameter is set to `3` or `4`.

Cross-sectional area of the chamber inlet at port D, in the direction normal to air flow path.

#### Dependencies

Enabled when port D is visible, that is, when the Number of ports parameter is set to `4`.

### Moisture and Trace Gas

Relative humidity above which condensation occurs.

Characteristic time scale at which an oversaturated moist air volume returns to saturation by condensing out excess moisture.

This parameter controls visibility of port S and provides these options for modeling moisture and trace gas levels inside the component:

• `None` — No moisture or trace gas is injected into or extracted from the block. Port S is hidden. This is the default.

• `Constant` — Moisture and trace gas are injected into or extracted from the block at a constant rate. The same parameters as in the Moisture Source (MA) and Trace Gas Source (MA) blocks become available in the Moisture and Trace Gas section of the block interface. Port S is hidden.

• `Controlled` — Moisture and trace gas are injected into or extracted from the block at a time-varying rate. Port S is exposed. Connect the Controlled Moisture Source (MA) and Controlled Trace Gas Source (MA) blocks to this port.

Select whether the block adds or removes moisture as water vapor or liquid water:

• `Vapor` — The enthalpy of the added or removed moisture corresponds to the enthalpy of water vapor, which is greater than that of liquid water.

• `Liquid` — The enthalpy of the added or removed moisture corresponds to the enthalpy of liquid water, which is less than that of water vapor.

#### Dependencies

Enabled when the Moisture and trace gas source parameter is set to `Constant`.

Water vapor mass flow rate through the block. A positive value adds moisture to the connected moist air volume. A negative value extracts moisture from that volume.

#### Dependencies

Enabled when the Moisture and trace gas source parameter is set to `Constant`.

Select a specification method for the moisture temperature:

• `Atmospheric temperature` — Use the atmospheric temperature, specified by the Moist Air Properties (MA) block connected to the circuit.

• `Specified temperature` — Specify a value by using the Temperature of added moisture parameter.

#### Dependencies

Enabled when the Moisture and trace gas source parameter is set to `Constant`.

Enter the desired temperature of added moisture. This temperature remains constant during simulation. The block uses this value to evaluate the specific enthalpy of the added moisture only. The specific enthalpy of removed moisture is based on the temperature of the connected moist air volume.

#### Dependencies

Enabled when the Added moisture temperature specification parameter is set to `Specified temperature`.

Trace gas mass flow rate through the block. A positive value adds trace gas to the connected moist air volume. A negative value extracts trace gas from that volume.

#### Dependencies

Enabled when the Moisture and trace gas source parameter is set to `Constant`.

Select a specification method for the trace gas temperature:

• `Atmospheric temperature` — Use the atmospheric temperature, specified by the Moist Air Properties (MA) block connected to the circuit.

• `Specified temperature` — Specify a value by using the Temperature of added trace gas parameter.

#### Dependencies

Enabled when the Moisture and trace gas source parameter is set to `Constant`.

Enter the desired temperature of added trace gas. This temperature remains constant during simulation. The block uses this value to evaluate the specific enthalpy of the added trace gas only. The specific enthalpy of removed trace gas is based on the temperature of the connected moist air volume.

#### Dependencies

Enabled when the Added trace gas temperature specification parameter is set to `Specified temperature`.

## Version History

Introduced in R2018a