# 3-Zone Pipe (2P)

Conduit for the transport of a phase-changing fluid with heat transfer

**Library:**Simscape / Fluids / Two-Phase Fluid / Pipes & Fittings

## Description

The Pipe (2P) block models a pipe with a phase-changing
fluid. Each fluid phase is called a *zone*, which is a fractional
value between 0 and 1. Zones do not mix. The 3-Zone Pipe (2P) uses a boundary-following
model to track the sub-cooled liquid (L), vapor-liquid mixture (M), and super-heated
vapor (V) in three zones. The relative amount of space a zone occupies in the system is
called a *zone length fraction* within the system.

Port **H** is a thermal port that represents the environmental
temperature. The rate of heat transfer between the fluid and the environment depends on
the fluid phase of each zone. The pipe wall is modeled within the block and the pipe
wall temperature in each zone may be different. The pressure and temperature are
influenced by fluid dynamic compressibility and the fluid zone thermal capacity.

### Heat Transfer Between the Fluid and the Wall

The convective heat transfer coefficient between the fluid and the wall,
*α _{F}*, varies per zone according to
the Nusselt number:

$${\alpha}_{F}=\frac{\text{Nu}k}{{D}_{\text{H}}},$$

where:

`Nu`

is the zone Nusselt number.*k*the average fluid thermal conductivity.*D*_{H}is the pipe**Hydraulic diameter**, the equivalent diameter of a non-circular pipe.

The Nusselt number used in the heat transfer coefficient is the greater of the turbulent- and laminar-flow Nusselt numbers.

For turbulent flows in the subcooled liquid or superheated vapor zones, the Nusselt number is calculated with the Gnielinski correlation:

$$\text{Nu}=\frac{\frac{f}{8}\left(\text{Re}-1000\right)\text{Pr}}{1+12.7{\left(\text{}\frac{f}{8}\right)}^{1/2}\left({\text{Pr}}_{}^{2/3}-1\right)},$$

where:

`Re`

is the zone average Reynolds number.`Pr`

is the zone average Prandtl number.*f*is the Darcy friction factor, calculated from the Haaland correlation:$$\frac{1}{\sqrt{{f}_{}}}=-1.8\text{log}\left[{\left(\frac{\frac{\epsilon}{{D}_{\text{H}}}}{3.7}\right)}^{1.11}+\frac{6.9}{{\text{Re}}_{}}\right],$$

where

*ε*is the wall**Internal surface absolute roughness**.

For turbulent flows in the liquid-vapor mixture zone, the Nusselt number is calculated with the Cavallini-Zecchin correlation:

$$\text{Nu}=\frac{{\text{aRe}}_{\text{SL}}^{b}{\text{Pr}}_{\text{SL}}^{c}\left\{{\left[\left(\sqrt{\frac{{\rho}_{\text{SL}}}{{\rho}_{\text{SV}}}}-1\right){x}_{\text{Out}}+1\right]}^{1+b}-{\left[\left(\sqrt{\frac{{\rho}_{\text{SL}}}{{\rho}_{\text{SV}}}}-1\right){x}_{\text{In}}+1\right]}^{1+b}\right\}}{\left(1+b\right)\left(\sqrt{\frac{{\rho}_{\text{SL}}}{{\rho}_{\text{SV}}}}-1\right)({x}_{\text{Out}}-{x}_{\text{In}})}.$$

Where:

*Re*_{SL}is the Reynolds number of the saturated liquid.*Pr*_{SL}is the Prandtl number of the saturated liquid.*ρ*_{SL}is the density of the saturated liquid.*ρ*_{SV}is the density of the saturated vapor.*a*= 0.05,*b*= 0.8, and*c*= 0.33.

When fins are modeled on the pipe internal surface, the heat transfer coefficient is:

$${\alpha}_{F}=\frac{\text{Nu}k}{{D}_{\text{H}}}\left(1+{\eta}_{\text{Int}}{s}_{\text{Int}}\right),$$

where:

