Documentation

Tank (G-TL)

Pressurized tank with variable gas and thermal liquid volumes

  • Library:
  • Fluid Network Interfaces / Tanks & Accumulators

Description

The Tank (G-TL) block models the accumulation of mass and energy in a chamber with separate gas and thermal liquid volumes. The total fluid volume is fixed but the individual gas and thermal liquid volumes are free to vary. Two gas ports allow for gas flow and a variable number of thermal liquid ports, ranging from one to three, allow for thermal liquid flow. The thermal liquid ports can be at different elevations.

Tank Inlets and Inlet Heights (y)

The tank is pressurized but the pressurization is not fixed. It changes during simulation with the pressure in the gas volume. It rises when the pressure of the gas volume rises and it falls when the pressure of the gas volume falls. The thermal liquid volume is assumed to be at equilibrium with the gas volume and its pressure is therefore the same as that of the gas.

The fluid volumes can exchange energy with other fluid components and with the environment but not with each other. The fluid volumes behave as if they were isolated from each other by an insulated membrane. Energy exchanges with other components occur through gas or thermal liquid ports, while exchanges with the environment occur, strictly in the form of heat, through thermal ports.

Use this block to model components such as drain tanks, in which water condensed from a compressed gas system is trapped at the bottom by gravity and expelled through a drain outlet. Note, however, that neither gas nor thermal liquid domains capture the effects of phase change—and therefore that this block cannot capture the effects of condensation.

Inlet Variants

The number of thermal liquid ports depends on the block variant that is active. To view or change the active variant, right-click the block and select Simscape > Block Choices. The One inlet variant exposes thermal liquid port A2, the Two inlets variant adds port B2, and the Three inlets variant adds port C2.

Fluid Volumes

The total volume of the tank is equal to the sum of the gas and thermal liquid volumes that it contains:

VT=VL+VG,

where V is volume and T, L, and G stand for total, liquid, and gas. Because the total volume is fixed, the time rate of change of the gas volume must be the reverse of that measured for the thermal liquid volume:

V˙G=V˙L.

The time rate of change of the thermal liquid volume is calculated by differentiating the expression:

ML=ρLVL,

where M is mass and ρ is density. The differentiation gives the mass flow rate into the thermal liquid volume:

M˙L=VLρ˙L+V˙LρL,

The time rate of change of the thermal liquid density is:

ρ˙L=ρLβLp˙LαLρLT˙L,

where:

  • β is the isothermal bulk modulus.

  • ɑ is the isobaric thermal expansion coefficient.

  • p is the fluid pressure.

  • T is the fluid temperature.

Rearranging terms gives the rate of change of the thermal liquid volume and, by extension, of the gas volume:

V˙G=V˙LVL(p˙LβLαLT˙L)M˙LρL

Mass Balance

The rate of mass accumulation in each fluid volume is equal to the net mass flow rate into that fluid volume. In the thermal liquid volume:

M˙L=i=A2, B2, C2m˙i,

where ML is the rate of mass accumulation in the thermal liquid volume and m˙i are the individual mass flow rates into that volume through the thermal liquid ports (A2, B2, and C2 in the case of the Three inlets variant). The rate of mass accumulation contains contributions from pressure, temperature, and volume change:

M˙L=VL(ρLβLp˙GαLρLT˙L)+V˙LρL,

where the pressure of the thermal liquid volume is by definition equal to the pressure of the gas volume and the equation is therefore written in terms of the gas pressure. In the gas volume:

M˙G=i=A1, B1m˙i,

where MG is the rate of mass accumulation in the gas volume and m˙i are the individual mass flow rates into that volume through the gas ports (A2 and B2). As with the thermal liquid volume, the rate of mass accumulation contains contributions from pressure, temperature, and volume change:

M˙G=dMdp|Gp˙G+dMdT|GT˙G+V˙GρG,

where the pressure and temperature derivatives depend on the type of gas specified in the Gas Properties (G) block. The derivatives are defined in the equations section of the Translational Mechanical Converter (G) block reference page. Replacing VG with the expression previously obtained for this variable and combining the two expressions for MG:

dMdp|Gp˙G+dMdT|GT˙G+[VL(p˙GβLαLT˙L)M˙LρL]ρG=i=A1, B1m˙i.

Rearranging terms gives the final expression for the mass balance in the gas volume:

p˙G(dMdp|G+ρGVLβL)+(T˙GdMdT|GT˙LρGVLαL)=i=A1, B1m˙i+ρGρLi=A2, B2, C2m˙i,

where M˙L has been replaced with the summation of the mass flow rates into the thermal liquid volume.

Energy Balance

The rate of energy accumulation in each fluid volume is the sum of the energy flow rates through the fluid inlets, the heat flow rate through the corresponding thermal port, and the energy flow rate due to volume changes. For the gas volume:

p˙G(dUdp|G+ρGhGVLβL)+(T˙GdUdT|GT˙LρGhGVLαL)=QH1+i=A1, B1ϕi+ρGρLhGi=A2, B2, C2m˙i,

where:

  • U is the total energy of the fluid volume.

  • h is the fluid enthalpy.

  • Q is the heat flow rate through the thermal port.

  • ϕi are the energy flow rates through the fluid inlets.

As before, the pressure and temperature derivatives depend on the type of gas specified in the Gas Properties (G) block. See the equations section of the Translational Mechanical Converter (G) block reference page for their definitions. For the thermal liquid volume:

p˙LdUdp|L+T˙LdUdT|L=QH2+i=A2, B2, C2ϕi+i=A2, B2, C2m˙g(y(i)y)hLi=A2, B2, C2m˙i,

