Engee documentation

Tank (G-TL)

A pressurized tank with a variable volume of gas and heat-conducting liquid.

blockType: EngeeFluids.ThermalLiquid.Volumes.GasPressurizedTank

Path in the library:

/Physical Modeling/Fluids/Thermal Liquid/Tanks & Accumulators/Tank (G-TL)

Description

Block Tank (G-TL) simulates the accumulation of mass and energy in a chamber with separated volumes of gas and heat-conducting liquid. The total volume of liquid and gas is fixed, but the individual volumes of gas and heat-conducting liquid may vary. Two gas ports provide gas flow, and a variable number of ports for heat-conducting liquid, from one to six, provides heat-conducting liquid flow. The ports for the heat-conducting liquid can be located at different heights.

tank g tl en

The tank is under pressure, but the pressure is not fixed. It changes during the simulation depending on the gas pressure. The pressure increases when the gas pressure increases, and decreases when the gas pressure decreases. It is assumed that the volume of the heat-conducting liquid is in equilibrium with the volume of the gas, and its pressure is the same as that of the gas.

Volumes of gas and heat-conducting liquid can exchange energy with other components of the liquid and gas and with the environment, but not with each other. The volumes of gas and heat-conducting liquid behave as if they were isolated from each other by an insulating membrane. The exchange of energy with other components takes place through ports for gas or heat-conducting liquid, and the exchange with the environment takes place, strictly in the form of heat, through thermal ports.

Use this block to model components such as drainage tanks in which water condensed from a compressed gas system is trapped at the bottom by gravity and discharged through a drainage hole. However, please note that the block does not take into account the effect of phase change, which means that this block cannot take into account the effects of condensation.

Heat-conducting fluid ports

You can specify the number of heat-conducting fluid ports using the parameter Number of inlets:

Parameter value Number of inlets Heat-conducting fluid ports

1

port A2

2

ports A2 and B2

3

ports A2, B2 and C2

4

ports A2, B2, C2 and D2

5

ports A2, B2, C2, D2 and E2

6

ports A2, B2, C2, D2, E2 and F2

Volumes of heat-conducting liquid and gas

The total volume of a tank is the sum of the volumes of gas and heat—conducting liquid that it contains.:

where — volume, and by indexes , and The total volume of the tank, the volume of heat-conducting liquid and the volume of gas are indicated.

Since the total volume is fixed, the rate of change of the gas volume over time should be the inverse of the rate of change of the volume of the heat-conducting liquid.:

In the block, the rate of change in the volume of a heat-conducting liquid is calculated by differentiating the expression:

where

  • — mass;

  • — density.

Differentiation gives a mass flow rate in the volume of a thermally conductive liquid:

The rate of change in the density of a thermally conductive liquid over time is:

where

  • — thermal modulus of elasticity;

  • — coefficient of isobaric thermal expansion;

  • — liquid pressure;

  • — the temperature of the liquid.

The permutation of the terms gives the rate of change of the volume of the heat-conducting liquid and, accordingly, the volume of the gas:

Conservation of mass

The rate of mass accumulation in the volume of a heat-conducting liquid or gas is equal to the net mass flow rate in this volume.

In the volume of a heat-conducting liquid:

where

  • — the rate of mass accumulation in the volume of a thermally conductive liquid;

  • — individual mass flow rates to this volume through the ports for heat-conducting liquid A2, B2, C2, D2, E2 or F2.

The rate of mass accumulation contains contributions from pressure, temperature, and volume changes,

where the pressure in the volume of a heat-conducting liquid is, by definition, equal to the pressure in the volume of a gas, so the equation is written in terms of pressure.

In the volume of gas:

where

  • — the rate of mass accumulation in the gas volume;

  • — individual mass expenditures in this volume through the A1 and B1 gas ports.

As in the case of the volume of a thermally conductive liquid, the rate of mass accumulation contains contributions from pressure, temperature, and volume changes.:

where — temperature, and the pressure and temperature derivatives depend on the type of gas specified in the block Gas Properties (G). The equations for determining the derivatives are given in Translational Mechanical Converter (G).

Replace using the expression obtained earlier for this variable, and combine these two expressions for :

