modelTankWithTopPorts
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
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Height | height | Maximum level of tank before it overflows | |
| SI.Area | crossArea | Area of tank | |
| SI.Volume | V0 | 0 | Volume of the liquid when level = 0 |
| Integer | nTopPorts | 0 | Number of inlet ports above height (>= 1) |
| Integer | nPorts | 0 | Number of inlet/outlet ports (on bottom and on the side) |
| Modelica.Fluid.Vessels.BaseClasses.VesselPortsData[nPorts] | portsData | Data of inlet/outlet ports at side and bottom of tank | |
| Assumptions › Ambient | |||
| Medium.AbsolutePressure | p_ambient | system.p_ambient | Tank surface pressure |
| Medium.Temperature | T_ambient | system.T_ambient | Tank surface Temperature |
| Initialization | |||
| SI.Height | level_start | 0.5*height | Start value of tank level |
| Medium.AbsolutePressure | p_start (from PartialLumpedVolume) | system.p_start | Start value of pressure |
| Boolean | use_T_start (from PartialLumpedVolume) | true | = true, use T_start, otherwise h_start |
| Medium.Temperature | T_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.SpecificEnthalpy | h_start (from PartialLumpedVolume) | if use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_default | Start value of specific enthalpy |
| Medium.MassFraction[Medium.nX] | X_start (from PartialLumpedVolume) | Medium.X_default | Start value of mass fractions m_i/m |
| Medium.ExtraProperty[Medium.nC] | C_start (from PartialLumpedVolume) | Medium.C_default | Start value of trace substances |
| Assumptions › Dynamics | |||
| Types.Dynamics | energyDynamics (from PartialLumpedVolume) | system.energyDynamics | Formulation of energy balance |
| Types.Dynamics | massDynamics (from PartialLumpedVolume) | system.massDynamics | Formulation of mass balance |
| Types.Dynamics | substanceDynamics (from PartialLumpedVolume) | massDynamics | Formulation of substance balance |
| Types.Dynamics | traceDynamics (from PartialLumpedVolume) | massDynamics | Formulation of trace substance balance |
| Assumptions › Heat transfer | |||
| Boolean | use_HeatTransfer | false | = true, if HeatTransfer model is used |
| Advanced › Port properties | |||
| Real | hysteresisFactor | 0.1 | Hysteresis for empty pipe = diameter*hysteresisFactor |
| Boolean | stiffCharacteristicForEmptyPort | false | = true, if steep pressure loss characteristic for empty pipe port |
| Real | zetaLarge | 1e5 | Large pressure loss factor if mass flows out of empty pipe port |
| SI.MassFlowRate | m_flow_small | system.m_flow_small | Regularization range at zero mass flow rate |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Vessels.BaseClasses.VesselFluidPorts_a[nTopPorts] | topPorts | Inlet ports over height at top of tank (fluid flows only from the port in to the tank) | |
| Vessels.BaseClasses.VesselFluidPorts_b[nPorts] | ports | 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) | |
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heatPort |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Length | level | Fluid level in the tank | |
| Modelica.Fluid.System | system (from PartialLumpedVolume) | System properties | |
| SI.Volume | fluidVolume (from PartialLumpedVolume) | Volume | |
| Medium.BaseProperties | medium (from PartialLumpedVolume) | ||
| SI.Energy | U (from PartialLumpedVolume) | Internal energy of fluid | |
| SI.Mass | m (from PartialLumpedVolume) | Mass of fluid | |
| SI.Mass | mXi (from PartialLumpedVolume) | Masses of independent components in the fluid | |
| SI.Mass | mC (from PartialLumpedVolume) | Masses of trace substances in the fluid | |
| Medium.ExtraProperty[Medium.nC] | C (from PartialLumpedVolume) | Trace substance mixture content | |
| SI.MassFlowRate | mb_flow (from PartialLumpedVolume) | Mass flows across boundaries | |
| SI.MassFlowRate | mbXi_flow (from PartialLumpedVolume) | Substance mass flows across boundaries | |
| Medium.ExtraPropertyFlowRate | mbC_flow (from PartialLumpedVolume) | Trace substance mass flows across boundaries | |
| SI.EnthalpyFlowRate | Hb_flow (from PartialLumpedVolume) | Enthalpy flow across boundaries or energy source/sink | |
| SI.HeatFlowRate | Qb_flow (from PartialLumpedVolume) | Heat flow across boundaries or energy source/sink | |
| SI.Power | Wb_flow (from PartialLumpedVolume) | Work flow across boundaries or source term | |
| HeatTransfer | heatTransfer | ||
| SI.Volume | V | Actual tank volume | |
| Medium.EnthalpyFlowRate[nTopPorts] | H_flow_top | Enthalpy flow rates from the top ports in to the tank | |
| Medium.EnthalpyFlowRate[nPorts] | port_b_H_flow_bottom | Enthalpy flow rates from the bottom ports in to the tank | |
| Medium.MassFlowRate[nTopPorts,Medium.nXi] | mXi_flow_top | Substance mass flow rates from the top ports into the tank | |
| Medium.MassFlowRate[nPorts,Medium.nXi] | port_b_mXi_flow_bottom | Substance mass flow rates from the bottom ports into the tank | |
| Medium.MassFlowRate[nTopPorts,Medium.nC] | mC_flow_top | Trace substance mass flow rates from the top ports into the tank | |
| Medium.MassFlowRate[nPorts,Medium.nC] | port_b_mC_flow_bottom | Trace substance mass flow rates from the bottom ports into the tank |
Contents
| Name | Description |
|---|---|
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).