Main Content

# System-Level Heat Exchanger (2P-2P)

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

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

## Description

The System-Level Heat Exchanger (2P-2P) block models a heat exchanger between two distinct two-phase fluid networks. Each network has its own set of fluid properties.

The block model is based on performance data from the heat exchanger datasheet, rather than on the detailed geometry of the exchanger, and therefore you can use this block when geometry data is unavailable. Either or both sides of the heat exchanger can condense or vaporize fluid as a result of the heat exchange. You can also use this block as an internal heat exchanger in a refrigeration system. An internal heat exchanger improves refrigeration system efficiency by providing additional heat exchange between the outlet of the condenser and the outlet of the evaporator.

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.

Each side of the heat exchanger approximates the liquid zone, mixture zone, and vapor zone based on the change in enthalpy along the flow path.

### Heat Transfer

The two-phase fluid 1 flow and the two-phase fluid 2 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,2P1}+{Q}_{seg,2P2}=0,$`

where:

• Qseg,2P1 is the heat flow rate from the wall (that is, the heat transfer surface) to the two-phase fluid 1 in the segment.

• Qseg,2P2 is the heat flow rate from the wall to the two-phase fluid 2 in the segment.

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

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

where:

• Mwall is the mass of the wall.

• cpwall is the specific heat of the wall.

• N = 3 is the number of segments.

• Tseg,wall is the average wall temperature in the segment.

• t is time.

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

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

where:

• UAseg,2P1 is the weighted-average heat transfer conductance for the two-phase fluid 1 in the segment.

• Tseg,2P1 is the weighted-average fluid temperature for the two-phase fluid 1 in the segment.

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

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

where:

• UAseg,2P2 is the weighted-average heat transfer conductance for the two-phase fluid 2 in the segment.

• Tseg,2P2 is the weighted-average fluid temperature for the two-phase fluid 2 in the segment.

### Two-Phase Fluid 1 Heat Transfer Correlation

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

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

where:

• aL,2P1, b2P1, and c2P1 are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the Correlation Coefficients section.

• Reseg,L,2P1 is the average liquid Reynolds number for the segment.

• Prseg,L,2P1 is the average liquid Prandtl number for the segment.

• kseg,L,2P1 is the average liquid thermal conductivity for the segment.

• G2P1 is the geometry scale factor for the two-phase fluid 1 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,2P1}=\frac{{\stackrel{˙}{m}}_{seg,2P1}{D}_{ref,2P1}}{{\mu }_{seg,L,2P1}{S}_{ref,2P1}},$`

where:

• ${\stackrel{˙}{m}}_{seg,2P1}$ is the mass flow rate through the segment.

• μseg,L,2P1 is the average liquid dynamic viscosity for the segment.

• Dref,2P1 is an arbitrary reference diameter.

• Sref,2P1 is an arbitrary reference flow area.

Note

The Dref,2P1 and Sref,2P1 terms are included in this equation for unit calculation purposes only, to make Reseg,L,2P1 nondimensional. The values of Dref,2P1 and Sref,2P1 are arbitrary because the G2P1 calculation overrides these values.

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

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

where:

• aV,2P1, b2P1, and c2P1 are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the Correlation Coefficients section.

• Reseg,V,2P1 is the average vapor Reynolds number for the segment.

• Prseg,V,2P1 is the average vapor Prandtl number for the segment.

• kseg,V,2P1 is the average vapor thermal conductivity for the segment.

The average vapor Reynolds number is

`${\mathrm{Re}}_{seg,V,2P1}=\frac{{\stackrel{˙}{m}}_{seg,2P1}{D}_{ref,2P1}}{{\mu }_{seg,V,2P1}{S}_{ref,2P1}},$`

