Main Content

Tank with liquid and vapor volumes of variable proportion

**Library:**Simscape / Fluids / Two-Phase Fluid / Tanks & Accumulators

The Receiver-Accumulator (2P) block models a tank with
fluid than can undergo phase change. The liquid and vapor phases, referred to as
*zones*, are modeled as distinct volumes that can change in size
during simulation, but do not mix. The relative amount of space a zone occupies in the
system is called a *zone fraction*, which ranges from
`0`

to `1`

. The vapor-liquid mixture phase is not
modeled.

In an HVAC system, when this tank is placed between a condenser and an expansion
valve, it acts as a receiver. Liquid connections to the block are made at ports
**AL** and **BL**. When the tank is placed between
an evaporator and a compressor, it acts as an accumulator. Vapor connections to the
block are made at ports **AV** and **BV**. A fluid of
either phase can be connected to either port, however the fluid exiting from a V port is
in the vapor zone and an L port is in the liquid zone. There is no mass flow through
unconnected ports.

The temperature of the tank walls are set at port **H**.

The liquid level of the tank is reported as a zone fraction at port
**L**. If the liquid level reports `0`

, the tank
is fully filled with vapor. The tank is never empty.

The total convective heat transfer between the fluid and the environment,
*Q _{H}*, is the sum of the heat
transfer in the liquid and vapor phases:

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

The heat transfer between the liquid and the environment is:

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

where:

*z*_{L}is the liquid volume fraction of the tank.*S*_{W}is the**Total heat transfer surface area**.*α*_{L}is the**Liquid heat transfer coefficient**.*T*is the temperature of the tank wall._{H}*T*is the temperature of the liquid._{L}

The heat transfer between the vapor and the environment is:

$${Q}_{V}=\left(1-{z}_{L}\right){S}_{\text{W}}{\alpha}_{\text{V}}\left({T}_{\text{H}}-{T}_{\text{V}}\right),$$

where:

*α*_{V}is the**Vapor heat transfer coefficient**.*T*is the temperature of the vapor._{V}

The liquid volume fraction is determined from the liquid mass fraction:

$${z}_{\text{L}}=\frac{{f}_{\text{M,L}}{\nu}_{\text{L}}}{{f}_{\text{M,L}}{\nu}_{\text{L}}+\left(1-{f}_{\text{M,L}}\right){\nu}_{\text{V}}},$$

where:

*f*is the mass fraction of the liquid._{M,L}*ν*is the specific volume of the liquid._{L}*ν*is the specific volume of the vapor._{V}

When the liquid specific enthalpy is greater than or equal to the liquid saturation specific enthalpy, the energy flow associated with evaporation is:

$${\varphi}_{\text{Vap}}=\frac{{M}_{\text{L}}\left({h}_{\text{L}}-{h}_{\text{L,Sat}}\right)}{\tau},$$

where:

*M*is the total liquid mass._{L}*τ*is the**Vaporization and condensation time constant**.*h*is the specific enthalpy of the liquid at the internal node._{L}*h*is the saturation specific enthalpy of the liquid at the internal node._{L,Sat}

The mass flow rate of the evaporating fluid is:

$${\dot{m}}_{\text{Vap}}=\frac{{\varphi}_{\text{Vap}}}{{h}_{\text{V,Sat}}}.$$

When the specific enthalpy is lower than the saturation specific enthalpy, no
evaporation occurs, and *Φ _{Vap} = 0*.

Similarly, when the vapor specific enthalpy is less than or equal to the saturated vapor specific enthalpy, the energy flow associated with condensation is:

$${\varphi}_{\text{Con}}=\frac{{M}_{\text{V}}\left({h}_{\text{V}}-{h}_{\text{V,Sat}}\right)}{\tau},$$

where:

*M*is the total vapor mass._{V}*h*is the specific enthalpy of the vapor._{V}*h*is the saturated vapor specific enthalpy._{V,Sat}

The mass flow rate of the condensing fluid is:

$${\dot{m}}_{\text{Con}}=\frac{{\varphi}_{\text{Con}}}{{h}_{\text{L,Sat}}}.$$

When the specific enthalpy is higher than the saturated vapor specific enthalpy,
no condensation occurs, and *Φ _{Cond} = 0*.

The total tank volume is constant. Due to phase change, the volume fraction and mass of the fluid phases change. The mass balance in the liquid zone is:

$$\frac{\text{d}{M}_{\text{L}}}{\text{d}t}={\dot{m}}_{\text{L,In}}-{\dot{m}}_{\text{L,Out}}+{\dot{m}}_{\text{Con}}-{\dot{m}}_{\text{Vap}},$$

