Engee documentation

Tank (IL)

Page in progress.

A tanker in an isothermal liquid network.

tank il

Description

Block Tank (IL) simulates a vessel with six input ports, A to F, in an isothermal liquid network. The block outputs liquid volume to port V and liquid level to port L as scalar signals. The block models the hydrostatic pressure drop between the liquid surface and the height of the inlet port location. The tank may be at a specified constant pressure, pressure set via an external user signal, or atmospheric pressure.

Fluid volume

The volume of liquid in the tank is determined from the total mass flow in the tank:

where

  • - is the total mass of liquid in the tank entering through all ports;

  • - is the density of the liquid.

Due to the constant pressure in the tank, the volume of liquid inside the tank varies with mass flow rate. Note that the reverse is true for pipes, where pressure is a function of a fixed volume of liquid.

It is possible to set a notification if the volume of liquid in the tank exceeds its capacity. Set the parameters. Liquid volume above max capacity to Warning if you want to receive a warning when this happens during the simulation, or to Error if you want the simulation to stop when this happens.

Fluid level

If the parameters Tank volume parameterization is set to Constant cross-sectional area, the liquid level in the tank is determined by the volume of liquid , which is due to the constant cross-sectional area of the tank opening. Otherwise, the liquid level can be set as tabulated data in the Tabulated data - volume vs. level option.

If the liquid level in the tank falls below the tank inlet height, the assumption that the liquid completely fills the volume of the connected blocks may not be correct. Connections to the block Pipe (IL), which are based on this assumption, may give unphysical results in this case.

As with the parameters. Liquid volume above max capacity*you can be notified if the liquid level in the tank falls below the height of the inlet(s) during the simulation by setting the parameters to the appropriate value. *Liquid level below inlet height.

Mass flow rate

If you set the Number of inlets parameters to a number greater than 1, the equations below apply to each port. The dynamic pressure for the inlet port is equal to

where

  • - fluid density;

  • - flow velocity;

  • - mass flow rate of liquid flowing into the tank through the port.

Total pressure