The permutation of the terms gives the final expression for the conservation of mass in the volume of the gas:

where replaced by the summation of mass flow rates in the volume of a heat-conducting liquid.

Energy conservation

The rate of energy accumulation in the volume of a heat-conducting liquid and gas is the sum of the energy flows through the liquid inputs, heat flows through the corresponding heat port, and energy flows due to volume changes. For the volume of gas:

where

  • — full energy;

  • — enthalpy of gas;

  • — the flow of thermal energy entering the tank through the port H1;

  • — energy flows through the input ports.

The pressure and temperature derivatives depend on the type of gas specified in the block Gas Properties (G). The equations for determining the derivatives are given in Translational Mechanical Converter (G).

For the volume of a heat-conducting liquid:

where

  • — enthalpy of a thermally conductive liquid;

  • — the flow of thermal energy entering the tank through the port H2;

  • pressure derivative:

  • the temperature derivative:

    where — isobaric specific heat capacity of a heat-conducting liquid inside the tank.

Conservation of momentum

In the block, the hydrodynamic resistance for both gas and isothermal liquid is not taken into account, regardless of its nature, frictional resistance, or any other nature. Also, the block does not take into account the hydrostatic pressure of the gas. The pressures at the gas inlet are equal to each other and the internal pressure of the gas:

The pressure of the heat-conducting liquid on the port depends on the depth of its location relative to the level of the heat-conducting liquid. The internal pressure of the volume of the heat-conducting liquid is equal to the pressure of the volume of the gas, = . In the block, the dynamic pressure on the ports of the heat-conducting liquid is, , is taken into account in the equation:

where

  • — the height of the heat conduction level relative to the bottom of the tank;

  • — the height of the inlet port of the heat-conducting liquid relative to the bottom of the tank;

  • — acceleration of free fall.

From a member The height of the column of heat-conducting liquid above the port is determined. The dynamic pressure at each port of the heat-conducting fluid depends on the flow direction at that port:

where — the flow rate.

Assumptions and limitations

The momentum of the liquid is lost at the entrance to the tank due to a sudden expansion in the tank volume.

Variables

Use the parameter group Initial Targets to set the priority and initial target values for the block parameter variables before modeling. For more information, see Configuring physical blocks using target values.

Ports

Conserving

# H1 — heat port
heat

Details

Heat transfer at the tank wall for a volume of gas.

Program usage name

gas_thermal_port

# H2 — heat port
heat

Details

Heat transfer at the tank wall for a volume of thermal liquid.

Program usage name

liquid_thermal_port

# A1 — gas port
gas

Details

A non-directional gas port associated with an opening through which gas enters or leaves the tank.

Program usage name

gas_port_a1

# B1 — gas port
gas

Details

A non-directional gas port associated with an opening through which gas enters or leaves the tank.

Program usage name

gas_port_b1

# A2 — thermal liquid port
thermal liquid

Details

A non-directional thermal liquid port associated with an orifice through which thermal liquid enters or exits a tank.

Program usage name

thermal_liquid_port_a

# B2 — thermal liquid port
thermal liquid

Details

A non-directional thermal liquid port associated with an additional port through which thermal liquid enters or exits the tank.

Dependencies

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

Program usage name

thermal_liquid_port_b

# C2 — thermal liquid port
thermal liquid

Details

A non-directional thermal liquid port associated with an additional port through which thermal liquid enters or exits the tank.

Dependencies

To use this port, set the Number of inlets parameters to . 3, 4, 5 or 6.

Program usage name

thermal_liquid_port_c

# D2 — thermal liquid port
thermal liquid

Details

A non-directional thermal liquid port associated with an additional port through which thermal liquid enters or exits the tank.

Dependencies

To use this port, set the Number of inlets parameters to . 4, 5 or 6.

Program usage name

thermal_liquid_port_d

# E2 — thermal liquid port
thermal liquid

Details

A non-directional thermal liquid port associated with an additional port through which thermal liquid enters or exits the tank.

Dependencies

To use this port, set the parameters Number of inlets to 5 or 6.

Program usage name

thermal_liquid_port_e

# F2 — thermal liquid port
thermal liquid

Details

