OpenTank

Model of a tank under ambient pressure

    OpenTank

Library

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

OpenTank_0

NameLabelDescriptionData TypeValid Values

mo_medium

medium

Medium

FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Medium')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Air_30degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Air_70degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.MineralOil')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Water')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Gylcol20_20degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Gylcol50_20degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Water_10degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Water_90degC')

mo_T0

T0

Initial temperature of medium

Scalar

mo_T0fixed

T0fixed

Initial temperature guess value or fixed

Scalar

true
false

mo_Exchange

Exchange

Exchange of medium via flowport

Scalar

true
false

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
1

OpenTank_1

NameLabelDescriptionData TypeValid Values

mo_T_port

T_port

T_port

Structure

mo_T_port/fixed

fixed

Cell of scalars

true
false

mo_T_port/start

start

Cell of scalars

mo_T

T

T

Structure

mo_T/fixed

fixed

Cell of scalars

true
false

mo_T/start

start

Cell of scalars

mo_m

m

m

Structure

mo_m/fixed

fixed

Cell of scalars

true
false

mo_m/start

start

Cell of scalars

mo_level

level

level

Structure

mo_level/fixed

fixed

Cell of scalars

true
false

mo_level/start

start

Cell of scalars

mo_TTank

TTank

TTank

Structure

mo_TTank/fixed

fixed

Cell of scalars

true
false

mo_TTank/start

start

Cell of scalars

Ports

NameTypeDescriptionIO TypeNumber

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