# System-Level Condenser Evaporator (2P-MA)

Heat exchanger between two-phase fluid and moist air networks, with model based on performance data

**Library:**Simscape / Fluids / Fluid Network Interfaces / Heat Exchangers

## Description

The System-Level Condenser Evaporator (2P-MA) block models a heat exchanger between a two-phase fluid network and a moist air network.

The block can act as a condenser or as an evaporator in a refrigeration system, depending on the direction of heat transfer. The block model is based on performance data from the heat exchanger datasheet, rather than on the detailed geometry of the exchanger, and therefore lets you easily adjust the size and performance of the heat exchanger during design iterations, or model heat exchangers with uncommon geometries. You can also use this block to model heat exchangers with a certain level of performance at an early design stage, when detailed geometry data is not yet available.

You parameterize the block by the nominal operating condition. The heat exchanger is sized to match the specified performance at the nominal operating condition at steady state.

The Two-Phase Fluid 1 side approximates the liquid zone, mixture zone, and vapor zone based on the change in enthalpy along the flow path. The Moist Air 2 side models water vapor condensation based on convective water vapor mass transfer with the heat transfer surface. Condensed water is removed from the moist air flow.

This block is similar to the Condenser Evaporator (2P-MA) block but uses a different parameterization model. The table provides a comparison of the two blocks, to help you choose the right block for your application.

Condenser Evaporator (2P-MA) | System-Level Condenser Evaporator (2P-MA) |
---|---|

Block parameters are based on the heat exchanger geometry | Block parameters are based on performance and operating conditions |

Heat exchanger geometry may be limited by the available geometry parameter options | Model is independent of the specific heat exchanger geometry |

You can adjust the block for different performance requirements by tuning geometry parameters, such as fin sizes and tube lengths | You can adjust the block for different performance requirements by directly specifying the desired heat and mass flow rates |

Lets you select between parallel, counter, or cross flow configurations | Lets you select between parallel, counter, or cross flow arrangement at nominal operating conditions, to help with sizing |

Predictively accurate results over a wide range of operating conditions, subject to the applicability of the E-NTU equations and the heat transfer coefficient correlations | Very accurate results around the specified operating condition; accuracy may decrease far away from the specified operating conditions |

Heat transfer calculations account for the variation of temperature along the flow path by using the E-NTU model | Heat transfer calculations approximate the variation of temperature along the flow path by dividing it into three segments |

Accounts for different fluid properties and heat transfer coefficients for subcooled liquid, liquid-vapor mixture, and superheated vapor | Accounts for different fluid properties and heat transfer coefficients for subcooled liquid, liquid-vapor mixture, and superheated vapor |

Keeps track of variable zone length fractions for subcooled liquid, liquid-vapor mixture, and superheated vapor regions based on the geometry | Approximates the effect of subcooled liquid, liquid-vapor mixture, and superheated vapor regions using weighting factors based on the difference in enthalpy between inlet and outlet |

Accounts for water vapor condensation and the latent heat on the moist air flow | Accounts for water vapor condensation and the latent heat on the moist air flow |

Does not model the wall thermal mass; you can approximate the effect by connecting a pipe block with a thermal mass downstream | Includes an option to model the wall thermal mass |

### Heat Transfer

The two-phase fluid flow and the moist air flow are each divided into three segments of equal size. Heat transfer between the fluids is calculated in each segment. For simplicity, the equation for one segment is shown here.

If the wall thermal mass is off, then the heat balance in the heat exchanger is

$${Q}_{seg,2P}+{Q}_{seg,MA}=0,$$

where:

*Q*_{seg,2P}is the heat flow rate from the wall (that is, the heat transfer surface) to the two-phase fluid in the segment.*Q*_{seg,MA}is the heat flow rate from the wall to the moist air in the segment.

If the wall thermal mass is on, then the heat balance in the heat exchanger is

$${Q}_{seg,2P}+{Q}_{seg,MA}=-\frac{{M}_{wall}{c}_{{p}_{wall}}}{N}\frac{d{T}_{seg,wall}}{dt},$$

where:

*M*_{wall}is the mass of the wall.*c*_{pwall}is the specific heat of the wall.*N*= 3 is the number of segments.*T*_{seg,wall}is the average wall temperature in the segment.*t*is time.

The heat flow rate from the wall to the two-phase fluid in the segment is

$${Q}_{seg,2P}=U{A}_{seg,2P}\left({T}_{seg,wall}-{T}_{seg,2P}\right),$$

