Main Content

Tank (TL)

Thermal liquid container with variable fluid volume

  • Library:
  • Simscape / Fluids / Thermal Liquid / Tanks & Accumulators

  • Tank (TL) block

Description

The Tank (TL) block models a thermal liquid container with a variable fluid volume. The absolute pressure of the tank fluid volume is assumed constant and equal to the value specified in the block dialog box. In the special case that the tank pressurization is equal to atmospheric pressure, the block represents a vented tank.

The tank can exchange energy with its surroundings, allowing its internal temperature and pressure to evolve over time. Heat transfer occurs via convection, as liquid enters or exits the chamber, and conduction, as thermal energy flows through the tank walls and the liquid itself at the tank inlets.

Tank Schematic

The tank can have up to six input ports, A through F. The pressure at the tank inlets is the sum of the constant tank pressurization specified in the block dialog box and the hydrostatic pressure due to the inlet height.

The tank model accounts for heat transfer through the tank wall, associated with thermal conserving port H. The temperature defined at this port is the temperature of the tank fluid volume.

Tank Volume

The tank fluid volume is computed from the total fluid mass at each time step:

V=mρ,

where:

  • V is the tank fluid volume.

  • m is the tank fluid mass.

  • ρ is the tank fluid density.

Mass Balance

The mass conservation equation in the tank fluid volume is

m˙=m˙A,

where:

  • m˙ is the net mass flow rate into the tank.

  • m˙A is the mass flow rate into the tank fluid volume through the inlet A.

Momentum Balance

The momentum conservation equation in the tank fluid volume is

pA+pdyn=pRef+ρg(yyA),

where:

  • pA is the fluid pressure at inlet A.

  • pRef is the constant tank pressurization.

  • pdyn is the dynamic pressure:

    pdyn={0,m˙A0m˙A22ρASA2,m˙A<0

  • ρA is the liquid density at port A.

  • SA is the tank inlet area.

  • g is the gravitational constant.

  • y is the tank level, or height, relative to the tank bottom.

  • yA is the tank inlet elevation relative to the tank bottom.

Energy Balance

The energy conservation equation in the tank fluid volume is

m(Cphα)T˙=ϕAm˙Ah+Q,

where:

  • Cp is the fluid thermal capacity.

  • α is the fluid isobaric bulk modulus.

  • T is the fluid temperature.

  • ΦA is the energy flow rate into the tank through port A.

  • h is the fluid enthalpy.

  • Q is the thermal energy flow rate into the tank through port H.

Assumptions and Limitations

  • The tank pressure is constant and uniform throughout the tank volume. The tank elevation head affects only the inlet pressure calculations.

  • Fluid momentum is lost at the tank inlet due to the sudden expansion into the tank volume.

Note

The tank fluid level should remain above the port height at all times. If you have not set Liquid level below inlet height to Warn or Error and the liquid level falls below this height, your simulation may return inaccurate results when fluid flows out of the tank. Connected components in the thermal liquid library are assumed to be fully filled with liquid throughout the simulation.

Ports

Conserving

expand all

Tank inlet.

Optional tank inlet.

Dependencies

To enable this port, set Number of inlets to 2, 3, 4, 5, or 6.

Optional tank inlet.

Dependencies

To enable this port, set Number of inlets to 3, 4, 5, or 6.

Optional tank inlet.

Dependencies

To enable this port, set Number of inlets to 4, 5, or 6.

Optional tank inlet.

Dependencies

To enable this port, set Number of inlets to 5, or 6.

Optional tank inlet.

Dependencies

To enable this port, set Number of inlets to 6.

Heat transfer at the tank wall.

Output

expand all

Liquid volume inside the tank in m^3, specified as a physical signal.

Liquid level inside the tank in m, specified as a physical signal.

Tank fluid temperature in K, specified as a physical signal.

Parameters

expand all

Number of inlet ports. Setting this parameter to 2 or more exposes additional input ports.

Specifies a constant tank pressure. You can define a non-atmospheric pressure by selecting Specified pressure and defining the value in Tank pressurization.

User-defined tank pressure.

Specifies tank area characteristics. This parameter is used to determine the fluid level in the tank. If you would like to model a tank with a variable cross-sectional area, you can provide data for tank volume and fluid level in the Tabulated data - volume vs. level option.

Tank cross-sectional area.

Dependencies

To enable this parameter, set Tank volume parameterization to Constant cross-section area.

Vector of tank fluid levels for the tabular parameterization of a non-constant tank area. The values in this vector correspond one-to-one to values in the Volumetric flow rate vector parameter. Its elements are listed in ascending order. The elements must be positive and the first element must be 0.

Dependencies

To enable this parameter, set Tank volume parameterization to Tabulated data - volume vs. level.

Vector of tank fluid levels for the tabular parameterization of a non-constant tank area. The values in this vector correspond one-to-one to values in the Volumetric flow rate vector parameter. Its elements are listed in ascending order. The elements must be positive and the first element must be 0.

Dependencies

To enable this parameter, set Tank volume parameterization to Tabulated data - volume vs. level.

Height of inlet port. The value must be greater than or equal to 0.

Dependencies

To enable this parameter, set Number of inlets to 1.

Cross-sectional area of the port inlet. This value must be greater than 0.

Vector of port heights for multiple enabled ports. If you have two or more ports enabled, the Inlet height parameter becomes a vector of values that correspond to the height of each inlet port, starting with port A. The parameter name will include all enabled ports. Each element of this vector must be greater than or equal to 0.

Dependencies

To enable this parameter, set Number of inlets to 2, 3, 4, 5, or 6.

Vector of cross-sectional areas for multiple enabled ports. If you have two or more ports enabled, the Inlet cross-sectional area parameter becomes a vector of values that correspond to the cross-sectional area of each inlet, starting with port A. The parameter name will include all enabled ports. Each element of this vector must be greater than 0.

Dependencies

To enable this parameter, set Number of inlets to 2, 3, 4, 5, or 6.

Whether to be notified if the tank fluid level falls below the port inlet height during simulation. Set this parameter to Warning if you would like to receive a warning when this occurs during simulation. Set the parameter to Error if you would like the simulation to stop when this occurs.

Whether to be notified if the tank fluid volume rises above the tank maximum capacity during simulation. Set this parameter to Warning if you would like to receive a warning when this occurs during simulation. Set the parameter to Error if you would like the simulation to stop when this occurs.

Fill limit of the tank.

Dependencies

To enable this parameter, set Liquid volume above max capacity to either:

  • Warning

  • Error

Constant for the acceleration of gravity.

Model Examples

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2016a