*η*_{Int}is the**Internal fin efficiency**.*s*_{Int}is the**Ratio of internal fins surface area to no-fin surface area**.

For laminar flows, the Nusselt number is set by the **Laminar flow Nusselt
number** parameter.

**Specific Enthalpy**

The heat transfer rate from the fluid is based on the change in specific enthalpy in each zone:

$$Q={\dot{m}}_{Q}\left(\Delta {h}_{\text{L}}+\Delta {h}_{\text{M}}+\Delta {h}_{\text{V}}\right),$$

where $${\dot{m}}_{Q}$$ is the mass flow rate for heat transfer. It is the pipe inlet
mass flow rate, either $$\dot{m}$$_{A} or $$\dot{m}$$_{B}, depending on the direction of fluid
flow.

In the liquid and vapor zones, the change in specific enthalpy is defined as:

$$\Delta h={c}_{\text{p}}\left({T}_{H}-{T}_{\text{I}}\right)\left[1-\text{exp}\left(-\frac{z{S}_{\text{W}}}{{\dot{m}}_{Q}{c}_{\text{p}}\left({\alpha}_{F}^{-1}+{\alpha}_{\text{E}}^{-1}\right)}\right)\right],$$

where:

*c*is the specific heat of the liquid or vapor._{p}*T*is the environmental temperature._{H}*T*is the liquid inlet temperature._{I}*z*is the fluid zone length fraction.*α*is the heat transfer coefficient between the wall and the environment._{E}*S*is wall surface area:_{W}$${S}_{\text{W}}=\frac{4A}{{D}_{\text{H}}}L,$$

where:

*A*is the pipe**Cross-sectional area**.*L*is the**Pipe length**.

Note that this wall surface area does not include fin area, which is defined in the

**Ratio of external fins surface area to no-fin surface area**and**Ratio of internal fins surface area to no-fin surface area**parameters. Fins are set in proportion to the wall surface area. A value of`0`

means there are no fins on the pipe wall.

In the liquid-vapor mixture zone, the change in specific enthalpy is calculated as:

$$\Delta h=\left({T}_{\text{H}}-{T}_{\text{S}}\right)\frac{z{S}_{\text{W}}}{{\dot{m}}_{Q}\left({\alpha}_{F}^{-1}+{\alpha}_{\text{E}}^{-1}\right)},$$

where *T _{S}* is the
fluid saturation temperature. It is assumed that the liquid-vapor mixture is
always at this temperature.

**Heat Transfer Rate**

The total heat transfer between the fluid and the pipe wall is the sum of the heat transfer in each fluid phase:

$${Q}_{\text{F}}={Q}_{\text{F,L}}+{Q}_{\text{F,V}}+{Q}_{\text{F,M}}.$$

The heat transfer rate between the fluid and the pipe in the liquid zone is:

$${Q}_{\text{F,L}}={\dot{m}}_{\text{Q}}{c}_{\text{p,L}}\left[{T}_{\text{W,L}}-\text{min}\left({T}_{\text{I}},{T}_{\text{S}}\right)\right]\left[1-\text{exp}\left(-\frac{{z}_{\text{L}}{S}_{\text{W}}{\alpha}_{\text{L}}}{{\dot{m}}_{\text{Q}}{c}_{\text{p,L}}}\right)\right].$$

where *T _{W,L}* is the
temperature of the wall surrounding the liquid zone.

The heat transfer rate between the fluid and the pipe in the mixture zone is:

$${Q}_{\text{F,M}}=\left({T}_{\text{H}}-{T}_{\text{Sat}}\right){z}_{\text{M}}{S}_{\text{W}}{\alpha}_{\text{M}}.$$

The heat transfer rate between the fluid and the pipe in the vapor zone is:

