modelTankWithTopPorts

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

Extends from Modelica.Fluid.Interfaces.PartialLumpedVolume (Lumped volume with mass and energy balance).

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
Medium.AbsolutePressurep_start (from PartialLumpedVolume)system.p_startStart value of pressure
Booleanuse_T_start (from PartialLumpedVolume)true= true, use T_start, otherwise h_start
Medium.TemperatureT_start (from PartialLumpedVolume)if use_T_start then system.T_start else Medium.temperature_phX(p_start, h_start, X_start)Start value of temperature
Medium.SpecificEnthalpyh_start (from PartialLumpedVolume)if use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_defaultStart value of specific enthalpy
Medium.MassFraction[Medium.nX]X_start (from PartialLumpedVolume)Medium.X_defaultStart value of mass fractions m_i/m
Medium.ExtraProperty[Medium.nC]C_start (from PartialLumpedVolume)Medium.C_defaultStart value of trace substances
Assumptions › Dynamics
Types.DynamicsenergyDynamics (from PartialLumpedVolume)system.energyDynamicsFormulation of energy balance
Types.DynamicsmassDynamics (from PartialLumpedVolume)system.massDynamicsFormulation of mass balance
Types.DynamicssubstanceDynamics (from PartialLumpedVolume)massDynamicsFormulation of substance balance
Types.DynamicstraceDynamics (from PartialLumpedVolume)massDynamicsFormulation of trace substance balance
Assumptions › Heat transfer
Booleanuse_HeatTransferfalse= true, if HeatTransfer model is used
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

Connectors

TypeNameDefaultDescription
Vessels.BaseClasses.VesselFluidPorts_a[nTopPorts]topPortsInlet ports over height at top of tank (fluid flows only from the port in to the tank)
Vessels.BaseClasses.VesselFluidPorts_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)
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatPort

Components

TypeNameDefaultDescription
SI.LengthlevelFluid level in the tank
Modelica.Fluid.Systemsystem (from PartialLumpedVolume)System properties
SI.VolumefluidVolume (from PartialLumpedVolume)Volume
Medium.BasePropertiesmedium (from PartialLumpedVolume)
SI.EnergyU (from PartialLumpedVolume)Internal energy of fluid
SI.Massm (from PartialLumpedVolume)Mass of fluid
SI.MassmXi (from PartialLumpedVolume)Masses of independent components in the fluid
SI.MassmC (from PartialLumpedVolume)Masses of trace substances in the fluid
Medium.ExtraProperty[Medium.nC]C (from PartialLumpedVolume)Trace substance mixture content
SI.MassFlowRatemb_flow (from PartialLumpedVolume)Mass flows across boundaries
SI.MassFlowRatembXi_flow (from PartialLumpedVolume)Substance mass flows across boundaries
Medium.ExtraPropertyFlowRatembC_flow (from PartialLumpedVolume)Trace substance mass flows across boundaries
SI.EnthalpyFlowRateHb_flow (from PartialLumpedVolume)Enthalpy flow across boundaries or energy source/sink
SI.HeatFlowRateQb_flow (from PartialLumpedVolume)Heat flow across boundaries or energy source/sink
SI.PowerWb_flow (from PartialLumpedVolume)Work flow across boundaries or source term
HeatTransferheatTransfer
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 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).