where

  • - is the pressure in the tank:

    • if the parameters Pressurization specification is set to `Atmospheric pressure', then is equal to atmospheric pressure;

    • if the parameters Pressurization specification is set to Constant specified pressure, then is equal to the value of the parameters Tank pressurization;

    • if the parameters Pressurization specification is set to Variable pressure, then is equal to the input signal of the P port.

  • - hydrostatic pressure drop at the specified port Inlet height:

    ,

    where is either the height difference between the liquid level and the tank inlet height or zero, whichever is greater.

Assumptions and limitations

If the parameters Pressurization specification is set to Variable pressure, the block assumes that the pressure change is slow and there is no pressure derivative in the conservation of mass and energy equations.

Ports

Conserving

# A — isothermal liquid port
isothermal liquid

Details

Entering the tank.

Program usage name

port_a

# B — isothermal liquid port
isothermal liquid

Details

Additional tank inlet.

Dependencies

To use this parameter, set parameter Number of inlets one of the values: 2, 3, 4, 5 or 6.

Program usage name

port_b

# C — isothermal liquid port
isothermal liquid

Details

Additional tank inlet.

Dependencies

To use this parameter, set parameter Number of inlets one of the values: 3, 4, 5 or 6.

Program usage name

port_c

# D — isothermal liquid port
isothermal liquid

Details

Additional tank inlet.

Dependencies

To use this parameter, set parameter Number of inlets one of the values: 4, 5 or 6.

Program usage name

port_d

# E — isothermal liquid port
isothermal liquid

Details

Additional tank inlet.

Dependencies

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

Program usage name

port_e

# F — isothermal liquid port
isothermal liquid

Details

Additional tank inlet.

Dependencies

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

Program usage name

port_f

Output

# V — liquid volume
scalar

Details

The volume of liquid in a tank in m3, given as a scalar.

Data types

Float64.

Complex numbers support

No

# L — liquid level
scalar

Details

Liquid level in a tank in m, given as a scalar.

Data types

Float64.

Complex numbers support

No

Input

# P — tank pressure
scalar

Details

Tank pressure in Pa, given as a scalar.

Dependencies

To use this parameter, set the parameters to Variable pressure. Pressurization specification to Variable pressure.

Data types

Float64.

Complex numbers support

No

Parameters

Parameters

# Number of inlets — number of input ports
1 | 2 | 3 | 4 | 5 | 6

Details

The number of input ports. Setting this parameter to 2 or more opens additional input ports.

Values

1 | 2 | 3 | 4 | 5 | 6

Default value

1

Program usage name

port_count

Evaluatable

No

# Pressurization specification — tank pressure setting method
Atmospheric pressure | Constant specified pressure | Variable pressure

Details

Method of setting tank pressure.

To set a constant pressure other than atmospheric pressure, set this parameter to Constant specified pressure and specify the pressure value using the parameters Tank pressurization.

To specify a variable tank pressure, set this parameter to Variable pressure and supply the tank pressure value as a scalar to the P port.

Values

Atmospheric pressure | Constant specified pressure | Variable pressure

Default value

Atmospheric pressure

Program usage name

pressure_type

Evaluatable

No

# Tank pressurization — user-defined tank pressure
Pa | GPa | MPa | atm | bar | kPa | ksi | psi | uPa | kbar

Details

User-definable tank pressure.

Dependencies

To use this parameter, set the parameters to Specified pressure. Pressurization specification to Specified pressure.

Values

Pa | GPa | MPa | atm | bar | kPa | ksi | psi | uPa | kbar

Default value

0.101325 MPa

Program usage name

p_specified

Evaluatable

Yes

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

Details

Specifies the characteristics of the tank area.

This parameters is used to determine the liquid level in the tank. If you want to model a tank with a variable cross-sectional area over the height of the tank, you can provide data for the tank volume as a function of the liquid level using the Tabulated data - volume vs. level option.

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 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2

Details

The cross-sectional area of the tank in the horizontal plane.

Dependencies

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

Values

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

Default value

1.0 m^2

Program usage name

tank_cross_section_area

Evaluatable

Yes

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

Details

Vector of liquid level values in the tank for the tabular parameterization of the variable tank area. The values in this vector correspond to the values in 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 parameters Tabulated data - volume vs. level to Tank volume parameterization to Tabulated data - volume vs. level.

Values

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

Default value

[0.0, 3.0, 5.0] m

Program usage name

level_vector

Evaluatable

Yes

# Liquid volume vector — vector of liquid volume values in the tank
l | gal | igal | m^3 | cm^3 | ft^3 | in^3 | km^3 | mi^3 | mm^3 | um^3 | yd^3 | N*m/Pa | N*m/bar | lbf*ft/psi | ft*lbf/psi

Details

Vector of tank liquid volume values for the tabular parameterization of the tank area variable. The values in this vector 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 parameters Tabulated data - volume vs. level to Tank volume parameterization to Tabulated data - volume vs. level.

Values

l | gal | igal | m^3 | cm^3 | ft^3 | in^3 | km^3 | mi^3 | mm^3 | um^3 | yd^3 | N*m/Pa | N*m/bar | lbf*ft/psi | ft*lbf/psi

Default value

[0.0, 4.0, 6.0] m^3

Program usage name

V_liquid_vector

Evaluatable

Yes

# Inlet height — tank inlet height
m | cm | ft | in | km | mi | mm | um | yd

Details

The height of the tanker inlet. The value must be greater than or equal to 0.

Dependencies

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

Values

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

Default value

0.1 m

Program usage name

port_a_height

Evaluatable

Yes

# Inlet cross-sectional area — cross-sectional area of the tank inlet
m^2 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2

Details

The cross-sectional area of the tank inlet port. This value must be greater than 0.

Dependencies

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

Values

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

Default value

0.01 m^2

Program usage name

port_a_area

Evaluatable

Yes

# Height vector for inlets A and B — vector of height of ports A and B
m | cm | ft | in | km | mi | mm | um | yd

Details

Port height vector for enabled input ports A and B. Parameters Height vector for inlets A and B is a vector of values corresponding to the height of each input port starting from port A. Each element of this vector must be greater than or equal to 0.

Dependencies

To use this parameter, set the parameters to Number of inlets one of the values: 2.

Values

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

Default value

[0.1, 0.1] m

Program usage name

ports_ab_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A and B — vector of cross-sectional areas of input ports A and B
m^2 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2

Details

Vector of cross-sectional areas of tank inlets for included inlet ports A and B. Parameters Cross-sectional area vector for inlets A and B is a vector of values corresponding to the cross-sectional area of each inlet port, starting from port A. Each element of this vector must be greater than 0.

Dependencies

To use this parameter, set the parameters to Number of inlets one of the values: 2.

Values

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

Default value

[0.01, 0.01] m^2

Program usage name

ports_ab_area_vector

Evaluatable

Yes

# Height vector for inlets A, B, and C — vector of height of ports A, B and C
m | cm | ft | in | km | mi | mm | um | yd

Details

Port height vector for enabled input ports A, B and C. Parameters Height vector for inlets A, B, and C is a vector of values corresponding to the height of each input port, starting from port A. Each element of this vector must be greater than or equal to 0.

Dependencies

To use this parameter, set the parameters to Number of inlets one of the values: 3.

Values

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

Default value

[0.1, 0.1, 0.1] m

Program usage name

ports_abc_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A, B, and C — vector of cross-sectional areas of input ports A, B and C
m^2 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2

Details

Vector of cross-sectional areas of tank inlets for included inlet ports A, B and C. Parameters Cross-sectional area vector for inlets A, B, and C is a vector of values corresponding to the cross-sectional area of each inlet port, starting from port A. Each element of this vector must be greater than 0.

Dependencies

To use this parameter, set the parameters to Number of inlets one of the values: 3.

Values

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

Default value

[0.01, 0.01, 0.01] m^2

Program usage name

ports_abc_area_vector

Evaluatable

Yes

# Height vector for inlets A, B, C and D — vector of height of ports A, B, C and D
m | cm | ft | in | km | mi | mm | um | yd

Details

Port height vector for enabled input ports A, B, C and D. Parameters Height vector for inlets A, B, C and D is a vector of values corresponding to the height of each input port, starting from port A. Each element of this vector must be greater than or equal to 0.

Dependencies

To use this parameter, set the parameters to Number of inlets one of the values: 4.

Values

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

Default value

[0.1, 0.1, 0.1, 0.1] m

Program usage name

ports_abcd_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A, B, C and D — vector of cross-sectional areas of the input ports A, B, C and D
m^2 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2

Details

Vector of cross-sectional areas of tank inlets for included inlet ports A, B, C and D. Parameters Cross-sectional area vector for inlets A, B, C and D is a vector of values corresponding to the cross-sectional area of each inlet port, starting from port A. Each element of this vector must be greater than 0.

Dependencies

To use this parameter, set the parameters to Number of inlets one of the values: 4.

Values

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

Default value

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

Program usage name

ports_abcd_area_vector

Evaluatable

Yes

# Height vector for inlets A, B, C, D and E — vector of height of ports A, B, C, D and E
m | cm | ft | in | km | mi | mm | um | yd

Details

Port height vector for enabled input ports A, B, C, D and E. Parameters Height vector for inlets A, B, C, D and E is a vector of values corresponding to the height of each input port, starting from port A. Each element of this vector must be greater than or equal to 0.

Dependencies

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

Values

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

Default value

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

Program usage name

ports_abcde_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A, B, C, D and E — vector of cross-sectional areas of input ports A, B, C, D and E
m^2 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2

Details

Vector of cross-sectional areas of tank inlets for included inlet ports A, B, C, D and E. Parameters Cross-sectional area vector for inlets A, B, C, D and E is a vector of values corresponding to the cross-sectional area of each inlet port, starting from port A. Each element of this vector must be greater than 0.

Dependencies

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

Values

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

Default value

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

Program usage name

ports_abcde_area_vector

Evaluatable

Yes

# Height vector for inlets A, B, C, D, E and F — vector of height of ports A, B, C, D, E and F
m | cm | ft | in | km | mi | mm | um | yd

Details

Port height vector for enabled input ports A, B, C, D, E and F. Parameters Height vector for inlets A, B, C, D, E and F is a vector of values corresponding to the height of each input port, starting with port A. Each element of this vector must be greater than or equal to 0.

Dependencies

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

Values

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

Default value

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

Program usage name

ports_abcdef_height_vector

Evaluatable

Yes

# Cross-sectional area vector for inlets A, B, C, D, E and F — vector of cross-sectional areas of input ports A, B, C, D, E and F
m^2 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2

Details

Vector of cross-sectional areas of tank inlets for included inlet ports A, B, C, D, E and F. The parameters Cross-sectional area vector for inlets A, B, C, D, E and F is a vector of values corresponding to the cross-sectional area of each inlet port, starting from port A. Each element of this vector must be greater than 0.

Dependencies

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

Values

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

Default value

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

Program usage name

ports_abcdef_area_vector

Evaluatable

Yes

# Liquid level below inlet height — notification of low liquid level in the tank
None | Warning | Error

Details

Whether to receive a notification if the liquid level in the tanker drops below the port inlet height during the simulation. Set this parameters to Warning if you want to receive a warning when this happens during simulation. Set Error if you want the simulation to stop when this happens.

Values

None | Warning | Error

Default value

Error

Program usage name

low_level_assert_action

Evaluatable

No

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

Details

Whether to be notified if the volume of liquid in the tank exceeds the maximum tank capacity during the simulation. Set this parameters to Warning if you want to receive a warning when this happens during simulation. Set Error if you want the simulation to stop when this happens.

Values

None | Warning | Error

Default value

None

Program usage name

capacity_assert_action

Evaluatable

No

# Maximum tank capacity — tank filling limit
l | gal | igal | m^3 | cm^3 | ft^3 | in^3 | km^3 | mi^3 | mm^3 | um^3 | yd^3 | N*m/Pa | N*m/bar | lbf*ft/psi | ft*lbf/psi

Details

Tank filling limit.

Dependencies

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

Values

l | gal | igal | m^3 | cm^3 | ft^3 | in^3 | km^3 | mi^3 | mm^3 | um^3 | yd^3 | N*m/Pa | N*m/bar | lbf*ft/psi | ft*lbf/psi

Default value

10.0 m^3

Program usage name

V_capacity

Evaluatable

Yes

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

Details

Free-fall acceleration.

Values

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

Default value

9.81 m/s^2

Program usage name

g

Evaluatable

Yes