modelOpenTank

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

Extends from Modelica.Fluid.Interfaces.PartialLumpedVolume.

Information

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

TypeNameDefaultDescription
SI.HeightheightMaximum level of tank before it overflows
SI.AreacrossAreaArea of tank
SI.VolumeV00Volume of the liquid when level = 0
IntegernTopPorts0Number of inlet ports above height (>= 1)
IntegernPorts0Number of inlet/outlet ports (on bottom and on the side)
Modelica.Fluid.Vessels.BaseClasses.VesselPortsData[nPorts]portsDataData of inlet/outlet ports at side and bottom of tank
Assumptions › Ambient
Medium.AbsolutePressurep_ambientsystem.p_ambientTank surface pressure
Medium.TemperatureT_ambientsystem.T_ambientTank surface Temperature
Initialization
SI.Heightlevel_start0.5*heightStart value of tank level
Assumptions › Heat transfer
Booleanuse_HeatTransferfalse= true to use the HeatTransfer model
Advanced › Port properties
RealhysteresisFactor0.1Hysteresis for empty pipe = diameter*hysteresisFactor
BooleanstiffCharacteristicForEmptyPortfalse=true, if steep pressure loss characteristic for empty pipe port
RealzetaLarge1e5Large pressure loss factor if mass flows out of empty pipe port
SI.MassFlowRatem_flow_smallsystem.m_flow_smallRegularization range at zero mass flow rate

Components

TypeNameDefaultDescription
SI.LengthlevelFluid level in the tank
Interfaces.VesselWasteFluidPorts_a[nTopPorts]topPortsInlet ports over height at top of tank (fluid flows only from the port in to the tank)
Interfaces.VesselWasteFluidPorts_b[nPorts]portsinlet/outlet ports at bottom or side of tank (fluid flows in to or out of port; a port might be above the fluid level)
HeatTransferheatTransfer
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatPort
SI.VolumeVActual tank volume
Medium.EnthalpyFlowRate[nTopPorts]H_flow_topEnthalpy flow rates from the top ports in to the tank
Medium.EnthalpyFlowRate[nPorts]port_b_H_flow_bottomEnthalpy flow rates from the bottom ports in to the tank
Medium.MassFlowRate[nTopPorts,Medium.nXi]mXi_flow_topSubstance mass flow rates from the top ports into the tank
Medium.MassFlowRate[nPorts,Medium.nXi]port_b_mXi_flow_bottomSubstance mass flow rates from the bottom ports into the tank
Medium.MassFlowRate[nTopPorts,Medium.nC]mC_flow_topTrace substance mass flow rates from the top ports into the tank
Medium.MassFlowRate[nPorts,Medium.nC]port_b_mC_flow_bottomTrace substance mass flow rates from the bottom ports into the tank

Contents

NameDescription
HeatTransfer

Revisions

  • Dec. 12, 2008 by Ruediger 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).