WOLFRAM SYSTEM MODELER

TankWithTopPorts

Tank with inlet/outlet ports and with inlet ports at the top

Diagram

Wolfram Language

In[1]:=
SystemModel["Modelica.Fluid.Examples.AST_BatchPlant.BaseClasses.TankWithTopPorts"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Model of a tank that is open to the environment at the fixed pressure p_ambient. The tank is filled with a single or multiple-substance liquid, assumed to have uniform temperature and mass fractions.

At the top of the tank over the maximal fill level height a vector of FluidPorts, called topPorts, is present. The assumption is made that fluid flows always in to the tank via these ports (and never back in to the connector).

The vector of connectors ports are fluid ports at the bottom and side of the tank at a definable height. Fluid can flow either out of or in to this port. The fluid level of the tank may be below one of these ports. This case is approximated by introducing a large pressure flow coefficient so that the mass flow rate through this port is very small in this case.

If the tank starts to over flow (i.e., level > height), an assertion is triggered.

When the diagram layer is open in the plot environment, the level of the tank is dynamically visualized. Note, the speed of the diagram animation in Dymola can be set via command animationSpeed(), e.g., animationSpeed(speed = 10)

Parameters (24)

energyDynamics

Value: system.energyDynamics

Type: Dynamics

Description: Formulation of energy balance

massDynamics

Value: system.massDynamics

Type: Dynamics

Description: Formulation of mass balance

substanceDynamics

Value: massDynamics

Type: Dynamics

Description: Formulation of substance balance

traceDynamics

Value: massDynamics

Type: Dynamics

Description: Formulation of trace substance balance

p_start

Value: p_ambient

Type: AbsolutePressure (Pa)

Description: Start value of pressure

use_T_start

Value: true

Type: Boolean

Description: = true, use T_start, otherwise h_start

T_start

Value: if use_T_start then system.T_start else Medium.temperature_phX(p_start, h_start, X_start)

Type: Temperature (K)

Description: Start value of temperature

h_start

Value: if use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_default

Type: SpecificEnthalpy (J/kg)

Description: Start value of specific enthalpy

X_start

Value: Medium.X_default

Type: MassFraction[Medium.nX] (kg/kg)

Description: Start value of mass fractions m_i/m

C_start

Value: Medium.C_default

Type: ExtraProperty[Medium.nC]

Description: Start value of trace substances

height

Value:

Type: Height (m)

Description: Maximum level of tank before it overflows

crossArea

Value:

Type: Area (m²)

Description: Area of tank

V0

Value: 0

Type: Volume (m³)

Description: Volume of the liquid when level = 0

p_ambient

Value: system.p_ambient

Type: AbsolutePressure (Pa)

Description: Tank surface pressure

T_ambient

Value: system.T_ambient

Type: Temperature (K)

Description: Tank surface Temperature

level_start

Value: 0.5 * height

Type: Height (m)

Description: Start value of tank level

nTopPorts

Value: 0

Type: Integer

Description: Number of inlet ports above height (>= 1)

nPorts

Value: 0

Type: Integer

Description: Number of inlet/outlet ports (on bottom and on the side)

portsData

Value:

Type: VesselPortsData[nPorts]

Description: Data of inlet/outlet ports at side and bottom of tank

use_HeatTransfer

Value: false

Type: Boolean

Description: = true, if HeatTransfer model is used

hysteresisFactor

Value: 0.1

Type: Real

Description: Hysteresis for empty pipe = diameter*hysteresisFactor

stiffCharacteristicForEmptyPort

Value: false

Type: Boolean

Description: = true, if steep pressure loss characteristic for empty pipe port

zetaLarge

Value: 1e5

Type: Real

Description: Large pressure loss factor if mass flows out of empty pipe port

m_flow_small

Value: system.m_flow_small

Type: MassFlowRate (kg/s)

Description: Regularization range at zero mass flow rate

Inputs (1)

fluidVolume

Default Value: V

Type: Volume (m³)

Description: Volume

Connectors (7)

topPorts

Type: VesselFluidPorts_a[nTopPorts]

Description: Inlet ports over height at top of tank (fluid flows only from the port in to the tank)

ports

Type: VesselFluidPorts_b[nPorts]

Description: Inlet/outlet ports at bottom or side of tank (fluid flows in to or out of port; a port might be above the fluid level)

heatPort

Type: HeatPort_a

Description: Thermal port for 1-dim. heat transfer (filled rectangular icon)

portsData_diameter

Type: RealInput[nPorts]

Description: 'input Real' as connector

portsData_diameter2

Type: RealInput[nPorts]

Description: 'input Real' as connector

portsData_height

Type: RealInput[nPorts]

Description: 'input Real' as connector

portsData_height2

Type: RealInput[nPorts]

Description: 'input Real' as connector

Components (4)

system

Type: System

Description: System properties

medium

Type: BaseProperties

Description: Base properties (p, d, T, h, u, R_s, MM and, if applicable, X and Xi) of a medium

portsData

Type: VesselPortsData[nPorts]

Description: Data of inlet/outlet ports at side and bottom of tank

heatTransfer

Type: HeatTransfer

Description: Wall heat transfer

Used in Examples (7)

BatchPlant_StandardWater

Modelica.Fluid.Examples.AST_BatchPlant

Model of an experimental batch plant

OneTank

Modelica.Fluid.Examples.AST_BatchPlant.Test

Tank with one time-varying top inlet mass flow rate and a bottom outlet into the ambient

TwoTanks

Modelica.Fluid.Examples.AST_BatchPlant.Test

TankWithEmptyingPipe1

Modelica.Fluid.Examples.AST_BatchPlant.Test

Demonstrates a tank with one constant top inlet mass flow rate and a bottom outlet into the ambient

TankWithEmptyingPipe2

Modelica.Fluid.Examples.AST_BatchPlant.Test

Demonstrates a tank with one constant top inlet mass flow rate and a bottom outlet into the ambient

TanksWithEmptyingPipe1

Modelica.Fluid.Examples.AST_BatchPlant.Test

Demonstrates a tank with one constant top inlet mass flow rate and a bottom outlet into the ambient

TanksWithEmptyingPipe2

Modelica.Fluid.Examples.AST_BatchPlant.Test

Demonstrates a tank with one constant top inlet mass flow rate and a bottom outlet into the ambient

Revisions

  • Dec. 12, 2008 by Rüdiger Franke: replace energy and mass balances with common definition in BaseClasses.PartialLumpedVolume
  • Dec. 8, 2008 by Michael Wetter (LBNL):
    Implemented trace substances and missing equation for outflow of multi substance media at top port.
  • Jul. 29, 2006 by Martin Otter (DLR):
    Improved handling of ports that are above the fluid level and simpler implementation.
  • Jan. 6, 2006 by Katja Poschlad, Manuel Remelhe (AST Uni Dortmund), Martin Otter (DLR):
    Implementation based on former tank model but with several improvements (top, bottom, side ports; correctly treating kinetic energy for outlet and total dissipation for inlet; ports can be above the fluid level).