The unit Tank (G-TL) simulates mass and energy storage in a chamber with separated volumes of gas and thermal liquid. The total volume of liquid and gas is fixed, but the individual volumes of gas and thermal liquid can be varied. Two gas ports provide gas flow, and a variable number of thermal liquid ports, from one to six, provide thermal liquid flow. The thermal 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 thermal liquid is assumed to be in equilibrium with the volume of gas and its pressure is the same as that of the gas.
The gas and thermal liquid volumes can exchange energy with other liquid and gas components and with the environment, but not with each other. The gas and thermal liquid volumes behave as if they were isolated from each other by an insulating membrane. Energy is exchanged with the other components through the gas or thermal liquid ports, and energy is exchanged with the environment, strictly in the form of heat, through the thermal ports.
Use this block to model components such as drain tanks, where water condensed from a compressed gas system is trapped at the bottom by gravity and discharged through a drain port. Note, however, that the unit does not take into account the effects of phase state change, which means that this unit cannot account for condensation effects.
Thermal liquid ports
You can specify the number of thermal liquid ports with the parameters Number of inlets:
Parameter value Number of inlets
Thermal 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.
Thermal liquid and gas volumes
The total volume of a tank is the sum of the volumes of gas and thermal liquid it contains:
where is the volume and the indices , and denote the total tank volume, thermal liquid volume and gas volume.
Since the total volume is fixed, the rate of change of the gas volume in time must be the inverse of the rate of change of the thermal liquid volume:
In the block, the rate of change of the thermal liquid volume is calculated by differentiating the expression:
where
- mass;
- density.
Differentiation gives the mass flow rate in a volume of thermal liquid:
The rate of change of density of thermal liquid in time is:
where
- thermal modulus of elasticity;
- isobaric thermal expansion coefficient;
- fluid pressure;
- liquid temperature.
Rearranging the terms gives the rate of change of thermal liquid volume and, respectively, gas volume:
Conservation of mass
The rate of mass storage in a volume of thermal liquid or gas is equal to the net mass flow rate in that volume.
In a volume of thermal liquid:
where
- is the mass accumulation rate in the volume of thermal liquid;
- the individual mass flow rates into that volume through the ports for thermal liquid A2, B2, C2, D2, E2 or F2.
The mass accumulation rate contains contributions from pressure, temperature, and volume change,
where the pressure in a volume of thermal liquid is by definition equal to the pressure in a volume of gas, so the equation is written in terms of pressure.
In the volume of gas:
where
- is the mass accumulation rate in the gas volume;
- are the individual mass flow rates into this volume through the ports for gas A1 and B1.
As with the thermal liquid volume, the mass accumulation rate 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).
We replace with the expression obtained earlier for this variable and combine the two expressions for :
The rearrangement of the terms gives the final expression for the conservation of mass in the volume of gas:
where is replaced by the summation of mass flow rates in the volume of thermal liquid.
Energy conservation
The energy storage rate in a volume of thermal liquid and gas is the sum of the energy fluxes through the inputs for the liquid, the heat fluxes through the corresponding thermal port, and the energy fluxes due to the volume change. For the volume of gas:
where
- total energy;
- enthalpy of gas;
- thermal energy flux entering the tank through port H1;
- is the heat flux entering the tank through the H2 port;
pressure derivative:
temperature derivative:
where is the isobaric specific heat capacity of thermal liquid inside the tank.
Conservation of momentum
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 block does not take into account the hydrostatic pressure of the gas. The gas inlet pressures are equal to each other and to the internal pressure of the gas:
The pressure of a thermal liquid on a port depends on its depth relative to the level of the thermal liquid. The internal pressure of the thermal liquid volume is equal to the pressure of the gas volume, = . In the block, the dynamic pressure at the thermal liquid ports, , is accounted for in Eq:
where
- is the height of the level of thermally conductive relative to the bottom of the tank;
- is the height of thermal liquid inlet port location relative to the tank bottom;
- free fall acceleration.
From the term the height of the thermal liquid column above the port is determined. The dynamic pressure at each port of thermal liquid depends on the direction of flow at that 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 thermal liquid inside the tank.
Dependencies
To use this parameter, set the parameters Tank volume parameterization to . Constant cross-section area.
#Liquid level vector —
vector of thermal liquid level values in the tank
m | cm | ft | in | km | mi | mm | um | yd
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 | 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 thermal 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 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.
#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
A two-element vector specifying the flow areas of the gas inlets.
#Inlet height at port A2 —
inlet port height A2 for thermal liquid
m | cm | ft | in | km | mi | mm | um | yd
Details
Inlet port height A2 for thermal 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 thermal 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 thermal 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 thermal 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 thermal 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 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.
#Height vector for inlets A2, B2, and C2 —
vector of heights of inlet ports A2, B2 and C2 for thermal liquid
m | cm | ft | in | km | mi | mm | um | yd
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 | 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 thermal 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 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.
#Height vector for inlets A2, B2, C2, and D2 —
vector of heights of inlet ports A2, B2, C2 and D2 for thermal liquid
m | cm | ft | in | km | mi | mm | um | yd
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 | 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 thermal 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 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.
#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 | cm | ft | in | km | mi | mm | um | yd
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 | 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 thermal 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 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.
#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 | 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 thermal 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 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.
#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
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.