where:

*UA*_{seg,2P}is the weighted-average heat transfer conductance for the two-phase fluid in the segment.*T*_{seg,2P}is the weighted-average fluid temperature for the two-phase fluid in the segment.

The heat flow rate from the wall to the moist air in the segment is

$${Q}_{seg,MA}=\frac{U{A}_{seg,MA}}{{\overline{c}}_{{p}_{seg,MA}}}\left({\overline{h}}_{seg,wall}-{\overline{h}}_{seg,MA}\right)+{\dot{m}}_{w,seg,cond}{h}_{l,wall},$$

where:

*UA*_{seg,MA}is the heat transfer conductance for the moist air in the segment.$${\overline{c}}_{{p}_{seg,MA}}$$ is the moist air mixture specific heat per unit mass of dry air and trace gas in the segment.

$${\overline{h}}_{seg,wall}$$ is the moist air mixture enthalpy per unit mass of dry air and trace gas at the average wall segment temperature.

$${\overline{h}}_{seg,MA}$$ is the moist air mixture enthalpy per unit mass of dry air and trace gas in the segment.

$${\dot{m}}_{w,seg,cond}$$ is the rate of water vapor condensation on the wall surface.

*h*_{l,wall}is the specific enthalpy of liquid water at the average wall segment temperature.

Using mixture enthalpy in this equation accounts for both differences in temperature and differences in moisture due to condensation [3].

**Note**

For the moist air quantities, the bar above the symbols indicates that they are quantities for mixture divided by the mass of dry air and trace gas only, as opposed to dividing by the mass of the whole mixture. The whole mixture includes dry air, water vapor, and trace gas.

### Two-Phase Fluid Heat Transfer Correlation

If the segment is subcooled liquid, then the heat transfer conductance is

$$U{A}_{seg,L,2P}={a}_{L,2P}{\left({\mathrm{Re}}_{seg,L,2P}\right)}^{{b}_{2P}}{\left({\mathrm{Pr}}_{seg,L,2P}\right)}^{{c}_{2P}}{k}_{seg,L,2P}\frac{{G}_{2P}}{N},$$

where:

*a*_{L,2P},*b*_{2P}, and*c*_{2P}are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the**Correlation Coefficients**section.*Re*_{seg,L,2P}is the average liquid Reynolds number for the segment.*Pr*_{seg,L,2P}is the average liquid Prandtl number for the segment.*k*_{seg,L,2P}is the average liquid thermal conductivity for the segment.*G*_{2P}is the geometry scale factor for the two-phase fluid side of the heat exchanger. The block calculates the geometry scale factor so that the total heat transfer over all segments matches the specified performance at the nominal operating conditions.

The average liquid Reynolds number is

$${\mathrm{Re}}_{seg,L,2P}=\frac{{\dot{m}}_{seg,2P}{D}_{ref,2P}}{{\mu}_{seg,L,2P}{S}_{ref,2P}},$$

where:

$${\dot{m}}_{seg,2P}$$ is the mass flow rate through the segment.

*μ*_{seg,L,2P}is the average liquid dynamic viscosity for the segment.*D*_{ref,2P}is an arbitrary reference diameter.*S*_{ref,2P}is an arbitrary reference flow area.

**Note**

The *D*_{ref,2P} and
*S*_{ref,2P} terms are included in this equation
for unit calculation purposes only, to make
*Re*_{seg,L,2P} nondimensional. The values of
*D*_{ref,2P} and
*S*_{ref,2P} are arbitrary because the
*G*_{2P} calculation overrides these values.

Similarly, if the segment is superheated vapor, then the heat transfer conductance is

$$U{A}_{seg,V,2P}={a}_{V,2P}{\left({\mathrm{Re}}_{seg,V,2P}\right)}^{{b}_{2P}}{\left({\mathrm{Pr}}_{seg,V,2P}\right)}^{{c}_{2P}}{k}_{seg,V,2P}\frac{{G}_{2P}}{N},$$

where:

*a*_{V,2P},*b*_{2P}, and*c*_{2P}are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the**Correlation Coefficients**section.*Re*_{seg,V,2P}is the average vapor Reynolds number for the segment.*Pr*_{seg,V,2P}is the average vapor Prandtl number for the segment.*k*_{seg,V,2P}is the average vapor thermal conductivity for the segment.

The average vapor Reynolds number is

