Engee documentation

Tank (G-IL)

A pressurized tank with a variable volume of gas and isothermal liquid.

blockType: EngeeFluids.IsothermalLiquid.Volumes.GasPressurizedTank

Path in the library:

/Physical Modeling/Fluids/Isothermal Liquid/Tanks & Accumulators/Tank (G-IL)

Description

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

tank g il 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 isothermal liquid is in equilibrium with the volume of the gas, and its pressure is the same as that of the gas ( The volumes of gas and isothermal liquid do not exchange energy with each other, but energy can be exchanged with other components through gas ports.

Isothermal Fluid Ports

You can specify the number of isothermal fluid ports using the parameter Number of inlets:

Parameter value Number of inlets Isothermal 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 isothermal liquid and gas

The total volume of a tank is the sum of the volumes of gas and isothermal liquid it contains.:

where — volume, and by indexes , and The total volume of the tank, the volume of isothermal 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 opposite to the rate of change of the volume of the isothermal liquid.:

In the block, the rate of change in the volume of an isothermal liquid is calculated by differentiating the expression:

where

  • — mass;

  • — density.

Differentiation gives a mass flow rate in the volume of the isothermal fluid:

The rate of change in the volume of the isothermal liquid and, accordingly, the volume of the gas is:

where — pressure in the tank.

Conservation of mass

The rate of mass accumulation of an isothermal liquid or gas is equal to the net mass flow rate in this volume.

In the volume of an isothermal liquid:

where

  • — the rate of accumulation of the mass of the isothermal liquid;

  • — individual mass flow rates to this volume through the isothermal fluid ports A2, B2, C2, D2, E2 or F2.

In the volume of gas:

where

  • — the rate of accumulation of gas mass;

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

The rate of mass accumulation in a gas volume 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).

The mass conservation equation for a volume of gas has the form

Energy conservation

The rate of energy accumulation in the gas volume is:

where

  • — total energy of the gas volume;

  • — enthalpy of gas;

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

  • — energy flows through the gas inlet 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).

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 are equal to each other and the internal pressure of the gas:

The pressure of the isothermal fluid on the port depends on the depth of its location relative to the liquid level. The internal pressure of an isothermal liquid is equal to the pressure of a gas, = . The unit has dynamic pressure at the ports of the isothermal fluid, , is taken into account in the equation:

where

  • — the height of the isothermal liquid level relative to the bottom of the tank;

  • — the height of the inlet port of the isothermal fluid 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 isothermal 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

# 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 — isothermal liquid port
isothermal liquid

Details

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

Program usage name

isothermal_liquid_port_a

# B2 — isothermal liquid port
isothermal liquid

Details

A non-directional isothermal liquid port associated with an additional port through which isothermal 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

isothermal_liquid_port_b

# C2 — isothermal liquid port
isothermal liquid

Details

A non-directional isothermal liquid port associated with an additional port through which isothermal 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

isothermal_liquid_port_c

# D2 — isothermal liquid port
isothermal liquid

Details

A non-directional isothermal liquid port associated with an additional port through which isothermal 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

isothermal_liquid_port_d

# E2 — isothermal liquid port
isothermal liquid

Details

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

Dependencies

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

Program usage name

isothermal_liquid_port_e

# F2 — isothermal liquid port
isothermal liquid

Details

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

Dependencies

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

Program usage name

isothermal_liquid_port_f

Output

# V — isothermal liquid volume
scalar

Details

Volume of isothermal liquid in the tank in m3.

Data types

Float64.

Complex numbers support

No

# L — isothermal liquid level
scalar

Details

Level of isothermal 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 isothermal liquid
1 | 2 | 3 | 4 | 5 | 6

Details

Number of isothermal 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 isothermal 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 isothermal 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 isothermal liquid inside the tank.

Dependencies

To use this parameter, set the Tank volume parameterization parameters 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 isothermal liquid level values in the tank
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

Vector of isothermal liquid levels for the tabular parameterization of the variable tank area. The values in this vector must correspond to the values of the parameters Liquid volume 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 | 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 isothermal 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 isothermal 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

Two-element vector of cross-sectional areas of inlet gas ports A1 and B1.

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 isothermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

Inlet port height A2 for isothermal 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 isothermal 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 isothermal 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 isothermal 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 isothermal 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 isothermal 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 isothermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

Vector of heights of the inlet 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 isothermal 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 isothermal 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 isothermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

The 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 isothermal 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 and D2 for isothermal 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 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 isothermal liquid
m | um | mm | cm | km | in | ft | yd | mi | nmi

Details

The 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 isothermal 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 isothermal 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 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 isothermal 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 isothermal 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, C2, D2, E2 and F2 for isothermal liquid. Each element of the vector corresponds to an inlet port, starting from 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 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 happens.

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