$${Q}_{\text{F,V}}={\dot{m}}_{\text{Q}}{c}_{\text{p,V}}\left[{T}_{\text{W,V}}-\text{min}\left({T}_{\text{I}},{T}_{\text{Sat}}\right)\right]\left[1-\text{exp}\left(-\frac{{z}_{\text{V}}{S}_{\text{W}}{\alpha}_{\text{V}}}{{\dot{m}}_{\text{Q}}{c}_{\text{p,V}}}\right)\right],$$

where *T _{W,V}* is the
temperature of the wall surrounding the vapor zone.

### Heat Transfer Between the Wall and the Environment

If the pipe wall has a finite thickness, the heat transfer coefficient between the
wall and the environment, *α _{E}*, is defined by:

$$\frac{1}{{\alpha}_{\text{E}}}=\frac{1}{{\alpha}_{\text{W}}}+\frac{1}{{\alpha}_{\text{Ext}}\left(1+{\eta}_{\text{Ext}}{s}_{\text{Ext}}\right)},$$

where *α*_{W} is the heat
transfer coefficient due to conduction through the wall:

$${\alpha}_{\text{W}}=\frac{{k}_{\text{W}}}{{D}_{\text{H}}\text{ln}\left(1+\frac{{t}_{\text{W}}}{{D}_{\text{H}}}\right)},$$

and where:

*k*is the_{W}**Wall thermal conductivity**.*t*is the_{W}**Wall thickness**.*α*_{Ext}is the**External environment heat transfer coefficient**.*η*_{Ext}is the**External fin efficiency**.*s*_{Ext}is the**Ratio of external fins surface area to no-fin surface area**.

If the wall does not have thermal mass, the heat transfer coefficient between the
wall and environment equals the heat transfer coefficient of the environment,
*α*_{Ext}.

**Heat Transfer Rate**

The heat transfer rate between each wall zone and the environment is:

$${Q}_{\text{H,zone}}=\left({T}_{\text{H}}-{T}_{\text{W}}\right)z{S}_{\text{W}}{\alpha}_{\text{E}}.$$

The total heat transfer between the wall and the environment is:

$${Q}_{\text{H}}={Q}_{\text{H,L}}+{Q}_{\text{H,V}}+{Q}_{\text{H,M}}.$$

**Governing Differential Equations**

The heat transfer rate depends on the thermal mass of the wall,
*C _{W}*:

$${C}_{\text{W}}={c}_{\text{p,W}}{\rho}_{\text{W}}{S}_{\text{W}}\left({t}_{\text{W}}+\frac{{t}_{\text{W}}^{2}}{{D}_{\text{H}}}\right),$$

where:

*c*_{p,W}is the**Wall specific heat**.*ρ*is the_{W}**Wall density**.

The governing equations for heat transfer between the fluid and the external environment are, for the liquid zone:

$${Q}_{\text{H,L}}-{Q}_{\text{F,L}}={C}_{\text{W}}\left[{z}_{\text{L}}\frac{d{T}_{\text{W,L}}}{dt}+\text{max}\left(\frac{d{z}_{\text{L}}}{dt},0\right)\left({T}_{\text{W,L}}-{T}_{\text{W,M}}\right)\right],$$

for the mixture zone:

$${Q}_{\text{H,M}}-{Q}_{\text{F,M}}={C}_{\text{W}}\left[{z}_{\text{M}}\frac{d{T}_{\text{W,M}}}{dt}+\text{min}\left(\frac{d{z}_{\text{L}}}{dt},0\right)\left({T}_{\text{W,L}}-{T}_{\text{W,M}}\right)+\text{min}\left(\frac{d{z}_{\text{V}}}{dt},0\right)\left({T}_{\text{W,V}}-{T}_{\text{W,M}}\right)\right],$$

and for the vapor zone:

$${Q}_{\text{H,V}}-{Q}_{\text{F,V}}={C}_{\text{W}}\left[{z}_{\text{V}}\frac{d{T}_{\text{W,V}}}{dt}+\text{max}\left(\frac{d{z}_{\text{V}}}{dt},0\right)\left({T}_{\text{W,V}}-{T}_{\text{W,M}}\right)\right].$$

### Momentum Balance

