modelStorageDetailed

Buffer Storage Model with support for heating rod and two heating coils

Extends from AixLib.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes).

Information

Overview

Detailed thermal energy storage model with optional heating rod and two heating coils based on a pipe model.

Concept

It represents a buffer storage stratified into n layers where 1 represents the bottom layer and n represents the top layer. The layers are connected to each other allowing heat and fluid transfer.The heat transfer between the layers can be selected to model the conductance between the layers or different models that additionally represent the buoyancy:

HeatTransferOnlyConduction: Model for heat transfer between buffer storage layers. Models conductance of water. An effective heat conductivity is therefore calculated. Used in BufferStorage model.

HeatTransferLambdaSimple: Model for heat transfer between buffer storage layers. Models conductance of water and additional effective conductivity (in case the above layer is colder than the lower layer). Used in BufferStorage model.

HeatTransferLambdaEff: Model for heat transfer between buffer storage layers. Models conductance of water and buoyancy according to Viskanta et al., 1997. An effective heat conductivity is therefore calculated. Used in BufferStorage model.

HeatTransferLambdaEffSmooth: Same as HeatTransfer_lambda_eff. In addition, the smooth() expression is used for the transition of the buoyancy model.

HeatTransferLambdaEffTanh: Same as HeatTransfer_lambda_eff. In addition, a tanh function is used for the transition of the buoyancy model (VariableTransition model). Attention: the initial value of the FullTransition model is 0.5. This may lead to a mixture of the storage at the beginning of the simulation.

HeatTransferBuoyancyWetter: Model for heat transfer between buffer storage layers. Models buoyancy according to Buildings.Fluid.Storage.BaseClasses.Buoyancy model of Buildings library, cf. https://simulationresearch.lbl.gov/modelica. No conduction is implemented apart from when buoyancy occurs.

The geometrical data for the storage is read by records in the DataBase package. The model also includes heat losses over the storage walls (wall, top and bottom). No pressure losses are included. Thus external pressure loss models are required for the use of the model.

Sources

  • R. Viskanta, A. KaraIds: Interferometric observations of the temperature structure in water cooled or heated from above. Advances in Water Resources, volume 1, 1977, pages 57-69. Bibtex-Key [R.VISKANTA1977]

Example Results

AixLib.Fluid.Storage.Examples.StorageDetailed

AixLib.Fluid.Storage.Examples.StorageBoiler

AixLib.Fluid.Storage.Examples.StorageSolarCollector

Parameters

