OpenTank
Model of a tank under ambient pressure
Library
Modelica/Thermal/FluidHeatFlow/Components
Description
This is a simple model of an open tank with volume A*h. The level and the temperature of the medium are measured and provided as output.
Note: If the level of the medium reaches 0 (minimum) or h (maximum), an assertion is triggered.
Note: The flowPort is assumed to be at the bottom. Therefore the pressure at the flowPort is ambient pressure + level*rho*g.
- If the mass flow rate at the port goes into the tank the level increases and the mixing rule is applied to obtain the temperature change of the medium in the tank.
- If the mass flow rate at the port goes out of the tank the level decreases, the temperature of the outflowing medium is defined by the the temperature of the medium in the tank.
It is assumed that the medium in the tank has the same temperature over the whole volume, i.e. mixed thoroughly.
Via the optional heatPort the medium in the tank can be cooled or heated.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_medium | medium | Medium | FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Medium') | |
mo_T0 | T0 | Initial temperature of medium | Scalar | |
mo_T0fixed | T0fixed | Initial temperature guess value or fixed | Scalar | true |
mo_Exchange | Exchange | Exchange of medium via flowport | Scalar | true |
mo_ATank | ATank | Cross section of tank | Scalar | |
mo_hTank | hTank | Height of tank | Scalar | |
mo_pAmbient | pAmbient | Ambient pressure | Scalar | |
mo_g | g | Gravitation | Scalar | |
mo_useHeatPort | useHeatPort | =true, if HeatPort is enabled | Number | 0 |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_T_port | T_port | T_port | Structure | |
mo_T_port/fixed | fixed | Cell of scalars | true | |
mo_T_port/start | start | Cell of scalars | ||
mo_T | T | T | Structure | |
mo_T/fixed | fixed | Cell of scalars | true | |
mo_T/start | start | Cell of scalars | ||
mo_m | m | m | Structure | |
mo_m/fixed | fixed | Cell of scalars | true | |
mo_m/start | start | Cell of scalars | ||
mo_level | level | level | Structure | |
mo_level/fixed | fixed | Cell of scalars | true | |
mo_level/start | start | Cell of scalars | ||
mo_TTank | TTank | TTank | Structure | |
mo_TTank/fixed | fixed | Cell of scalars | true | |
mo_TTank/start | start | Cell of scalars |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
flowPort | implicit | output | 1 | |
level | implicit | Level of medium in tank | output | 2 |
TTank | implicit | Temperature of medium in tank | output | 3 |
Port 4 | implicit | Optional port for cooling or heating the medium in the tank | input | mo_useHeatPort |