where:

$$\dot{m}$$

_{L,In}is the inlet liquid mass flow rate.$$\dot{m}$$

_{L,Out}is the outlet liquid mass flow rate:$${\dot{m}}_{\text{L,Out}}=-\left({\dot{m}}_{\text{AL}}+{\dot{m}}_{\text{BL}}\right),$$

$$\dot{m}$$

_{Con}is the mass flow rate of the condensing fluid.$$\dot{m}$$

_{Vap}is the mass flow rate of the evaporating fluid.

The mass balance in the vapor zone is:

$$\frac{\text{d}{M}_{\text{V}}}{\text{d}t}={\dot{m}}_{\text{V,In}}-{\dot{m}}_{\text{V,Out}}-{\dot{m}}_{\text{Con}}+{\dot{m}}_{\text{Vap}},$$

where:

*M*is the total vapor mass._{V}$$\dot{m}$$

_{V,In}is the inlet vapor mass flow rate.$$\dot{m}$$

_{V,Out}is the outlet vapor mass flow rate:$${\dot{m}}_{\text{V,Out}}=-\left({\dot{m}}_{\text{AV}}+{\dot{m}}_{\text{BV}}\right).$$

If there is only one zone present in the tank, the outlet mass flow rate of the fluid is the sum of the flow rate through all of the ports:

$${\dot{m}}_{\text{phase,Out}}=-\left({\dot{m}}_{\text{AL}}+{\dot{m}}_{\text{BL}}+{\dot{m}}_{\text{AV}}+{\dot{m}}_{\text{BV}}\right).$$

The fluid can heat or cool depending on the heat transfer between the tank and
environment, which is set by the temperature at port **H**.

The energy balance in the liquid zone is:

$${M}_{\text{L}}\frac{\text{d}{u}_{\text{L}}}{\text{d}t}+\frac{\text{d}{M}_{\text{L}}}{\text{d}t}{u}_{\text{L}}={\varphi}_{\text{L,In}}-{\varphi}_{\text{L,Out}}+{\varphi}_{\text{Con}}-{\varphi}_{\text{Vap}}+{Q}_{\text{L}}.$$

where:

*u*is the specific internal energy of the liquid._{L}*ϕ*is the inlet energy flow rate._{L,In}*ϕ*is the outlet energy flow rate:_{L,Out}$${\varphi}_{\text{L,Out}}=-\left({\varphi}_{\text{AL}}+{\varphi}_{\text{BL}}\right).$$

*ϕ*is the energy flow rate of the condensing liquid._{Con}*ϕ*is the energy flow rate of the evaporating liquid._{Vap}*Q*is the heat transfer between the environment and the liquid._{L}

The energy balance in the vapor zone is:

$${M}_{\text{V}}\frac{\text{d}{u}_{\text{V}}}{\text{d}t}+\frac{\text{d}{M}_{\text{V}}}{\text{d}t}{u}_{\text{V}}={\varphi}_{\text{V,In}}-{\varphi}_{\text{V,Out}}-{\varphi}_{\text{Con}}+{\varphi}_{\text{Vap}}+{Q}_{\text{V}}.$$

*u*is the specific internal energy of the vapor._{V}*ϕ*is the inlet vapor energy flow rate._{V,In}*ϕ*is the outlet vapor energy flow rate:_{V,Out}$${\varphi}_{\text{V,Out}}=-\left({\varphi}_{\text{AV}}+{\varphi}_{\text{BV}}\right).$$

*Q*is the heat transfer between the tank wall and the vapor._{V}

If there is only one zone present in the tank, the outlet energy flow rate is the sum of the flow rate through all of the ports:

$${\varphi}_{\text{phase,Out}}=-\left({\varphi}_{\text{AL}}+{\varphi}_{\text{BL}}+{\varphi}_{\text{AV}}+{\varphi}_{\text{BV}}\right).$$

There are no pressure changes modeled in the tank, including hydrostatic pressure. The pressure at any port is equal to the internal tank pressure.

Pressure must remain below the critical pressure.

Hydrostatic pressure is not modeled.

The container wall is rigid, therefore the total volume of fluid is constant.

The thermal mass of the tank wall is not modeled.

Flow resistance through the outlets is not modeled. To model pressure losses associated with the outlets, connect a Local Restriction (2P) block or a Flow Resistance (2P) block to the ports of the Receiver-Accumulator (2P) block.

The liquid-vapor mixture phase is not modeled.

2-Port Constant Volume Chamber (2P) | 3-Port Constant Volume Chamber (2P) | 3-Zone Pipe (2P) | Constant Volume Chamber (2P)