$${\mathrm{Re}}_{seg,V,2P}=\frac{{\dot{m}}_{seg,2P}{D}_{ref,2P}}{{\mu}_{seg,V,2P}{S}_{ref,2P}},$$

where *μ*_{seg,V,2P} is the average vapor dynamic
viscosity for the segment.

If the segment is liquid-vapor mixture, then the heat transfer conductance is

$$U{A}_{seg,M,2P}={a}_{M,2P}{\left({\mathrm{Re}}_{seg,SL,2P}\right)}^{{b}_{2P}}CZ{\left({\mathrm{Pr}}_{seg,SL,2P}\right)}^{{c}_{2P}}{k}_{seg,SL,2P}\frac{{G}_{2P}}{N},$$

where:

*a*_{M,2P},*b*_{2P}, and*c*_{2P}are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the**Correlation Coefficients**section.*Re*_{seg,SL,2P}is the saturated liquid Reynolds number for the segment.*Pr*_{seg,SL,2P}is the saturated liquid Prandtl number for the segment.*k*_{seg,SL,2P}is the saturated liquid thermal conductivity for the segment.*CZ*is the Cavallini and Zecchin term.

The saturated liquid Reynolds number is

$${\mathrm{Re}}_{seg,SL,2P}=\frac{{\dot{m}}_{seg,2P}{D}_{ref,2P}}{{\mu}_{seg,SL,2P}{S}_{ref,2P}},$$

where *μ*_{seg,SL,2P} is the saturated liquid
dynamic viscosity for the segment.

The Cavallini and Zecchin term is

$$CZ=\frac{{\left(\left(\sqrt{\frac{{\nu}_{seg,SV,2P}}{{\nu}_{seg,SL,2P}}}-1\right)\left({x}_{seg,out,2P}+1\right)\right)}^{1+{b}_{2P}}-{\left(\left(\sqrt{\frac{{\nu}_{seg,SV,2P}}{{\nu}_{seg,SL,2P}}}-1\right)\left({x}_{seg,in,2P}+1\right)\right)}^{1+{b}_{2P}}}{\left(1+{b}_{2P}\right)\left(\sqrt{\frac{{\nu}_{seg,SV,2P}}{{\nu}_{seg,SL,2P}}}-1\right)\left({x}_{seg,out,2P}-{x}_{seg,in,2P}\right)},$$

where:

*ν*_{seg,SL,2P}is the saturated liquid specific volume for the segment.*ν*_{seg,SV,2P}is the saturated vapor specific volume for the segment.*x*_{seg,in,2P}is the vapor quality at the segment inlet.*x*_{seg,out,2P}is the vapor quality at the segment outlet.

The expression is based on the work of Cavallini and Zecchin [5], which derives a heat
transfer coefficient correlation at a local vapor quality *x*. Equations
for the liquid-vapor mixture are obtained by averaging Cavallini and Zecchin’s correlation
over the segment from *x*_{seg,in,2P} to
*x*_{seg,out,2P}.

### Two-Phase Fluid Weighted Average

The two-phase fluid flow through a segment may not be entirely represented as either
subcooled liquid, superheated vapor, or liquid-vapor mixture. Instead, each segment may
consist of a combination of these. The block approximates this condition by computing
weighting factors (*w*_{L},
*w*_{V}, and
*w*_{M}) based on the change in specific enthalpy
across the segment and the saturated liquid and vapor specific enthalpies. The block assumes
that the specific enthalpy across the segment varies piecewise linearly from inlet to
outlet, with the breakpoints corresponding to the saturation boundaries for liquid and
vapor. The zone with a larger heat transfer coefficient has a steeper slope than the zone
with a lower heat transfer coefficient.

$$\begin{array}{l}{w}_{L}=\frac{{\Delta}_{L}}{{\Delta}_{L}+{\Delta}_{M}+{\Delta}_{V}}\\ {w}_{V}=\frac{{\Delta}_{V}}{{\Delta}_{L}+{\Delta}_{M}+{\Delta}_{V}}\\ {w}_{M}=1-{w}_{L}-{w}_{V}\end{array}$$