The pressure differential over the pipe consists of two factors: changes in pressure due to changes in density, and changes in pressure due to friction at the pipe walls.

For turbulent flows, when the Reynolds number is above the **Turbulent
flow lower Reynolds number limit**, pressure loss is calculated in
terms of the Darcy friction factor. The pressure differential between port
**A** and the internal node I is:

$${p}_{\text{A}}-{p}_{\text{I}}=\left(\frac{1}{{\rho}_{\text{I}}}-\frac{1}{{\rho}_{\text{A}}^{*}}\right){\left(\frac{{\dot{m}}_{\text{A}}}{S}\right)}^{2}+\frac{{f}_{\text{A}}{\dot{m}}_{\text{A}}\left|{\dot{m}}_{\text{A}}\right|}{2{\rho}_{I}{D}_{\text{H}}{S}_{}^{2}}\left(\frac{L+{L}_{\text{Add}}}{2}\right),$$

where:

*ρ*is the fluid density at internal node I._{I}*ρ*is the fluid density at port_{A}***A**. This is the same as*ρ*when the flow is steady-state; when the flow is transient, it is calculated from the fluid internal state with the adiabatic expression:_{A}$${u}_{\text{A}}^{*}+\frac{{p}_{\text{A}}}{{\rho}_{\text{A}}^{*}}+\frac{1}{2}{\left(\frac{{\dot{m}}_{\text{A}}}{{\rho}_{\text{A}}^{*}S}\right)}^{2}=h+\frac{1}{2}{\left(\frac{{\dot{m}}_{\text{A}}}{\rho S}\right)}^{2},$$

where:

*h*is the average specific enthalpy, $$h={h}_{\text{L}}{z}_{\text{L}}+{h}_{\text{V}}{z}_{\text{V}}+{h}_{\text{M}}{z}_{\text{M}}.$$*ρ*is the average density, $$\rho ={\rho}_{\text{L}}{z}_{\text{L}}+{\rho}_{\text{M}}{z}_{\text{M}}+{\rho}_{\text{V}}{z}_{\text{V}}.$$

This is due to the fact that heat transfer calculation takes place at the internal node I.

$$\dot{m}$$

_{A}is the mass flow rate through port**A**.*L*is the**Pipe length**.*L*_{Add}is the**Aggregate equivalent length of local resistances**, which is the equivalent length of a tube that introduces the same amount of loss as the sum of the losses due to other local resistances.

Note that the Darcy friction factor is dependent on the Reynolds number, and is calculated at both ports.

The pressure differential between port **B** and internal node I is:

$${p}_{\text{B}}-{p}_{\text{I}}=\left(\frac{1}{{\rho}_{\text{I}}}-\frac{1}{{\rho}_{\text{B}}^{*}}\right){\left(\frac{{\dot{m}}_{\text{B}}}{S}\right)}^{2}+\frac{{f}_{\text{B}}{\dot{m}}_{\text{B}}\left|{\dot{m}}_{\text{B}}\right|}{2{\rho}_{I}{D}_{\text{H}}{S}_{}^{2}}\left(\frac{L+{L}_{\text{Add}}}{2}\right).$$

where:

*ρ*is the fluid density at port_{B}***B**. This is the same as*ρ*when the flow is steady-state; when the flow is transient, it is calculated from the fluid internal state with the adiabatic expression:_{B}$${u}_{\text{B}}^{*}+\frac{{p}_{\text{B}}}{{\rho}_{\text{B}}^{*}}+\frac{1}{2}{\left(\frac{{\dot{m}}_{\text{B}}}{{\rho}_{\text{B}}^{*}S}\right)}^{2}=h+\frac{1}{2}{\left(\frac{{\dot{m}}_{\text{B}}}{\rho S}\right)}^{2}.$$

$$\dot{m}$$

_{B}is the mass flow rate through port**B**.