TypeNameDefaultDescription
Integern5Number of Layers
AixLib.DataBase.Storage.StorageDetailedBaseDataDefinitiondata
Modelica.Units.SI.CoefficientOfHeatTransferhConIn100Model assumptions heat transfer coefficient water <-> wall
Modelica.Units.SI.CoefficientOfHeatTransferhConOut10Model assumptions heat transfer coefficient insulation <-> air
IntegerdisHC1nHC1Up - nHC1Low + 1
IntegerdisHC2nHC2Up - nHC2Low + 1
BooleaninpLowLayDemand(nLowerPortDemand == 1)
BooleaninpHigLayDemand(nUpperPortDemand == n)
BooleaninpLowLaySupply(nLowerPortSupply == 1)
BooleaninpHigLaySupply(nUpperPortSupply == n)
IntegerinpActLaycat(1, {if (nLowerPortDemand == k or nLowerPortSupply == k) then (if (nUpperPortDemand == k or nUpperPortSupply == k) then 2 else 1) else (if (nUpperPortDemand == k or nUpperPortSupply == k) then 1 else 0) for k in 1:n})
IntegerportsLayercat(1, {if inpActLay[1] == 1 then 3 else 1}, {inpActLay[k]*2 + 2 for k in 2:n - 1}, {if inpActLay[n] == 1 then 3 else 1})
Dynamics › Conservation equations
Modelica.Fluid.Types.DynamicsenergyDynamics (from LumpedVolumeDeclarations)Modelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicssubstanceDynamics (from LumpedVolumeDeclarations)energyDynamicsType of independent mass fraction balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicstraceDynamics (from LumpedVolumeDeclarations)energyDynamicsType of trace substance balance: dynamic (3 initialization options) or steady state
Advanced › Dynamics
Modelica.Fluid.Types.DynamicsmassDynamics (from LumpedVolumeDeclarations)energyDynamicsType of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state
Initialization
Medium.AbsolutePressurep_start (from LumpedVolumeDeclarations)Medium.p_defaultStart value of pressure
Medium.TemperatureT_start (from LumpedVolumeDeclarations)Medium.T_defaultStart value of temperature
Medium.MassFraction[Medium.nX]X_start (from LumpedVolumeDeclarations)Medium.X_defaultStart value of mass fractions m_i/m
Medium.ExtraProperty[Medium.nC]C_start (from LumpedVolumeDeclarations)fill(0, Medium.nC)Start value of trace substances
Medium.ExtraProperty[Medium.nC]C_nominal (from LumpedVolumeDeclarations)fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Dynamics
RealmSenFac (from LumpedVolumeDeclarations)1Factor for scaling the sensible thermal mass of the volume
Nominal condition
Modelica.Units.SI.MassFlowRatem1_flow_nominalNominal mass flow rate of fluid 1 ports
Modelica.Units.SI.MassFlowRatem2_flow_nominalNominal mass flow rate of fluid 2 ports
Heating Coils and Rod › Nominal condition
Modelica.Units.SI.MassFlowRatemHC1_flow_nominalNominal mass flow rate of fluid 1 ports
Modelica.Units.SI.MassFlowRatemHC2_flow_nominalNominal mass flow rate of fluid 1 ports
Heating Coils and Rod
BooleanuseHeatingCoil1trueUse Heating Coil1?
BooleanuseHeatingCoil2trueUse Heating Coil2?
BooleanuseHeatingRodtrueUse Heating Rod?
Modelica.Units.SI.CoefficientOfHeatTransferhConHC1100Model assumptions Coefficient of Heat Transfer HC1 <-> Heating Water
Modelica.Units.SI.CoefficientOfHeatTransferhConHC2100 Model assumptions Coefficient of Heat Transfer HC2 <-> Heating Water
BooleanupToDownHC1trueHeating Coil 1 orientation from up to down?
BooleanupToDownHC2trueHeating Coil 2 orientation from up to down?
Initialization › Storage specific
Modelica.Units.SI.Temperature[n]TStartfill(298.15, n)Start Temperature of fluid in each layer. e.g. for a 3 layer model: {20, 20, 20}
Modelica.Units.SI.TemperatureTStartWall293.15Starting Temperature of wall in K
Modelica.Units.SI.TemperatureTStartIns293.15Starting Temperature of insulation in K
Advanced
Modelica.Units.SI.MassFlowRatem_flow_small_HC11E-4*abs(mHC1_flow_nominal)Small mass flow rate for regularization of zero flow
Modelica.Units.SI.MassFlowRatem_flow_small_HC21E-4*abs(mHC2_flow_nominal)Small mass flow rate for regularization of zero flow
Modelica.Units.SI.MassFlowRatem_flow_small1E-4*abs(m1_flow_nominal + m2_flow_nominal)Small mass flow rate for regularization of zero flow
Assumptions
BooleanallowFlowReversal_layerstrue= false to simplify equations, assuming, but not enforcing, no flow reversal. Used only if model has two ports.
BooleanallowFlowReversal_HC1true= false to simplify equations, assuming, but not enforcing, no flow reversal
BooleanallowFlowReversal_HC2true= false to simplify equations, assuming, but not enforcing, no flow reversal
Heating Coils and Rod › Pressure losses
BooleandisableComputeFlowResistancefalse=false to include the pressure drop in a valve dpFixed_nominal
Modelica.Units.SI.PressureDifferencedpHC1Fixed_nominalheatingCoil1.dpFixed_nominalPressure drop to include in valve models connected in series to this model
Modelica.Units.SI.PressureDifferencedpHC2Fixed_nominalheatingCoil2.dpFixed_nominalPressure drop to include in valve models connected in series to this model
Advanced › Connection Layers: !Any modification will overwrite the data record behaviour!
IntegernLowerPortSupplyinteger(max(AixLib.Utilities.Math.Functions.round(data.hLowerPortSupply/(data.hTank/n) + 0.5, 0), 1))Layer number lower end of supply is connected to
IntegernUpperPortSupplyinteger(min(AixLib.Utilities.Math.Functions.round(data.hUpperPortSupply/(data.hTank/n) + 0.5, 0), n))Layer number upper end of supply is connected to
IntegernLowerPortDemandinteger(max(AixLib.Utilities.Math.Functions.round(data.hLowerPortDemand/(data.hTank/n) + 0.5, 0), 1))Layer number lower end of demand is connected to
IntegernUpperPortDemandinteger(min(AixLib.Utilities.Math.Functions.round(data.hUpperPortDemand/(data.hTank/n) + 0.5, 0), n))Layer number upper end of demand is connected to
IntegernTS1integer(AixLib.Utilities.Math.Functions.round(data.hTS1/(data.hTank/n) + 0.5, 0))Layer number lower temperature sensor is connected to
IntegernTS2integer(AixLib.Utilities.Math.Functions.round(data.hTS2/(data.hTank/n) + 0.5, 0))Layer number upper temperature sensor is connected to
IntegernHC1Upinteger(ceil(data.hHC1Up/(data.hTank/n)))Layer number upper end of heating coil 1 is connected to
IntegernHC1Lowinteger(floor(data.hHC1Low/(data.hTank/n)) + 1)Layer number lower end of heating coil 1 is connected to
IntegernHC2Upinteger(ceil(data.hHC2Up/(data.hTank/n)))Layer number upper end of heating coil 2 is connected to
IntegernHC2Lowinteger(floor(data.hHC2Low/(data.hTank/n)) + 1)Layer number lower end of heating coil 2 is connected to
IntegernHRinteger(AixLib.Utilities.Math.Functions.round(data.hHR/(data.hTank/n) + 0.5, 0))Layer number heating rod is connected to