$$\begin{array}{l}{\Delta}_{L}=\left|\mathrm{min}\left({h}_{seg,out,2P},{h}_{seg,SL,2P}\right)-\mathrm{min}\left({h}_{seg,in,2P},{h}_{seg,SL,2P}\right)\right|\cdot U{A}_{seg,M,2P}\cdot U{A}_{seg,V,2P}\\ {\Delta}_{M}=\left|\mathrm{min}\left(\mathrm{max}\left({h}_{seg,out,2P},{h}_{seg,SL,2P}\right),{h}_{seg,SV,2P}\right)-\mathrm{min}\left(\mathrm{max}\left({h}_{seg,in,2P},{h}_{seg,SL,2P}\right),{h}_{seg,SV,2P}\right)\right|\cdot U{A}_{seg,L,2P}\cdot U{A}_{seg,V,2P}\\ {\Delta}_{V}=\left|\mathrm{max}\left({h}_{seg,out,2P},{h}_{seg,SV,2P}\right)-\mathrm{max}\left({h}_{seg,in,2P},{h}_{seg,SV,2P}\right)\right|\cdot U{A}_{seg,L,2P}\cdot U{A}_{seg,M,2P}\end{array}$$

where:

*h*_{seg,in,2P}is the specific enthalpy at the segment inlet.*h*_{seg,out,2P}is the specific enthalpy at the segment outlet.*h*_{seg,SL,2P}is the saturated liquid specific enthalpy for the segment.*h*_{seg,SV,2P}is the saturated vapor specific enthalpy for the segment.

The weighted-average two-phase fluid heat transfer conductance for the segment is therefore

$$U{A}_{seg,2P}={w}_{L}\left(U{A}_{seg,L,2P}\right)+{w}_{V}\left(U{A}_{seg,V,2P}\right)+{w}_{M}\left(U{A}_{seg,M,2P}\right).$$

The weighted-average fluid temperature for the segment is

$${T}_{seg,2P}=\frac{{w}_{L}\left(U{A}_{seg,L,2P}\right){T}_{seg,L,2P}+{w}_{V}\left(U{A}_{seg,V,2P}\right){T}_{seg,V,2P}+{w}_{M}\left(U{A}_{seg,M,2P}\right){T}_{seg,M,2P}}{U{A}_{seg,2P}},$$

where:

*T*_{seg,L,2P}is the average liquid temperature for the segment.*T*_{seg,V,2P}is the average vapor temperature for the segment.*T*_{seg,M,2P}is the average mixture temperature for the segment, which is the saturated liquid temperature.

### Moist Air Heat Transfer Correlation

The heat transfer conductance is

$$U{A}_{seg,MA}={a}_{MA}{\left({\mathrm{Re}}_{seg,MA}\right)}^{{b}_{MA}}{\left({\mathrm{Pr}}_{seg,MA}\right)}^{{c}_{MA}}{k}_{seg,MA}\frac{{G}_{MA}}{N},$$

where:

*a*_{MA},*b*_{MA}, and*c*_{MA}are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the**Correlation Coefficients**section.*Re*_{seg,MA}is the average Reynolds number for the segment.*Pr*_{seg,MA}is the average Prandtl number for the segment.*k*_{seg,MA}is the average thermal conductivity for the segment.*G*_{MA}is the geometry scale factor for the moist air side of the heat exchanger. The block calculates the geometry scale factor so that the total heat transfer over all segments matches the specified performance at the nominal operating conditions.

The average Reynolds number is

$${\mathrm{Re}}_{seg,MA}=\frac{{\dot{m}}_{seg,MA}{D}_{ref,MA}}{{\mu}_{seg,MA}{S}_{ref,MA}},$$

where:

$${\dot{m}}_{seg,MA}$$ is the mass flow rate through the segment.

*μ*_{seg,MA}is the average dynamic viscosity for the segment.*D*_{ref,MA}is an arbitrary reference diameter.*S*_{ref,MA}is an arbitrary reference flow area.

**Note**

The *D*_{ref,MA} and
*S*_{ref,MA} terms are included in this equation
for unit calculation purposes only, to make
*Re*_{seg,MA} nondimensional. The values of
*D*_{ref,MA} and
*S*_{ref,MA} are arbitrary because the
*G*_{MA} calculation overrides these values.

### Moist Air Condensation

The equation describing the heat flow rate from the wall to the moist air in the segment (the last equation in the Heat Transfer section) uses the average moist air mixture enthalpy, $${\overline{h}}_{seg,MA}$$, and the wall segment moist air mixture enthalpy, $${\overline{h}}_{seg,wall}$$.

The average moist air mixture enthalpy is based on the temperature and humidity of the moist air flow through the segment:

