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_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 |
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 |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo__nmodifiers | Number of Modifiers | Specifies the number of modifiers | Number | |
mo__modifiers | Modifiers | Add new modifier | Structure | |
mo__modifiers/varname | Variable name | Cell of strings | 'h' | |
mo__modifiers/attribute | Attribute | Cell of strings | 'start' | |
mo__modifiers/value | Value |
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 |