where the pressure derivative is:

dUdp|L=TLαLVL,

and the temperature derivative is:

dUdT|L=cp,LρLVL,

in which cp is the isobaric specific heat of the thermal liquid inside the tank.

Momentum Balance

Flow resistance due to friction or other causes is ignored in both fluid volumes. The effect of elevation on inlet pressure is also ignored, but only on the gas side. The gas inlet pressures are therefore equal to each other and to the internal pressure of the gas volume:

pA1=pB1=pG.

The thermal liquid inlet pressures are each a function of inlet depth. The internal pressure of the thermal liquid volume is equal to that of the gas volume (pL = pG). Including the dynamic pressures (pi,dyn) at the inlets:

pi+pi,dyn=pG+ρL(yyi)g,

where y is the elevation of the thermal liquid surface, yi is the elevation of the thermal liquid inlet, and g is the gravitational constant. The term (y - yi) gives the depth of the thermal liquid inlet with respect to the gas-thermal liquid boundary. The dynamic pressure at each thermal liquid inlet depends on the direction of flow at that inlet:

pi,dyn={12ρivi2,if m˙i<00,if m˙i0

Ports

Output

expand all

Physical signal output port reporting the volume of thermal liquid in the tank.

Physical signal output port reporting the height of the thermal liquid volume relative to the bottom of the tank.

Conserving

expand all

Opening through which gas can flow into or out of the tank.

Opening through which gas can flow into or out of the tank.

Opening through which thermal liquid can flow into or out of the tank.

Opening through which thermal liquid can flow into or out of the tank.

Dependencies

This port is active when the block variant is set to Two inlets or Three inlets. You can change block variants from the block context-sensitive menu. Right-click the block to open the menu and select Simscape > Block choices.

Opening through which thermal liquid can flow into or out of the tank.

Dependencies

This port is active when the block variant is set to Three inlets. You can change block variants from the block context-sensitive menu. Right-click the block to open the menu and select Simscape > Block choices.

Parameters

expand all

Parameters Tab

Aggregate volume of the gas and thermal liquid portions of the tank.

Choice of parameterization for the thermal liquid volume. Select Tabulated data — volume vs. level to compute the thermal liquid volume by interpolation or extrapolation of tabulated data.

Area of the tank cross-section, assumed constant over the allowed range of fluid levels. The block uses this parameter to compute the volume of thermal liquid inside the tank.

Vector of thermal liquid levels at which to specify the thermal liquid volume in the tank. The block uses this vector to construct a one-way lookup table for the thermal liquid volume as a function of the thermal liquid level.

Dependencies

This parameter is active when the Tank volume parameterization parameter is set to Tabulated data - volume vs. level.

Vector of thermal liquid volumes corresponding to the values specified in the Liquid level vector parameter. The block uses this vector to construct a one-way lookup table for the thermal liquid volume as a function of the thermal liquid level.

Dependencies

This parameter is active when the Tank volume parameterization parameter is set to Tabulated data - volume vs. level.

Height of the thermal liquid inlet.

Dependencies

This parameter is active when the block variant is set to One inlet.

Vector of heights of the thermal liquid ports relative to the bottom of the tank.

Dependencies

This parameter is active when the block variant is set to Two inlets.

Vector of heights of the thermal liquid ports relative to the bottom of the tank.

Dependencies

This parameter is active when the block variant is set to Three inlets.

Vector with flow areas of the gas inlets.

Flow area of the thermal liquid inlet.

Dependencies

This parameter is active when the block variant is set to One inlet.

Flow areas of the thermal liquid inlets.

Dependencies

This parameter is active when the block variant is set to Two inlets.

Flow areas of the thermal liquid inlets.

Dependencies

This parameter is active when the block variant is set to Three inlets.

Value of the gravitational acceleration at the elevation of the tank. This constant is assumed constant over the height of the tank.

Variables Tab

Pressure of the gas volume at time zero. Simscape™ software uses this parameter to guide the initial configuration of the component and model. Initial variables that conflict with each other or are incompatible with the model may be ignored. Set the Priority column to High to prioritize this variable over other, low-priority, variables.

Temperature of the gas volume at time zero. Simscape software uses this parameter to guide the initial configuration of the component and model. Initial variables that conflict with each other or are incompatible with the model may be ignored. Set the Priority column to High to prioritize this variable over other, low-priority, variables.

Density of the gas volume at time zero. Simscape software uses this parameter to guide the initial configuration of the component and model. Initial variables that conflict with each other or are incompatible with the model may be ignored. Set the Priority column to High to prioritize this variable over other, low-priority, variables.

Temperature of the thermal liquid volume at time zero. Simscape software uses this parameter to guide the initial configuration of the component and model. Initial variables that conflict with each other or are incompatible with the model may be ignored. Set the Priority column to High to prioritize this variable over other, low-priority, variables.

Height of the fluid volume in the tank at time zero. Simscape software uses this parameter to guide the initial configuration of the component and model. Initial variables that conflict with each other or are incompatible with the model may be ignored. Set the Priority column to High to prioritize this variable over other, low-priority, variables.

Volume of thermal liquid in the tank at time zero. Simscape software uses this parameter to guide the initial configuration of the component and model. Initial variables that conflict with each other or are incompatible with the model may be ignored. Set the Priority column to High to prioritize this variable over other, low-priority, variables.

Mass of thermal liquid in the tank at time zero. Simscape software uses this parameter to guide the initial configuration of the component and model. Initial variables that conflict with each other or are incompatible with the model may be ignored. Set the Priority column to High to prioritize this variable over other, low-priority, variables.

See Also

|

Introduced in R2017b

Was this topic helpful?