$${\overline{h}}_{seg,MA}={h}_{seg,ag,MA}+{W}_{seg,MA}{h}_{seg,w,MA},$$

where:

*h*_{seg,ag,MA}is the average specific enthalpy of dry air and trace gas for the segment.*h*_{seg,w,MA}is the average specific enthalpy of water vapor for the segment.*W*_{seg,MA}is the humidity ratio of the segment.

The wall segment moist air mixture enthalpy is based on the temperature and humidity at the wall segment:

$${\overline{h}}_{seg,wall}={h}_{seg,ag,wall}+{W}_{seg,wall}{h}_{seg,w,wall},$$

where:

*h*_{seg,ag,wall}is the specific enthalpy of dry air and trace gas at the wall segment temperature.*h*_{seg,w,wall}is the specific enthalpy of water vapor at the wall segment temperature.*W*_{seg,wall}is the humidity ratio at the wall segment:$${W}_{seg,wall}=\mathrm{min}\left({W}_{seg,MA},{W}_{seg,s,wall}\right),$$

where

*W*_{seg,s,wall}is the saturated humidity ratio at the wall segment temperature. In other words, the humidity ratio at the wall is the same as the humidity ratio of the moist air flow but not more than the maximum that can be supported at the wall segment temperature.

When *W*_{seg,s,wall} <
*W*_{seg,MA}, water vapor condensation occurs on the
wall surface. The rate of water vapor condensation is

$${\dot{m}}_{w,seg,cond}=\frac{U{A}_{seg,MA}}{{\overline{c}}_{{p}_{seg,MA}}}\left({W}_{seg,MA}-{W}_{seg,wall}\right).$$

The condensed water is assumed to be drained from the wall surface and is thus removed from the moist air flow downstream.

### Pressure Loss

The pressure losses on the two-phase fluid side are

$$\begin{array}{l}{p}_{A,2P}-{p}_{2P}=\frac{{K}_{2P}}{2}\frac{{\dot{m}}_{A,2P}\sqrt{{\dot{m}}^{2}{}_{A,2P}+{\dot{m}}^{2}{}_{thres,2P}}}{2{\rho}_{avg,2P}}\\ {p}_{B,2P}-{p}_{2P}=\frac{{K}_{2P}}{2}\frac{{\dot{m}}_{B,2P}\sqrt{{\dot{m}}^{2}{}_{B,2P}+{\dot{m}}^{2}{}_{thres,2P}}}{2{\rho}_{avg,2P}}\end{array}$$

where:

*p*_{A,2P}and*p*_{B,2P}are the pressures at ports**A1**and**B1**, respectively.*p*_{2P}is internal two-phase fluid pressure at which the heat transfer is calculated.$${\dot{m}}_{A,2P}$$ and $${\dot{m}}_{B,2P}$$ are the mass flow rates into ports

**A1**and**B1**, respectively.*ρ*_{avg,2P}is the average two-phase fluid density over all segments.$${\dot{m}}_{thres,2P}$$ is the laminar threshold for pressure loss, approximated as 1e-4 of the nominal mass flow rate. The block calculates the pressure loss coefficient,

*K*_{2P}, so that*p*_{A,2P}–*p*_{B,2P}matches the nominal pressure loss at the nominal mass flow rate.

The pressure losses on the moist air side are

$$\begin{array}{l}{p}_{A,MA}-{p}_{MA}=\frac{{K}_{MA}}{2}\frac{{\dot{m}}_{A,MA}\sqrt{{\dot{m}}^{2}{}_{A,MA}+{\dot{m}}^{2}{}_{thres,MA}}}{2{\rho}_{avg,2P}}\\ {p}_{B,MA}-{p}_{MA}=\frac{{K}_{MA}}{2}\frac{{\dot{m}}_{B,MA}\sqrt{{\dot{m}}^{2}{}_{B,MA}+{\dot{m}}^{2}{}_{thres,MA}}}{2{\rho}_{avg,MA}}\end{array}$$

where:

*p*_{A,MA}and*p*_{B,MA}are the pressures at ports**A2**and**B2**, respectively.*p*_{MA}is internal moist air pressure at which the heat transfer is calculated.$${\dot{m}}_{A,MA}$$ and $${\dot{m}}_{B,MA}$$ are the mass flow rates into ports

**A2**and**B2**, respectively.*ρ*_{avg,MA}is the average moist air density over all segments.$${\dot{m}}_{thres,MA}$$ is the laminar threshold for pressure loss, approximated as 1e-4 of the nominal mass flow rate. The block calculates the pressure loss coefficient,

