modelThirdOrderStratifier
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Information
This model reduces the numerical dissipation that is introduced by the standard first-order upwind discretization scheme which is created when connecting fluid volumes in series.
The model is used in conjunction with Buildings.Fluid.Storage.Stratified. It computes a heat flux that needs to be added to each volume of Buildings.Fluid.Storage.Stratified in order to give the results that a third-order upwind discretization scheme (QUICK) would give.
The QUICK method can cause oscillations in the tank temperatures since the high order method introduces numerical dispersion. There are two ways to reduce the oscillations:
-
To use an under-relaxation coefficient
alphawhen adding the heat flux into the volume. -
To use the first-order upwind for
hOut[2]andhOut[nSeg]. Note: Using it requiresnSeg ≥ 4.
Both approaches are implemented in the model.
The model is used by Buildings.Fluid.Storage.StratifiedEnhanced.
Limitations
The model requires at least 4 fluid segments. Hence, set nSeg to 4 or higher.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow_small | Small mass flow rate for regularization of zero flow | |
| Integer | nSeg | Number of volume segments | |
| Real | alpha | 0.5 | Under-relaxation coefficient (1: QUICK; 0: 1st order upwind) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heatPort | Heat input into the volumes | |
| Modelica.Blocks.Interfaces.RealInput | m_flow | Mass flow rate from port a to port b | |
| Modelica.Blocks.Interfaces.RealInput | H_flow | Enthalpy flow between the volumes | |
| Modelica.Fluid.Interfaces.FluidPort_a | fluidPort | Fluid port, needed to get pressure, temperature and species concentration |
Contents
| Name | Description |
|---|---|
| Medium model |
Revisions
-
June 7, 2018 by Filip Jorissen:
Copied model from Buildings and update the model accordingly. This is for #314. -
December 14, 2012 by Michael Wetter:
Removed unused protected parameterssta0andcp0. -
March 29, 2012 by Wangda Zuo:
Revised the implementation to reduce the temperature overshoot. -
July 28, 2010 by Wangda Zuo:
Rewrote third order upwind scheme to avoid state events. This leads to more robust and faster simulation. -
June 23, 2010 by Michael Wetter and Wangda Zuo:
First implementation.