modelOpenTank

Model of a tank under ambient pressure

Extends from FluidHeatFlow.BaseClasses.SinglePortBottom (Partial model of a single port at the bottom).

Information

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

TypeNameDefaultDescription
FluidHeatFlow.Media.Mediummedium (from SinglePortBottom)FluidHeatFlow.Media.Medium()Medium
SI.TemperatureT0 (from SinglePortBottom)Initial temperature of medium
BooleanT0fixed (from SinglePortBottom)falseInitial temperature guess value or fixed
SI.AreaATankCross section of tank
SI.LengthhTankHeight of tank
SI.PressurepAmbientAmbient pressure
SI.AccelerationgModelica.Constants.g_nGravitation
BooleanuseHeatPortfalse= true, if HeatPort is enabled

Connectors

TypeNameDefaultDescription
FluidHeatFlow.Interfaces.FlowPort_aflowPort (from SinglePortBottom)
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatPortOptional port for cooling or heating the medium in the tank
Modelica.Blocks.Interfaces.RealOutputlevelLevel of medium in tank
Modelica.Blocks.Interfaces.RealOutputTTankTemperature of medium in tank

Components

TypeNameDefaultDescription
SI.TemperatureT_port (from SinglePortBottom)Temperature at flowPort_a
SI.TemperatureT (from SinglePortBottom)Outlet temperature of medium
SI.MassmMass of medium in tank