*K*_{MA}, so that*p*_{A,MA}–*p*_{B,MA}matches the nominal pressure loss at the nominal mass flow rate.

### Two-Phase Fluid Mass and Energy Conservation

The mass conservation equation for the overall two-phase fluid flow is

$$\left(\frac{d{p}_{2P}}{dt}{\displaystyle \sum _{segments}\left(\frac{\partial {\rho}_{seg,2P}}{\partial p}\right)}+{\displaystyle \sum _{segments}\left(\frac{d{u}_{seg,2P}}{dt}\frac{\partial {\rho}_{seg,2P}}{\partial u}\right)}\right)\frac{{V}_{2P}}{N}={\dot{m}}_{A,2P}+{\dot{m}}_{B,2P},$$

where:

$$\frac{\partial {\rho}_{seg,2P}}{\partial p}$$ is the partial derivative of density with respect to pressure for the segment.

$$\frac{\partial {\rho}_{seg,2P}}{\partial u}$$ is the partial derivative of density with respect to specific internal energy for the segment.

*u*_{seg,2P}is the specific internal energy for the segment.*V*_{2P}is the total two-phase fluid volume.

The summation is over all segments.

**Note**

Although the two-phase fluid flow is divided into *N*=3 segments for
heat transfer calculations, all segments are assumed to be at the same internal pressure,
*p*_{2P}. That is why
*p*_{2P} is outside of the summation.

The energy conservation equation for each segment is

$$\frac{d{u}_{seg,2P}}{dt}\frac{{M}_{2P}}{N}+{u}_{seg,2P}\left({\dot{m}}_{seg,in,2P}-{\dot{m}}_{seg,out,2P}\right)={\Phi}_{seg,in,2P}-{\Phi}_{seg,out,2P}+{Q}_{seg,2P},$$

where:

*M*_{2P}is the total two-phase fluid mass.$${\dot{m}}_{seg,in,2P}$$ and $${\dot{m}}_{seg,out,2P}$$ are the mass flow rates into and out of the segment.

*Φ*_{seg,in,2p}and*Φ*_{seg,out,2p}are the energy flow rates into and out of the segment.

The mass flow rates between segments are assumed to be linearly distributed between the values of$${\dot{m}}_{A,2P}$$ and $${\dot{m}}_{B,2P}$$.

### Moist Air Mass and Energy Conservation

The mass conservation for the overall moist air mixture flow is

$$\begin{array}{l}\left(\frac{d{p}_{MA}}{dt}{\displaystyle \sum _{segments}\left(\frac{\partial {\rho}_{seg,MA}}{\partial p}\right)}+{\displaystyle \sum _{segments}\left(\frac{d{T}_{seg,MA}}{dt}\frac{\partial {\rho}_{seg,MA}}{\partial T}+\frac{d{x}_{w,seg,MA}}{dt}\frac{\partial {\rho}_{seg,MA}}{\partial {x}_{w}}+\frac{d{x}_{g,seg,MA}}{dt}\frac{\partial {\rho}_{seg,MA}}{\partial {x}_{g}}\right)}\right)\frac{{V}_{MA}}{N}=\\ {\dot{m}}_{A,MA}+{\dot{m}}_{B,MA}-{\displaystyle \sum _{segments}\left({\dot{m}}_{w,seg,cond}\right)},\end{array}$$

where:

$$\frac{\partial {\rho}_{seg,MA}}{\partial p}$$ is the partial derivative of density with respect to pressure for the segment.

$$\frac{\partial {\rho}_{seg,MA}}{\partial T}$$ is the partial derivative of density with respect to temperature for the segment.

$$\frac{\partial {\rho}_{seg,MA}}{\partial {x}_{w}}$$ is the partial derivative of density with respect to specific humidity for the segment.

$$\frac{\partial {\rho}_{seg,MA}}{\partial {x}_{g}}$$ is the partial derivative of density with respect to trace gas mass fraction for the segment.

*x*_{w,seg,MA}is the specific humidity, that is, the water vapor mass fraction, for the segment.*x*_{g,seg,MA}is the trace gas mass fraction for the segment.*V*_{MA}is the total moist air volume.

The summation is over all segments.

**Note**

Although the moist air flow is divided into *N*=3 segments for heat
transfer calculations, all segments are assumed to be at the same internal pressure,
*p*_{MA}. That is why
*p*_{MA} is outside of the summation.