where μseg,V,2P1 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,2P1}={a}_{M,2P1}{\left({\mathrm{Re}}_{seg,SL,2P1}\right)}^{{b}_{2P1}}CZ{\left({\mathrm{Pr}}_{seg,SL,2P1}\right)}^{{c}_{2P1}}{k}_{seg,SL,2P1}\frac{{G}_{2P1}}{N},$`

where:

• aM,2P1, b2P1, and c2P1 are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the Correlation Coefficients section.

• Reseg,SL,2P1 is the saturated liquid Reynolds number for the segment.

• Prseg,SL,2P1 is the saturated liquid Prandtl number for the segment.

• kseg,SL,2P1 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,2P1}=\frac{{\stackrel{˙}{m}}_{seg,2P1}{D}_{ref,2P1}}{{\mu }_{seg,SL,2P1}{S}_{ref,2P1}},$`

where μseg,SL,2P1 is the saturated liquid dynamic viscosity for the segment.

The Cavallini and Zecchin term is

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

where:

• νseg,SL,2P1 is the saturated liquid specific volume for the segment.

• νseg,SV,2P1 is the saturated vapor specific volume for the segment.

• xseg,in,2P1 is the vapor quality at the segment inlet.

• xseg,out,2P1 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 xseg,in,2P1 to xseg,out,2P1.

### Two-Phase Fluid 1 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 based on the change in specific enthalpy across the segment and the saturated liquid and vapor specific enthalpies:

`$\begin{array}{l}{w}_{L}=\frac{|\mathrm{min}\left({h}_{seg,out,2P1},{h}_{seg,SL,2P1}\right)-\mathrm{min}\left({h}_{seg,in,2P1},{h}_{seg,SL,2P1}\right)|}{|{h}_{seg,out,2P1}-{h}_{seg,in,2P1}|}\\ {w}_{V}=\frac{|\mathrm{max}\left({h}_{seg,out,2P1},{h}_{seg,SV,2P1}\right)-\mathrm{max}\left({h}_{seg,in,2P1},{h}_{seg,SV,2P1}\right)|}{|{h}_{seg,out,2P1}-{h}_{seg,in,2P1}|}\\ {w}_{M}=1-{w}_{L}-{w}_{V}\end{array}$`

where:

• hseg,in,2P1 is the specific enthalpy at the segment inlet.

• hseg,out,2P1 is the specific enthalpy at the segment outlet.

• hseg,SL,2P1 is the saturated liquid specific enthalpy for the segment.

• hseg,SV,2P1 is the saturated vapor specific enthalpy for the segment.

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

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

The weighted-average fluid 1 temperature for the segment is

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

where:

• Tseg,L,2P1 is the average liquid temperature for the segment.

• Tseg,V,2P1 is the average vapor temperature for the segment.

• Tseg,M,2P1 is the average mixture temperature for the segment, which is the saturated liquid temperature.

### Two-Phase Fluid 2 Heat Transfer Correlation

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

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

where:

• aL,2P2, bL,2P2, and cL,2P2 are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the Correlation Coefficients section.

• Reseg,L,2P2 is the average liquid Reynolds number for the segment.

• Prseg,L,2P2 is the average liquid Prandtl number for the segment.

• kseg,L,2P2 is the average liquid thermal conductivity for the segment.

• G2P2 is the geometry scale factor for the two-phase fluid 2 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,2P2}=\frac{{\stackrel{˙}{m}}_{seg,2P2}{D}_{ref,2P2}}{{\mu }_{seg,L,2P2}{S}_{ref,2P2}},$`

where:

• ${\stackrel{˙}{m}}_{seg,2P2}$ is the mass flow rate through the segment.

• μseg,L,2P2 is the average liquid dynamic viscosity for the segment.

• Dref,2P2 is an arbitrary reference diameter.

• Sref,2P2 is an arbitrary reference flow area.

Note

The Dref,2P2 and Sref,2P2 terms are included in this equation for unit calculation purposes only, to make Reseg,L,2P2 nondimensional. The values of Dref,2P and Sref,2P2 are arbitrary because the G2P2 calculation overrides these values.

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

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

where:

• aV,2P2, bV,2P2, and cV,2P2 are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the Correlation Coefficients section.

• Reseg,V,2P2 is the average vapor Reynolds number for the segment.

• Prseg,V,2P2 is the average vapor Prandtl number for the segment.

• kseg,V,2P2 is the average vapor thermal conductivity for the segment.

The average vapor Reynolds number is

`${\mathrm{Re}}_{seg,V,2P2}=\frac{{\stackrel{˙}{m}}_{seg,2P2}{D}_{ref,2P2}}{{\mu }_{seg,V,2P2}{S}_{ref,2P2}},$`

where μseg,V,2P2 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,2P2}={a}_{M,2P2}{\left({\mathrm{Re}}_{seg,SL,2P2}\right)}^{{b}_{2P2}}CZ{\left({\mathrm{Pr}}_{seg,SL,2P2}\right)}^{{c}_{2P2}}{k}_{seg,SL,2P2}\frac{{G}_{2P2}}{N},$`