A non-directional thermal liquid port associated with an additional port through which thermal liquid enters or exits the tank.

Dependencies

To use this port, set the parameters Number of inlets to 6.

Program usage name

thermal_liquid_port_f

Output

# V — volume of thermal liquid
scalar

Details

Volume of thermal liquid in the tank in m3.

Data types

Float64.

Complex numbers support

No

# L — thermal liquid level
scalar

Details

Level of thermal liquid relative to the bottom of the tank in m.

Data types

Float64.

Complex numbers support

No

Parameters

Parameters

# Number of inlets — Number of inlet ports for thermal liquid
1 | 2 | 3 | 4 | 5 | 6

Details

Number of thermal liquid ports for the unit.

Values

1 | 2 | 3 | 4 | 5 | 6

Default value

1

Program usage name

port_count

Evaluatable

No

# Total tank volume — total volume of gas and thermal liquid
m^3 | um^3 | mm^3 | cm^3 | km^3 | ml | l | gal | igal | in^3 | ft^3 | yd^3 | mi^3

Details

Total volume of gas and thermally conductive liquid in the tank.

Units

m^3 | um^3 | mm^3 | cm^3 | km^3 | ml | l | gal | igal | in^3 | ft^3 | yd^3 | mi^3

Default value

10.0 m^3

Program usage name

V_total

Evaluatable

Yes

# Tank volume parameterization — tank volume parameterization
Constant cross-section area | Tabulated data - volume vs. level

Details

Select the parameterization of the tank volume:

  • Constant cross-section area - constant cross-sectional area of the tank. The cross-sectional area of the tank is set constant.

  • Tabulated data - volume vs. level - tabular data of volume dependence on isothermal liquid level. Vectors of volume and level of isothermal liquid are set.

Values

Constant cross-section area | Tabulated data - volume vs. level

Default value

Constant cross-section area

Program usage name

volume_parameterization

Evaluatable

No

# Tank cross-sectional area — tank cross-sectional area
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

The cross-sectional area of the tank in the horizontal plane. This value is assumed to be constant over the allowable range of liquid levels. This parameter is used to calculate the volume of thermal liquid inside the tank.

Dependencies

To use this parameter, set the parameters Tank volume parameterization to . Constant cross-section area.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

1.0 m^2

Program usage name

tank_cross_section_area

Evaluatable

Yes

# Liquid level vector — vector of thermal liquid level values in the tank
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

Vector of thermal liquid levels for the tabular parameterization of the variable tank area. The values in this vector must correspond to the values of the parameters blockLibraryPPP_blockTypesPP_EngeeFluidsBB_PP_ThermalLiquidBB_PP_PP_VolumesBB_PP_PP_GasPressurisedTankPP_BasePPP_paramsPP_PP_PP_ParametersPP_V_liquid_vectorPP_label. Elements must be positive and listed in ascending order. The first element must be equal to 0.

Dependencies

To use this parameter, set the parameter Tank volume parameterization to the value of Tabulated data - volume vs. level.

Units

m | um | mm | cm | km | in | ft | yd | mi | nmi

Default value

[0.0, 3.0, 5.0] m

Program usage name

level_vector

Evaluatable

Yes

# Liquid volume vector — vector of liquid volume values at given levels of thermal liquid in the tank
m^3 | um^3 | mm^3 | cm^3 | km^3 | ml | l | gal | igal | in^3 | ft^3 | yd^3 | mi^3

Details

Vector of thermal liquid volume values in the tank for the tabular parameterization of the variable tank area. The values in this vector must correspond to the values in the parameters Liquid level vector. The elements must be positive and listed in ascending order. The first element must be equal to 0.

Dependencies

To use this parameter, set the parameter Tank volume parameterization to the value of Tabulated data - volume vs. level.

Units

m^3 | um^3 | mm^3 | cm^3 | km^3 | ml | l | gal | igal | in^3 | ft^3 | yd^3 | mi^3

Default value

[0.0, 4.0, 6.0] m^3

Program usage name

V_liquid_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A1 and B1 — vector of cross-sectional areas of inlet gas ports A1 and B1
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

A two-element vector specifying the flow areas of the gas inlets.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

