The unit Tank (G-IL) simulates mass and energy storage 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 can be varied. Two gas ports provide gas flow, and a variable number of isothermal liquid ports, from one to six, provide isothermal liquid flow. The isothermal liquid ports can be at different heights.
The tank is pressurised, 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. The volume of the isothermal liquid is assumed to be in equilibrium with the volume of the gas, and its pressure is the same as that of the gas (). The gas and isothermal liquid volumes do not exchange energy with each other, but energy can be exchanged with other components through gas ports.
Ports of isothermal liquid
You can specify the number of isothermal liquid ports using the parameters Number of inlets:
Parameter value Number of inlets
Isothermal liquid ports
1
A2 port
2
A2 and B2 ports
3
A2, B2 and C2 ports
4
A2, B2, C2 and D2 ports
5
A2, B2, C2, D2 and E2 ports.
6
A2, B2, C2, D2, E2 and F2 ports.
Volumes of isothermal liquid and gas
The total volume of a tank is the sum of the volumes of the gas and isothermal liquid it contains:
where is the volume and the indices , and denote the total tank volume, isothermal liquid volume and gas volume.
Since the total volume is fixed, the rate of change of the gas volume in time must be opposite to the rate of change of the isothermal liquid volume:
In block, the rate of change of volume of an isothermal liquid is calculated by differentiating the expression:
where
- mass;
- density.
Differentiation gives the mass flow rate in a volume of isothermal liquid:
The rate of change of the volume of isothermal liquid and, therefore, the volume of gas is:
where is the pressure in the tank.
Conservation of mass
The mass conservation rate of an isothermal liquid or gas is equal to the net mass flow rate in that volume.
In a volume of isothermal liquid:
where
- isothermal liquid mass accumulation rate;
- the individual mass flow rates into this volume through the ports for isothermal liquid A2, B2, C2, D2, E2 or F2.
In a volume of gas:
where
- is the gas mass accumulation rate;
- are the individual mass flows into this volume through the ports for gas A1 and B1.
The mass accumulation rate in a volume of gas contains contributions from pressure, temperature, and volume change:
where is temperature, and the derivatives for pressure and temperature 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 the volume of gas is as follows
Conservation of energy
The rate of energy storage in a volume of gas is:
where
- is the total energy of the gas volume;
- enthalpy of gas;
- thermal energy flux entering the tank through the H1 port;
In the block, hydrodynamic drag for both gas and isothermal liquid is not considered, regardless of its nature, frictional drag, or any other nature.Also, the hydrostatic pressure of the gas is not considered in the block. The pressures are equal to each other and to the internal pressure of the gas:
The pressure of an isothermal liquid on a port depends on its depth relative to the liquid level. The internal pressure of an isothermal liquid is equal to the gas pressure, = . In the block, the dynamic port pressure of an isothermal liquid, , is accounted for in Eq:
where
- isothermal liquid level height relative to the tank bottom;
- isothermal liquid inlet port height relative to the tank bottom;
- free fall acceleration.
From the term the height of the thermal liquid column above the port is determined. Dynamic pressure at each port of isothermal liquid depends on the direction of flow at this port:
where is the flow velocity.
Assumptions and limitations
The momentum of the fluid is lost at the tank inlet due to sudden expansion in the tank volume.
#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 | 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. 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.
#Liquid level vector —
vector of isothermal liquid level values in the tank
m | cm | ft | in | km | mi | mm | um | yd
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 | 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 at given levels of isothermal liquid 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 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.
#Cross-sectional area vector for inlets A1 and B1 —
vector of cross-sectional areas of inlet gas ports A1 and B1 m^2 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2
Details
Two-element vector of cross-sectional areas of inlet gas ports A1 and B1.
#Inlet height at port A2 —
inlet port height A2 for isothermal liquid
m | cm | ft | in | km | mi | mm | um | yd
Details
Inlet port height A2 for isothermal liquid.
Dependencies
To use this parameter, set the Number of inlets parameters to . 1.
Units
m | cm | ft | in | km | mi | mm | um | yd
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 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2
Details
Inlet port cross-sectional area A2 for isothermal liquid.
Dependencies
To use this parameter, set the Number of inlets parameters to . 1.
#Height vector for inlets A2 and B2 —
vector of heights of inlet ports A2 and B2 for isothermal liquid
m | cm | ft | in | km | mi | mm | um | yd
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 | cm | ft | in | km | mi | mm | um | yd
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 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2
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.
#Height vector for inlets A2, B2, and C2 —
vector of heights of inlet ports A2, B2 and C2 for isothermal liquid
m | cm | ft | in | km | mi | mm | um | yd
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 | cm | ft | in | km | mi | mm | um | yd
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 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2
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.
#Height vector for inlets A2, B2, C2, and D2 —
vector of heights of inlet ports A2, B2, C2 and D2 for isothermal liquid
m | cm | ft | in | km | mi | mm | um | yd
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 | cm | ft | in | km | mi | mm | um | yd
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 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2
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.
#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 | cm | ft | in | km | mi | mm | um | yd
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 | cm | ft | in | km | mi | mm | um | yd
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 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2
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.
#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 | cm | ft | in | km | mi | mm | um | yd
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 | 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
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 | cm^2 | ft^2 | in^2 | km^2 | mi^2 | mm^2 | um^2 | yd^2
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.
#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
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 Liquid volume above max capacity to . Error.