modelOpenTank
Extends from Modelica.Fluid.Vessels.BaseClasses.PartialLumpedVessel (Lumped volume with a vector of fluid ports and replaceable heat transfer model).
Information
Model of a tank that is open to the ambient at the fixed pressure
p_ambient.
The vector of connectors ports represents fluid ports at configurable heights, relative to the bottom of tank. Fluid can flow either out of or in to each port.
The following assumptions are made:- The tank is filled with a single or multiple-substance medium having a density higher than the density of the ambient medium.
- The fluid has uniform density, temperature and mass fractions
- No liquid is leaving the tank through the open top; the simulation breaks with an assertion if the liquid level growths over the height.
The port pressures represent the pressures just after the outlet (or just before the inlet) in the attached pipe.
The hydraulic resistances portsData.zeta_in and portsData.zeta_out determine the dissipative pressure drop between tank and port depending on
the direction of mass flow. See VesselPortsData and [Idelchik, Handbook of Hydraulic Resistance, 2004].
With the setting use_portsData=false, the port pressure represents the static head
at the height of the respective port.
The relationship between pressure drop and mass flow rate at the port must then be provided by connected components;
Heights of ports as well as kinetic and potential energy of fluid entering or leaving are not taken into account anymore.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Height | height | Height of tank | |
| SI.Area | crossArea | Area of tank | |
| SI.ReynoldsNumber | Re_turbulent (from PartialLumpedVessel) | 100 | cf. suddenExpansion |
| 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 |
| General › Ports | |||
| Integer | nPorts (from PartialLumpedVessel) | 0 | Number of ports |
| Boolean | use_portsData (from PartialLumpedVessel) | true | = false to neglect pressure loss and kinetic energy |
| Modelica.Fluid.Vessels.BaseClasses.VesselPortsData | portsData (from PartialLumpedVessel) | Data of inlet/outlet ports | |
| Advanced › Port properties | |||
| Medium.MassFlowRate | m_flow_nominal (from PartialLumpedVessel) | if system.use_eps_Re then system.m_flow_nominal else 1e2*system.m_flow_small | Nominal value for mass flow rates in ports |
| SI.MassFlowRate | m_flow_small (from PartialLumpedVessel) | if system.use_eps_Re then system.eps_m_flow*m_flow_nominal else system.m_flow_small | Regularization range at zero mass flow rate |
| Boolean | use_Re (from PartialLumpedVessel) | system.use_eps_Re | = true, if turbulent region is defined by Re, otherwise by m_flow_small |
| Assumptions › Heat transfer | |||
| Boolean | use_HeatTransfer (from PartialLumpedVessel) | false | = true to use the HeatTransfer model |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| VesselFluidPorts_b[nPorts] | ports (from PartialLumpedVessel) | Fluid inlets and outlets | |
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heatPort (from PartialLumpedVessel) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Height | level | Level height of tank | |
| SI.Volume | V | Actual tank volume | |
| 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 | |
| Medium.EnthalpyFlowRate[nPorts] | ports_H_flow (from PartialLumpedVessel) | ||
| Medium.MassFlowRate[nPorts,Medium.nXi] | ports_mXi_flow (from PartialLumpedVessel) | ||
| Medium.MassFlowRate | sum_ports_mXi_flow (from PartialLumpedVessel) | Substance mass flows through ports | |
| Medium.ExtraPropertyFlowRate[nPorts,Medium.nC] | ports_mC_flow (from PartialLumpedVessel) | ||
| Medium.ExtraPropertyFlowRate | sum_ports_mC_flow (from PartialLumpedVessel) | Trace substance mass flows through ports | |
| HeatTransfer | heatTransfer (from PartialLumpedVessel) | ||
| Medium.Density | portInDensities (from PartialLumpedVessel) | Densities of the fluid at the device boundary | |
| SI.Velocity | portVelocities (from PartialLumpedVessel) | Velocities of fluid flow at device boundary | |
| SI.EnergyFlowRate | ports_E_flow (from PartialLumpedVessel) | Flow of kinetic and potential energy at device boundary | |
| Real | s (from PartialLumpedVessel) | Curve parameters for port flows vs. port pressures; for further details see, Modelica Tutorial: Ideal switching devices | |
| Real | ports_penetration (from PartialLumpedVessel) | Penetration of port with fluid, depending on fluid level and port diameter | |
| SI.Area | portAreas (from PartialLumpedVessel) | {Modelica.Constants.pi/4*portsData_diameter[i]^2 for i in 1:nPorts} | |
| Medium.AbsolutePressure | vessel_ps_static (from PartialLumpedVessel) | Static pressures inside the vessel at the height of the corresponding ports, zero flow velocity | |
| SI.MassFlowRate | m_flow_turbulent (from PartialLumpedVessel) |
Revisions
- Dec. 12, 2008 by Rüdiger Franke: move port definitions to BaseClasses.PartialLumpedVessel; also use energy and mass balance from common base class
- Dec. 8, 2008 by Michael Wetter (LBNL):
Implemented trace substances. - Jan. 6, 2006 by Katja Poschlad, Manuel Remelhe (AST Uni Dortmund),
Martin Otter (DLR):
Implementation based on former tank model. - Oct. 29, 2007 by Carsten Heinrich (ILK Dresden):
Adapted to the new fluid library interfaces:- FluidPorts_b is used instead of FluidPort_b (due to it is defined as an array of ports)
- Port name changed from port to ports
- Apr. 25, 2006 by Katrin Prölß (TUHH):
Limitation to bottom ports only, added inlet and outlet loss factors.