[0.01, 0.01] m^2

Program usage name

gas_ports_a1b1_areas_vector

Evaluatable

Yes

# Inlet height at port A2 — inlet port height A2 for thermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

Inlet port height A2 for thermal liquid.

Dependencies

To use this parameter, set the Number of inlets parameters to . 1.

Units

m | um | mm | cm | km | in | ft | yd | mi | nmi

Default value

0.1 m

Program usage name

liquid_port_a_height

Evaluatable

Yes

# Cross-sectional area at port A2 — cross-sectional area of the inlet port A2 for thermal liquid
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

Inlet port cross-sectional area A2 for thermal liquid.

Dependencies

To use this parameter, set the Number of inlets parameters to . 1.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

0.01 m^2

Program usage name

liquid_port_a_area

Evaluatable

Yes

# Height vector for inlets A2 and B2 — vector of heights of inlet ports A2 and B2 for thermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

The vector of heights of the A2 and B2 inlet ports. Each element of the vector corresponds to an input port, starting with port A2. The by default height for each input port is 0.1 m. Each element of this vector must be greater than or equal to 0.

Dependencies

To use this parameter, set the parameters Number of inlets to the value of 2.

Units

m | um | mm | cm | km | in | ft | yd | mi | nmi

Default value

[0.1, 0.1] m

Program usage name

liquid_ports_ab_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A2 and B2 — vector of cross-sectional areas of inlet ports A2 and B2 for thermal liquid
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

Vector of cross-sectional areas of inlet ports A2 and B2 for thermal liquid. Each element of the vector corresponds to an inlet port, starting with port A2. The default height for each inlet port is 0.01 m^2. Each element of this vector must be greater than 0.

Dependencies

To use this parameter, set the parameter Number of inlets to the value of 2.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

[0.01, 0.01] m^2

Program usage name

liquid_ports_ab_area_vector

Evaluatable

Yes

# Height vector for inlets A2, B2, and C2 — vector of heights of inlet ports A2, B2 and C2 for thermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

Vector of heights of the input ports A2, B2 and C2. Each element of the vector corresponds to an input port, starting with port A2. The by default height for each input port is 0.1 m. Each element of this vector must be greater than or equal to 0.

Dependencies

To use this parameter, set the parameters Number of inlets to the value of 3.

Units

m | um | mm | cm | km | in | ft | yd | mi | nmi

Default value

[0.1, 0.1, 0.1] m

Program usage name

liquid_ports_abc_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A2, B2, and C2 — vector of cross-sectional areas of inlet ports A2, B2 and C2 for thermal liquid
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

Vector of cross-sectional areas of inlet ports A2, B2 and C2 for thermal liquid. Each element of the vector corresponds to an inlet port, starting with port A2. The default height for each input port is 0.01 m^2. Each element of this vector must be greater than 0.

Dependencies

To use this parameter, set the parameter Number of inlets to the value of 3.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

[0.01, 0.01, 0.01] m^2

Program usage name

liquid_ports_abc_area_vector

Evaluatable

Yes

# Height vector for inlets A2, B2, C2, and D2 — vector of heights of inlet ports A2, B2, C2 and D2 for thermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

Vector of heights of the input ports A2, B2, C2 and D2. Each element of the vector corresponds to an input port, starting with port A2. By default, the height for each input port is 0.1 m. Each element of this vector must be greater than or equal to 0.

Dependencies

To use this parameter, set the parameters Number of inlets to the value of 4.

Units

m | um | mm | cm | km | in | ft | yd | mi | nmi

Default value

[0.1, 0.1, 0.1, 0.1] m

Program usage name

liquid_ports_abcd_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A2, B2, C2, and D2 — vector of cross-sectional areas of inlet ports A2, B2, C2 and D2 for thermal liquid
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

Vector of cross-sectional areas of input ports A2, B2, C2 and D2 for thermal liquid. Each element of the vector corresponds to an inlet port, starting with port A2. The default height for each input port is 0.01 m^2. Each element of this vector must be greater than 0.

Dependencies

To use this parameter, set the parameter Number of inlets to the value of 4.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

[0.01, 0.01, 0.01, 0.01] m^2

Program usage name

