modelStratifiedEnhanced
Stratified tank model with enhanced discretization
Extends from BaseClasses.PartialStratified (Partial model of a stratified tank for thermal energy storage).
Information
This is a model of a stratified storage tank for thermal energy storage.
See the Buildings.Fluid.Storage.UsersGuide for more information.
Limitations
The model requires at least 4 fluid segments. Hence, set nSeg to 4 or higher.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Volume | VTan (from PartialStratified) | Tank volume | |
| Modelica.Units.SI.Length | hTan (from PartialStratified) | Height of tank (without insulation) | |
| Modelica.Units.SI.Length | dIns (from PartialStratified) | Thickness of insulation | |
| Modelica.Units.SI.ThermalConductivity | kIns (from PartialStratified) | 0.04 | Specific heat conductivity of insulation |
| Integer | nSeg (from PartialStratified) | 2 | Number of volume segments |
| Modelica.Units.SI.Time | tau (from PartialStratified) | 1 | Time constant for mixing |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPortInterface) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m_flow_nominal (from PartialTwoPortInterface) | Nominal mass flow rate | |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small (from PartialTwoPortInterface) | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortInterface) | false | = true, if actual temperature at port is computed |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from PartialStratified) | Modelica.Fluid.Types.Dynamics.FixedInitial | Formulation of energy balance |
| Initialization | |||
| Medium.AbsolutePressure | p_start (from PartialStratified) | Medium.p_default | Start value of pressure |
| Medium.Temperature | T_start (from PartialStratified) | Medium.T_default | Start value of temperature |
| Modelica.Units.SI.Temperature[nSeg] | TFlu_start (from PartialStratified) | T_start*ones(nSeg) | Initial temperature of the tank segments, with TFlu_start[1] being the top segment |
| Medium.MassFraction[Medium.nX] | X_start (from PartialStratified) | Medium.X_default | Start value of mass fractions m_i/m |
| Medium.ExtraProperty[Medium.nC] | C_start (from PartialStratified) | fill(0, Medium.nC) | Start value of trace substances |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a (from PartialTwoPortInterface) | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from PartialTwoPortInterface) | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Blocks.Interfaces.RealOutput | Ql_flow (from PartialStratified) | Heat loss of tank (positive if heat flows from tank to ambient) | |
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heaPorVol (from PartialStratified) | Heat port that connects to the control volumes of the tank | |
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heaPorSid (from PartialStratified) | Heat port tank side (outside insulation) | |
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heaPorTop (from PartialStratified) | Heat port tank top (outside insulation) | |
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heaPorBot (from PartialStratified) | Heat port tank bottom (outside insulation). Leave unconnected for adiabatic condition |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow (from PartialTwoPortInterface) | port_a.m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp (from PartialTwoPortInterface) | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_a (from PartialTwoPortInterface) | if allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow))) | Medium properties in port_a |
| Medium.ThermodynamicState | sta_b (from PartialTwoPortInterface) | if allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow)) | Medium properties in port_b |
| Buildings.Fluid.MixingVolumes.MixingVolume | vol (from PartialStratified) | Tank segment |
Revisions
-
March 7, 2022, by Michael Wetter:
Setfinal massDynamics=energyDynamics.
This is for #1542. -
June 7, 2018 by Filip Jorissen:
Copied model from Buildings and update the model accordingly. This is for #314. -
June 1, 2018, by Michael Wetter:
Refactored model to allow a fluid port in the tank that do not have the enhanced stratification model.
This is for issue 1182. -
March 29, 2012 by Wangda Zuo:
Revised the implementation to reduce the temperature overshoot. -
June 23, 2010 by Michael Wetter and Wangda Zuo:
Changed model that is used to correct the numerical diffusion. The previous version used the model from Stefan Wischhusen, An Enhanced Discretization Method for Storage Tank Models within Energy Systems, Modelica Conference, Vienna, Austria, September 2006. However, for situations where there is a strong stratification, this model can lead to a large overshoot in tank temperatures, leading to a violation of the second law. In this revision, the model that computes the volume outlet temperatures has been changed to a third order upwind scheme, which is implemented in Buildings.Fluid.Storage.BaseClasses.ThirdOrderStratifier. -
October 23, 2008 by Michael Wetter:
First implementation.