Connectors

TypeNameDefaultDescription
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatportOutsideOuter heat port
Modelica.Blocks.Interfaces.RealOutputTTopTemperature at the top
Modelica.Blocks.Interfaces.RealOutputTBottomTemperature at the Bottom
Modelica.Fluid.Interfaces.FluidPort_afluidportTop1Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_afluidportBottom2Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bfluidportBottom1Fluid connector b (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bfluidportTop2Fluid connector b (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_aportHC1InFluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bportHC1OutFluid connector b (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_aportHC2InFluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bportHC2OutFluid connector b (positive design flow direction is from port_a to port_b)
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatingRod

Components

TypeNameDefaultDescription
HeatTransferheatTransferHeat transfer model
AixLib.Fluid.MixingVolumes.MixingVolume[n]layerLayer volumes
AixLib.Fluid.Storage.BaseClasses.StorageCovertopCover
AixLib.Fluid.Storage.BaseClasses.StorageMantle[n]storageMantle
AixLib.Fluid.Storage.BaseClasses.StorageCoverbottomCover
AixLib.Fluid.Storage.BaseClasses.HeatingCoilheatingCoil1
AixLib.Fluid.Storage.BaseClasses.HeatingCoilheatingCoil2

Contents

NameDescription
MediumHC1Medium model for HC1
MediumHC2Medium model for HC2
HeatTransfer

Revisions

  • April 10, 2025, by Fabian Wuellhorst:
    Add option to calculate pressure drops externally, for #1587.
  • November 14, 2022, by Laura Maier:
    Add adapt name and do some spring cleaning
  • November 27, 2019, by Philipp Mehrfeld:
    - #793
    - Replace MSL pipe by AixLib.Fluid.FixedResistances.PlugFlowPipe.
    - Add energyDynamics and tidy up with heat transfer models.
  • October 12, 2016  by Marcus Fuchs:
    Add comments and fix documentation
  • October 11, 2016  by Sebastian Stinner:
    Added to AixLib
  • March 25, 2015  by Ana Constantin:
    Uses components from MSL
  • December 10, 2013 by Kristian Huchtemann:
    Added documentation of storage and new heat transfer models.
  • October 2, 2013  by Ole Odendahl:
    Added documentation and formatted appropriately
  • February 19, 2013 by Sebastian Stinner:
    mistake in losses calculation corrected (thickness of "wall" and "insulation" was only considered once but has to be considered twice, additionally the components "wall" and "insulation" were exchanged )
    and mistake in bouyancy model "Wetter" corrected (bouyancy flows were flowing in the wrong direction)