The energy conservation equation for each segment is

$$\begin{array}{l}\left(\frac{d{T}_{seg,MA}}{dt}\frac{\partial {u}_{seg,MA}}{\partial T}+\frac{d{x}_{w,seg,MA}}{dt}\frac{\partial {u}_{seg,MA}}{\partial {x}_{w}}+\frac{d{x}_{g,seg,MA}}{dt}\frac{\partial {u}_{seg,MA}}{\partial {x}_{g}}\right)\frac{{M}_{MA}}{N}+{u}_{seg,MA}\left({\dot{m}}_{seg,in,MA}-{\dot{m}}_{seg,out,MA}\right)=\\ {\Phi}_{seg,in,MA}-{\Phi}_{seg,out,MA}+{Q}_{seg,MA}-{\dot{m}}_{w,seg,cond}{h}_{l,wall},\end{array}$$

where:

$$\frac{\partial {u}_{seg,MA}}{\partial T}$$ is the partial derivative of specific internal energy with respect to temperature for the segment.

$$\frac{\partial {u}_{seg,MA}}{\partial {x}_{w}}$$ is the partial derivative of specific internal energy with respect to specific humidity for the segment.

$$\frac{\partial {u}_{seg,MA}}{\partial {x}_{g}}$$ is the partial derivative of specific internal energy with respect to trace gas mass fraction for the segment.

*u*_{seg,2P}is the specific internal energy for the segment.*M*_{MA}is the total moist air mass.$${\dot{m}}_{seg,in,MA}$$ and $${\dot{m}}_{seg,out,MA}$$ are the mass flow rates into and out of the segment.

*Φ*_{seg,in,MA}and*Φ*_{seg,out,MA}are the energy flow rates into and out of the segment.

The mass flow rates between segments are assumed to be linearly distributed between the values of$${\dot{m}}_{A,MA}$$ and $${\dot{m}}_{B,MA}$$.

The water vapor mass conservation equation for each segment is

$$\begin{array}{l}\frac{d{x}_{w,seg,MA}}{dt}\frac{{M}_{MA}}{N}+{x}_{w,seg,MA}\left({\dot{m}}_{seg,in,MA}-{\dot{m}}_{seg,out,MA}\right)=\\ {\dot{m}}_{w,seg,in,MA}-{\dot{m}}_{w,seg,out,MA}-{\dot{m}}_{w,seg,cond},\end{array}$$

where $${\dot{m}}_{w,seg,in,MA}$$ and $${\dot{m}}_{w,seg,out,MA}$$ are the water vapor mass flow rates into and out of the segment.

The trace gas mass conservation equation for each segment is

$$\begin{array}{l}\frac{d{x}_{g,seg,MA}}{dt}\frac{{M}_{MA}}{N}+{x}_{g,seg,MA}\left({\dot{m}}_{seg,in,MA}-{\dot{m}}_{seg,out,MA}\right)=\\ {\dot{m}}_{g,seg,in,MA}-{\dot{m}}_{g,seg,out,MA},\end{array}$$

where $${\dot{m}}_{g,seg,in,MA}$$ and $${\dot{m}}_{g,seg,out,MA}$$ are the trace gas mass flow rates into and out of the segment.

## Ports

### Output

### Conserving

## Parameters

## References

[1]
*Ashrae Handbook: Fundamentals.* Atlanta: Ashrae,
2013.

[2] Çengel, Yunus A. *Heat and Mass Transfer: A Practical Approach*. 3rd ed. McGraw-Hill
Series in Mechanical Engineering. Boston: McGraw-Hill, 2007.

[3] Mitchell, John W., and James E.
Braun. *Principles of Heating, Ventilation, and Air Conditioning in
Buildings*. Hoboken, NJ: Wiley, 2013.

[4] Shah, R. K., and Dušan P.
Sekulić. *Fundamentals of Heat Exchanger Design*. Hoboken,
NJ: John Wiley & Sons, 2003.

[5] Cavallini, Alberto, and Roberto
Zecchin. “A DIMENSIONLESS CORRELATION FOR HEAT TRANSFER IN FORCED CONVECTION CONDENSATION.” In
*Proceeding of International Heat Transfer Conference 5*,
309–13. Tokyo, Japan: Begellhouse, 1974. https://doi.org/10.1615/IHTC5.1220.

## Extended Capabilities

## Version History

**Introduced in R2021b**