where:

• aM,2P2, bL,2P2, and cL,2P2 are the coefficients of the Nusselt number correlation. These coefficients appear as block parameters in the Correlation Coefficients section.

• Reseg,SL,2P2 is the saturated liquid Reynolds number for the segment.

• Prseg,SL,2P2 is the saturated liquid Prandtl number for the segment.

• kseg,SL,2P2 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,2P2}=\frac{{\stackrel{˙}{m}}_{seg,2P2}{D}_{ref,2P2}}{{\mu }_{seg,SL,2P2}{S}_{ref,2P2}},$`

where μseg,SL,2P2 is the saturated liquid dynamic viscosity for the segment.

The Cavallini and Zecchin term is

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

where:

• νseg,SL,2P2 is the saturated liquid specific volume for the segment.

• νseg,SV,2P2 is the saturated vapor specific volume for the segment.

• xseg,in,2P2 is the vapor quality at the segment inlet.

• xseg,out,2P2 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 xseg,in,2P2 to xseg,out,2P2.

### Two-Phase Fluid 2 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 based on the change in specific enthalpy across the segment and the saturated liquid and vapor specific enthalpies:

`$\begin{array}{l}{w}_{L}=\frac{|\mathrm{min}\left({h}_{seg,out,2P2},{h}_{seg,SL,2P2}\right)-\mathrm{min}\left({h}_{seg,in,2P2},{h}_{seg,SL,2P2}\right)|}{|{h}_{seg,out,2P2}-{h}_{seg,in,2P2}|}\\ {w}_{V}=\frac{|\mathrm{max}\left({h}_{seg,out,2P2},{h}_{seg,SV,2P2}\right)-\mathrm{max}\left({h}_{seg,in,2P2},{h}_{seg,SV,2P2}\right)|}{|{h}_{seg,out,2P2}-{h}_{seg,in,2P2}|}\\ {w}_{M}=1-{w}_{L}-{w}_{V}\end{array}$`

where:

• hseg,in,2P2 is the specific enthalpy at the segment inlet.

• hseg,out,2P2 is the specific enthalpy at the segment outlet.

• hseg,SL,2P2 is the saturated liquid specific enthalpy for the segment.

• hseg,SV,2P2 is the saturated vapor specific enthalpy for the segment.

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

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

The weighted-average fluid 2 temperature for the segment is

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

where:

• Tseg,L,2P2 is the average liquid temperature for the segment.

• Tseg,V,2P2 is the average vapor temperature for the segment.

• Tseg,M,2P2 is the average mixture temperature for the segment, which is the saturated liquid temperature.

### Pressure Loss

The pressure losses on the two-phase fluid 1 side are

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

where:

• pA,2P1 and pB,2P1 are the pressures at ports A1 and B1, respectively.

• p2P1 is internal two-phase fluid 1 pressure at which the heat transfer is calculated.

• ${\stackrel{˙}{m}}_{A,2P1}$ and ${\stackrel{˙}{m}}_{B,2P1}$ are the mass flow rates into ports A1 and B1, respectively.

• ρavg,2P1 is the average two-phase fluid 1 density over all segments.

• ${\stackrel{˙}{m}}_{thres,2P1}$ is the laminar threshold for pressure loss, approximated as 1e-4 of the nominal mass flow rate. The block calculates the pressure loss coefficient, K2P1, so that pA,2P1pB,2P1 matches the nominal pressure loss at the nominal mass flow rate.

The pressure losses on the two-phase fluid 2 side are

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

where:

• pA,2P2 and pB,2P2 are the pressures at ports A2 and B2, respectively.

• p2P2 is internal two-phase fluid 2 pressure at which the heat transfer is calculated.

• ${\stackrel{˙}{m}}_{A,2P2}$ and ${\stackrel{˙}{m}}_{B,2P2}$ are the mass flow rates into ports A2 and B2, respectively.

• ρavg,2P2 is the average two-phase fluid 2 density over all segments.

• ${\stackrel{˙}{m}}_{thres,2P2}$ is the laminar threshold for pressure loss, approximated as 1e-4 of the nominal mass flow rate. The block calculates the pressure loss coefficient, K2P2, so that pA,2P2pB,2P2 matches the nominal pressure loss at the nominal mass flow rate.

### Two-Phase Fluid 1 Mass and Energy Conservation

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

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

where:

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

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

• useg,2P1 is the specific internal energy for the segment.

• V2P1 is the total two-phase fluid 1 volume.

The summation is over all segments.

Note

Although the two-phase fluid 1 flow is divided into N=3 segments for heat transfer calculations, all segments are assumed to be at the same internal pressure, p2P1. That is why p2P1 is outside of the summation.

The energy conservation equation for each segment is

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

where:

• M2P1 is the total two-phase fluid 1 mass.

• ${\stackrel{˙}{m}}_{seg,in,2P1}$ and ${\stackrel{˙}{m}}_{seg,out,2P1}$ are the mass flow rates into and out of the segment.

• Φseg,in,2p1 and Φseg,out,2p1 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${\stackrel{˙}{m}}_{A,2P1}$ and ${\stackrel{˙}{m}}_{B,2P1}$.

### Two-Phase Fluid 2 Mass and Energy Conservation

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

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

where:

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

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

• useg,2P2 is the specific internal energy for the segment.

• V2P2 is the total two-phase fluid 2 volume.

The summation is over all segments.

Note

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

The energy conservation equation for each segment is

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

where:

• M2P2 is the total two-phase fluid 2 mass.

• ${\stackrel{˙}{m}}_{seg,in,2P2}$ and ${\stackrel{˙}{m}}_{seg,out,2P2}$ are the mass flow rates into and out of the segment.

• Φseg,in,2p2 and Φseg,out,2p2 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${\stackrel{˙}{m}}_{A,2P2}$ and ${\stackrel{˙}{m}}_{B,2P2}$.

## Ports

### Output

expand all

Rate of heat transfer to the first two-phase fluid network, returned as a physical signal. Physical signals Q1 and Q2 are usually equal in value with opposite sign. However, if the Wall thermal mass parameter is set to `On`, then these two signals may have different values because the wall may absorb and release some of the heat being transferred.

Rate of heat transfer to the second two-phase fluid network, returned as a physical signal. Physical signals Q1 and Q2 are usually equal in value with opposite sign. However, if the Wall thermal mass parameter is set to `On`, then these two signals may have different values because the wall may absorb and release some of the heat being transferred.

### Conserving

expand all

Inlet or outlet port associated with the first two-phase fluid network.

Inlet or outlet port associated with the first two-phase fluid network.

Inlet or outlet port associated with the second two-phase fluid network.

Inlet or outlet port associated with the second two-phase fluid network.

## Parameters

expand all

### Configuration

Enable or disable the effect of thermal mass on the heat transfer surface. Setting this parameter to `On` introduces additional dynamics to the simulation, so that it takes longer to reach steady state, but does not affect the results at steady-state simulation.

Mass of the heat transfer surface.

#### Dependencies

To enable this parameter, set Wall thermal mass to `On`.

Specific heat of the heat transfer surface.

#### Dependencies

To enable this parameter, set Wall thermal mass to `On`.

Flow area at the two-phase fluid 1 port A1.

Flow area at the two-phase fluid 1 port B1.

Flow area at the two-phase fluid 2 port A2.

Flow area at the two-phase fluid 2 port B2.

### Two-Phase Fluid 1

Select the nominal operating condition:

• ```Heat transfer from two-phase fluid 1 to two-phase fluid 2``` — Side 1 is being cooled and side 2 is being heated.

• ```Heat transfer from two-phase fluid 2 to two-phase fluid 1``` — Side 2 is being cooled and side1 is being heated.

This choice relates only to specifying the nominal operating condition parameters. It does not mean that heat transfer can only happen in the specified direction during simulation.

Mass flow rate from port A1 to port B1 during the nominal operating condition.

Pressure drop from port A1 to port B1 during the nominal operating condition.

Select the method of pressure specification:

• `Inlet pressure` — Specify the nominal inlet pressure.

• ```Saturation pressure at specified saturation temperature``` — Specify the nominal saturation temperature.

Pressure at the inlet of the two-phase fluid side 1 of the heat exchanger during nominal operating condition.

#### Dependencies

To enable this parameter, set Pressure specification to `Inlet pressure`.

Saturation temperature at the outlet of the two-phase fluid side 1 of the heat exchanger during nominal operating condition. The pressure in the heat exchanger is the corresponding saturation pressure. The nominal saturation temperature must be less than the critical temperature.

#### Dependencies

To enable this parameter, set Pressure specification to ```Saturation pressure at specified saturation temperature```.

Quantity used to describe the inlet condition of the fluid at the nominal operating condition: temperature, specific enthalpy, or vapor quality.

Specific enthalpy at the inlet of the two-phase fluid side 1 of the heat exchanger during the nominal operating condition.

#### Dependencies

To enable this parameter, set Inlet condition specification to `Specific enthalpy`.

Temperature at the inlet of the two-phase fluid side 1 of the heat exchanger during the nominal operating condition.

#### Dependencies

To enable this parameter, set Inlet condition specification to `Temperature`.

Vapor quality, defined as the mass fraction of vapor in a liquid-vapor mixture, at the inlet of the two-phase fluid side 1 of the heat exchanger during the nominal operating condition.

#### Dependencies

To enable this parameter, set Inlet condition specification to `Vapor quality`.

Select whether to specify the performance of the heat exchanger at the nominal operating condition directly, by the rate of heat transfer, or indirectly, by the outlet condition.

Rate of heat transfer, depending on the nominal operating condition:

• If Nominal operating condition is ```Heat transfer from two-phase fluid 1 to two-phase fluid 2```, rate of heat transfer from the two-phase fluid side 1 to side 2 during the nominal operating condition.

• If Nominal operating condition is ```Heat transfer from two-phase fluid 2 to two-phase fluid 1```, rate of heat transfer from the two-phase fluid side 2 to side 1 during the nominal operating condition.

#### Dependencies

To enable this parameter, set Heat transfer capacity specification to ```Rate of heat transfer```.

Select the quantity for outlet condition specification:

• `Specific enthalpy` — Specify the nominal specific enthalpy.

• `Subcooling` — Specify the nominal subcooling. This option is available if you set Nominal operating condition to ```Heat transfer from two-phase fluid 1 to two-phase fluid 2```.

• `Superheating` — Specify the nominal superheating. This option is available if you set Nominal operating condition to ```Heat transfer from two-phase fluid 2 to two-phase fluid 1```.

• `Vapor quality` — Specify the nominal vapor quality.

#### Dependencies

To enable this parameter, set Heat transfer capacity specification to `Outlet condition`.

Specific enthalpy at the outlet of the two-phase fluid side 1 of the heat exchanger during the nominal operating condition.

#### Dependencies

To enable this parameter, set Outlet condition specification to `Specific enthalpy`.

Degree of temperature below the liquid saturation temperature at the outlet of the two-phase fluid side 1 of the heat exchanger during the nominal operating condition.

#### Dependencies

To enable this parameter, set Outlet condition specification to `Subcooling`.

Degree of temperature above the vapor saturation temperature at the outlet of the two-phase fluid side 1 of the heat exchanger during the nominal operating condition.

#### Dependencies

To enable this parameter, set Outlet condition specification to `Superheating`.

Two-phase fluid vapor quality, defined as the mass fraction of vapor in a liquid-vapor mixture, at the outlet of the two-phase fluid side 1 of the heat exchanger during the nominal operating condition.

If using this option, the initial pressure cannot be higher than the critical pressure.

#### Dependencies

To enable this parameter, set Outlet condition specification to `Vapor quality`.

Total volume of two-phase fluid 1 inside the heat exchanger.

Select how to specify initial state of two-phase fluid 1:

• `Same as nominal operating condition` — Start the simulation at the nominal operating condition.

• `Specify initial condition` — Specify a different set of initial conditions using additional parameters.

Quantity used to describe the initial state of the side 1 fluid: temperature, vapor quality, vapor void fraction, specific enthalpy, or specific internal energy.

#### Dependencies

To enable this parameter, set Initial condition specification to ```Specify initial condition```.

Two-phase fluid 1 pressure at the start of the simulation.

Two-phase fluid 1 specific enthalpy at the start of simulation. If the value is a scalar, then the initial specific enthalpy is assumed uniform. If the value is a two-element vector, then the initial specific enthalpy is assumed to vary linearly between ports A1 and B1, with the first element corresponding to port A1 and the second element corresponding to port B1.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to `Specific enthalpy`.

Two-phase fluid 1 temperature at the start of simulation. If the value is a scalar, then the initial temperature is assumed uniform. If the value is a two-element vector, then the initial temperature is assumed to vary linearly between ports A1 and B1, with the first element corresponding to port A1 and the second element corresponding to port B1.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to `Temperature`.

Two-phase fluid 1 vapor quality, defined as the mass fraction of vapor in a liquid-vapor mixture, at the start of simulation. If the value is a scalar, then the initial vapor quality is assumed uniform. If the value is a two-element vector, then the initial vapor quality is assumed to vary linearly between ports A1 and B1, with the first element corresponding to port A1 and the second element corresponding to port B1.

If using this option, the initial pressure cannot be higher than the critical pressure.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to `Vapor quality`.

Two-phase fluid 1 vapor void fraction, defined as the volume fraction of vapor in a liquid-vapor mixture,at the start of simulation. If the value is a scalar, then the initial vapor void fraction is assumed uniform. If the value is a two-element vector, then the initial vapor void fraction is assumed to vary linearly between ports A1 and B1, with the first element corresponding to port A1 and the second element corresponding to port B1.

If using this option, the initial pressure cannot be higher than the critical pressure.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to `Vapor void fraction`.

Two-phase fluid 1 specific internal energy at the start of simulation. If the value is a scalar, then the initial specific internal energy is assumed uniform. If the value is a two-element vector, then the initial specific internal energy is assumed to vary linearly between ports A1 and B1, with the first element corresponding to port A1 and the second element corresponding to port B1.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to ```Specific internal energy```.

### Two-Phase Fluid 2

Mass flow rate from port A2 to port B2 during the nominal operating condition.

Pressure drop from port A2 to port B2 during the nominal operating condition.

Select the method of pressure specification:

• `Inlet pressure` — Specify the nominal inlet pressure.

• ```Saturation pressure at specified saturation temperature``` — Specify the nominal saturation temperature.

Pressure at the inlet of the two-phase fluid side 2 of the heat exchanger during nominal operating condition.

#### Dependencies

To enable this parameter, set Pressure specification to `Inlet pressure`.

Saturation temperature at the outlet of the two-phase fluid side 2 of the heat exchanger during nominal operating condition. The pressure in the heat exchanger is the corresponding saturation pressure. The nominal saturation temperature must be less than the critical temperature.

#### Dependencies

To enable this parameter, set Pressure specification to ```Saturation pressure at specified saturation temperature```.

Quantity used to describe the inlet condition of the fluid at the nominal operating condition: temperature, specific enthalpy, or vapor quality.

Specific enthalpy at the inlet of the two-phase fluid side 2 of the heat exchanger during the nominal operating condition.

#### Dependencies

To enable this parameter, set Inlet condition specification to `Specific enthalpy`.

Temperature at the inlet of the two-phase fluid side 2 of the heat exchanger during the nominal operating condition.

#### Dependencies

To enable this parameter, set Inlet condition specification to `Temperature`.

Vapor quality, defined as the mass fraction of vapor in a liquid-vapor mixture, at the inlet of the two-phase fluid side 2 of the heat exchanger during the nominal operating condition.

#### Dependencies

To enable this parameter, set Inlet condition specification to `Vapor quality`.

Total volume of two-phase fluid 2 inside the heat exchanger.

Select how to specify initial state of two-phase fluid 2:

• `Same as nominal operating condition` — Start the simulation at the nominal operating condition.

• `Specify initial condition` — Specify a different set of initial conditions using additional parameters.

Quantity used to describe the initial state of the side 2 fluid: temperature, vapor quality, vapor void fraction, specific enthalpy, or specific internal energy.

#### Dependencies

To enable this parameter, set Initial condition specification to ```Specify initial condition```.

Two-phase fluid 2 pressure at the start of the simulation.

Two-phase fluid 2 specific enthalpy at the start of simulation. If the value is a scalar, then the initial specific enthalpy is assumed uniform. If the value is a two-element vector, then the initial specific enthalpy is assumed to vary linearly between ports A2 and B2, with the first element corresponding to port A2 and the second element corresponding to port B2.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to `Specific enthalpy`.

Two-phase fluid 2 temperature at the start of simulation. If the value is a scalar, then the initial temperature is assumed uniform. If the value is a two-element vector, then the initial temperature is assumed to vary linearly between ports A2 and B2, with the first element corresponding to port A2 and the second element corresponding to port B2.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to `Temperature`.

Two-phase fluid 2 vapor quality, defined as the mass fraction of vapor in a liquid-vapor mixture, at the start of simulation. If the value is a scalar, then the initial vapor quality is assumed uniform. If the value is a two-element vector, then the initial vapor quality is assumed to vary linearly between ports A2 and B2, with the first element corresponding to port A2 and the second element corresponding to port B2.

If using this option, the initial pressure cannot be higher than the critical pressure.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to `Vapor quality`.

Two-phase fluid 2 vapor void fraction, defined as the volume fraction of vapor in a liquid-vapor mixture,at the start of simulation. If the value is a scalar, then the initial vapor void fraction is assumed uniform. If the value is a two-element vector, then the initial vapor void fraction is assumed to vary linearly between ports A2 and B2, with the first element corresponding to port A2 and the second element corresponding to port B2.

If using this option, the initial pressure cannot be higher than the critical pressure.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to `Vapor void fraction`.

Two-phase fluid 2 specific internal energy at the start of simulation. If the value is a scalar, then the initial specific internal energy is assumed uniform. If the value is a two-element vector, then the initial specific internal energy is assumed to vary linearly between ports A2 and B2, with the first element corresponding to port A2 and the second element corresponding to port B2.

#### Dependencies

To enable this parameter, set Initial fluid energy specification to ```Specific internal energy```.

### Correlation Coefficients

Proportionality constant in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for subcooled liquid in two-phase fluid 1. The default value is based on the Colburn equation.

Proportionality constant in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for liquid-vapor mixture in two-phase fluid 1. The default value is based on the Cavallini and Zecchin correlation.

Proportionality constant in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for superheated vapor in two-phase fluid 1. The default value is based on the Colburn equation.

Reynolds number exponent in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for two-phase fluid 1. The same value applies to subcooled liquid, liquid-vapor mixture, and superheated vapor.

Prandtl number exponent in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for two-phase fluid 1. The same value applies to subcooled liquid, liquid-vapor mixture, and superheated vapor.

Proportionality constant in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for subcooled liquid in two-phase fluid 2. The default value is based on the Colburn equation.

Proportionality constant in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for liquid-vapor mixture in two-phase fluid 2. The default value is based on the Cavallini and Zecchin correlation.

Proportionality constant in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for superheated vapor in two-phase fluid 2. The default value is based on the Colburn equation.

Reynolds number exponent in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for two-phase fluid 2. The same value applies to subcooled liquid, liquid-vapor mixture, and superheated vapor.

Prandtl number exponent in the correlation of Nusselt number as a function of Reynolds number and Prandtl number for two-phase fluid 2. The same value applies to subcooled liquid, liquid-vapor mixture, and superheated vapor.

## Extended Capabilities

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

Introduced in R2021b

Get trial now