For laminar flows, when the Reynolds number is below the **Laminar flow
upper Reynolds number limit**, the pressure loss due to friction is
calculated in terms of the **Laminar friction constant for Darcy friction
factor**, *λ*. The pressure differential between port
**A** and internal node I is:

$${p}_{\text{A}}-{p}_{\text{I}}=\left(\frac{1}{{\rho}_{\text{I}}}-\frac{1}{{\rho}_{\text{A}}^{*}}\right){\left(\frac{{\dot{m}}_{\text{A}}}{S}\right)}^{2}+\frac{\lambda \mu {\dot{m}}_{\text{A}}}{2{\rho}_{I}{D}_{\text{H}}^{2}S}\left(\frac{L+{L}_{\text{Add}}}{2}\right),$$

where μ is the average fluid dynamic viscosity:

$$\mu ={\mu}_{\text{L}}{z}_{\text{L}}+{\mu}_{M}{z}_{\text{M}}+{\mu}_{\text{V}}{z}_{\text{V}}.$$

The pressure differential between port **B** and internal node I is:

$${p}_{\text{B}}-{p}_{\text{I}}=\left(\frac{1}{{\rho}_{\text{I}}}-\frac{1}{{\rho}_{\text{B}}^{*}}\right){\left(\frac{{\dot{m}}_{\text{B}}}{S}\right)}^{2}+\frac{\lambda \mu {\dot{m}}_{\text{B}}}{2{\rho}_{I}{D}_{\text{H}}^{2}S}\left(\frac{L+{L}_{\text{Add}}}{2}\right).$$

For transitional flows, the pressure differential due to viscous friction is a smoothed blend between the values for laminar and turbulent pressure losses.

### Mass Balance

The total mass accumulation rate is defined as:

$$\frac{dM}{dt}={\dot{m}}_{\text{A}}+{\dot{m}}_{\text{B}},$$

where *M* is the total fluid mass in the pipe.
In terms of fluid zones, the mass accumulation rate is a function of the change in
density, *ρ*, with respect to pressure, *p*, and
the fluid specific internal energy, *u*:

$$\frac{dM}{dt}=\left[{\left(\frac{d\rho}{dp}\right)}_{u}\frac{dp}{dt}+{\left(\frac{d\rho}{du}\right)}_{p}\frac{d{u}_{out}}{dt}+{\rho}_{\text{L}}\frac{d{z}_{\text{L}}}{dt}+{\rho}_{\text{M}}\frac{d{z}_{\text{M}}}{dt}+{\rho}_{\text{V}}\frac{d{z}_{\text{V}}}{dt}\right]V,$$

where:

*u*is the specific internal energy after all heat transfer has occurred._{out}*V*is the total fluid volume, or the volume of the pipe.

### Energy Balance

The energy conversation equation is:

$$M\frac{d{u}_{out}}{dt}+\left({\dot{m}}_{A}+{\dot{m}}_{B}\right){u}_{out}={\varphi}_{\text{A}}+{\varphi}_{\text{B}}+{Q}_{\text{F}},$$

where:

*ϕ*_{A}is the energy flow rate at port**A**.*ϕ*_{B}is the energy flow rate at port**B**.*Q*_{F}is the heat transfer rate between the fluid and the wall.

### Assumptions and Limitations

The pipe wall is perfectly rigid.

The flow is fully developed. Friction losses and heat transfer do not include entrance effects.

Fluid inertia is negligible.

The effect of gravity is negligible.

When the pressure is above the fluid critical pressure, large values of thermal fluid properties (such as Prandtl number, thermal conductivity, and specific heat) may not accurately reflect the heat exchange in the pipe.

## Ports

### Output

### Conserving

## Parameters

## Model Examples

## References

[1] White, F.M., *Fluid
Mechanics*, 7^{th} Ed, Section 6.8. McGraw-Hill,
2011.

[2] Çengel, Y.A., *Heat
and Mass Transfer—A Practical Approach*, 3^{rd}
Ed, Section 8.5. McGraw-Hill, 2007.

## Extended Capabilities

## See Also

**Introduced in R2018b**