liquid_ports_abcd_area_vector

Evaluatable

Yes

# Height vector for inlets A2, B2, C2, D2, and E2 — vector of heights of inlet ports A2, B2, C2, D2 and E2 for thermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

A vector of heights of the input ports A2, B2, C2, D2 and E2. Each element of the vector corresponds to an input port, starting with port A2. The by default height for each input port is 0.1 m. Each element of this vector must be greater than or equal to 0.

Dependencies

To use this parameter, set the parameters Number of inlets to the value of 5.

Units

m | um | mm | cm | km | in | ft | yd | mi | nmi

Default value

[0.1, 0.1, 0.1, 0.1, 0.1] m

Program usage name

liquid_ports_abcde_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A2, B2, C2, D2, and E2 — vector of cross-sectional areas of inlet ports A2, B2, C2, D2 and E2 for thermal liquid
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

Vector of cross-sectional areas of inlet ports A2, B2, C2, D2 and E2 for thermal liquid. Each element of the vector corresponds to an inlet port, starting with port A2. The default height for each input port is 0.01 m^2. Each element of this vector must be greater than 0.

Dependencies

To use this parameter, set the parameter Number of inlets to the value of 5.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

[0.01, 0.01, 0.01, 0.01, 0.01] m^2

Program usage name

liquid_ports_abcde_area_vector

Evaluatable

Yes

# Height vector for inlets A2, B2, C2, D2, E2, and F2 — vector of heights of inlet ports A2, B2, C2, D2, E2 and F2 for thermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

The vector of heights of the input ports A2, B2, C2, D2, E2 and F2. Each element of the vector corresponds to an input port, starting with port A2. The by default height for each input port is 0.1 m. Each element of this vector must be greater than or equal to 0.

Dependencies

To use this parameter, set the parameters Number of inlets to the value of 6.

Units

m | um | mm | cm | km | in | ft | yd | mi | nmi

Default value

[0.1, 0.1, 0.1, 0.1, 0.1, 0.1] m

Program usage name

liquid_ports_abcdef_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A2, B2, C2, D2, E2, and F2 — vector of cross-sectional areas of inlet ports A2, B2, C2, D2, E2 and F2 for thermal liquid
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

Vector of cross-sectional areas of input ports A2, B2, C2, D2, E2 and F2 for thermal liquid. Each element of the vector corresponds to an input port, starting with the A2 port. The default height for each input port is 0.01 m^2. Each element of this vector must be greater than 0.

Dependencies

To use this parameter, set the parameter Number of inlets to the value of 6.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

[0.01, 0.01, 0.01, 0.01, 0.01, 0.01] m^2

Program usage name

liquid_ports_abcdef_area_vector

Evaluatable

Yes

# Liquid volume above max capacity — notification of excess tank volume
None | Error

Details

Whether to be notified if during simulation the volume of liquid in the tank exceeds the value of the parameter Maximum tank liquid capacity. Set this parameter to . `None`to not receive a notification when the tank volume is exceeded. Set the value `Error`to stop the simulation when this occurs.

Values

None | Error

Default value

None

Program usage name

capacity_assert_action

Evaluatable

No

# Maximum tank liquid capacity — tank filling limit
m^3 | um^3 | mm^3 | cm^3 | km^3 | ml | l | gal | igal | in^3 | ft^3 | yd^3 | mi^3

Details

Tank filling limit.

Dependencies

To use this parameter, set the parameters Liquid volume above max capacity to . Error.

Units

m^3 | um^3 | mm^3 | cm^3 | km^3 | ml | l | gal | igal | in^3 | ft^3 | yd^3 | mi^3

Default value

10.0 m^3

Program usage name

V_liquid_capacity

Evaluatable

Yes

# Gravitational acceleration — free-fall acceleration
m/s^2 | mm/s^2 | cm/s^2 | km/s^2 | in/s^2 | ft/s^2 | mi/s^2 | gn

Details

Free-fall acceleration.

Units

m/s^2 | mm/s^2 | cm/s^2 | km/s^2 | in/s^2 | ft/s^2 | mi/s^2 | gn

Default value

9.81 m/s^2

Program usage name

g

Evaluatable

Yes