modelStorageDetailed
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
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | 5 | Number of Layers |
| AixLib.DataBase.Storage.StorageDetailedBaseDataDefinition | data | ||
| Modelica.Units.SI.CoefficientOfHeatTransfer | hConIn | 100 | Model assumptions heat transfer coefficient water <-> wall |
| Modelica.Units.SI.CoefficientOfHeatTransfer | hConOut | 10 | Model assumptions heat transfer coefficient insulation <-> air |
| Integer | disHC1 | nHC1Up - nHC1Low + 1 | |
| Integer | disHC2 | nHC2Up - nHC2Low + 1 | |
| Boolean | inpLowLayDemand | (nLowerPortDemand == 1) | |
| Boolean | inpHigLayDemand | (nUpperPortDemand == n) | |
| Boolean | inpLowLaySupply | (nLowerPortSupply == 1) | |
| Boolean | inpHigLaySupply | (nUpperPortSupply == n) | |
| Integer | inpActLay | cat(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}) | |
| Integer | portsLayer | cat(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.Dynamics | energyDynamics (from LumpedVolumeDeclarations) | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | substanceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of independent mass fraction balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | traceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of trace substance balance: dynamic (3 initialization options) or steady state |
| Advanced › Dynamics | |||
| Modelica.Fluid.Types.Dynamics | massDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state |
| Initialization | |||
| Medium.AbsolutePressure | p_start (from LumpedVolumeDeclarations) | Medium.p_default | Start value of pressure |
| Medium.Temperature | T_start (from LumpedVolumeDeclarations) | Medium.T_default | Start value of temperature |
| Medium.MassFraction[Medium.nX] | X_start (from LumpedVolumeDeclarations) | Medium.X_default | Start 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 | |||
| Real | mSenFac (from LumpedVolumeDeclarations) | 1 | Factor for scaling the sensible thermal mass of the volume |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m1_flow_nominal | Nominal mass flow rate of fluid 1 ports | |
| Modelica.Units.SI.MassFlowRate | m2_flow_nominal | Nominal mass flow rate of fluid 2 ports | |
| Heating Coils and Rod › Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | mHC1_flow_nominal | Nominal mass flow rate of fluid 1 ports | |
| Modelica.Units.SI.MassFlowRate | mHC2_flow_nominal | Nominal mass flow rate of fluid 1 ports | |
| Heating Coils and Rod | |||
| Boolean | useHeatingCoil1 | true | Use Heating Coil1? |
| Boolean | useHeatingCoil2 | true | Use Heating Coil2? |
| Boolean | useHeatingRod | true | Use Heating Rod? |
| Modelica.Units.SI.CoefficientOfHeatTransfer | hConHC1 | 100 | Model assumptions Coefficient of Heat Transfer HC1 <-> Heating Water |
| Modelica.Units.SI.CoefficientOfHeatTransfer | hConHC2 | 100 | Model assumptions Coefficient of Heat Transfer HC2 <-> Heating Water |
| Boolean | upToDownHC1 | true | Heating Coil 1 orientation from up to down? |
| Boolean | upToDownHC2 | true | Heating Coil 2 orientation from up to down? |
| Initialization › Storage specific | |||
| Modelica.Units.SI.Temperature[n] | TStart | fill(298.15, n) | Start Temperature of fluid in each layer. e.g. for a 3 layer model: {20, 20, 20} |
| Modelica.Units.SI.Temperature | TStartWall | 293.15 | Starting Temperature of wall in K |
| Modelica.Units.SI.Temperature | TStartIns | 293.15 | Starting Temperature of insulation in K |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small_HC1 | 1E-4*abs(mHC1_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Modelica.Units.SI.MassFlowRate | m_flow_small_HC2 | 1E-4*abs(mHC2_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Modelica.Units.SI.MassFlowRate | m_flow_small | 1E-4*abs(m1_flow_nominal + m2_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Assumptions | |||
| Boolean | allowFlowReversal_layers | true | = false to simplify equations, assuming, but not enforcing, no flow reversal. Used only if model has two ports. |
| Boolean | allowFlowReversal_HC1 | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Boolean | allowFlowReversal_HC2 | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Heating Coils and Rod › Pressure losses | |||
| Boolean | disableComputeFlowResistance | false | =false to include the pressure drop in a valve dpFixed_nominal |
| Modelica.Units.SI.PressureDifference | dpHC1Fixed_nominal | heatingCoil1.dpFixed_nominal | Pressure drop to include in valve models connected in series to this model |
| Modelica.Units.SI.PressureDifference | dpHC2Fixed_nominal | heatingCoil2.dpFixed_nominal | Pressure drop to include in valve models connected in series to this model |
| Advanced › Connection Layers: !Any modification will overwrite the data record behaviour! | |||
| Integer | nLowerPortSupply | integer(max(AixLib.Utilities.Math.Functions.round(data.hLowerPortSupply/(data.hTank/n) + 0.5, 0), 1)) | Layer number lower end of supply is connected to |
| Integer | nUpperPortSupply | integer(min(AixLib.Utilities.Math.Functions.round(data.hUpperPortSupply/(data.hTank/n) + 0.5, 0), n)) | Layer number upper end of supply is connected to |
| Integer | nLowerPortDemand | integer(max(AixLib.Utilities.Math.Functions.round(data.hLowerPortDemand/(data.hTank/n) + 0.5, 0), 1)) | Layer number lower end of demand is connected to |
| Integer | nUpperPortDemand | integer(min(AixLib.Utilities.Math.Functions.round(data.hUpperPortDemand/(data.hTank/n) + 0.5, 0), n)) | Layer number upper end of demand is connected to |
| Integer | nTS1 | integer(AixLib.Utilities.Math.Functions.round(data.hTS1/(data.hTank/n) + 0.5, 0)) | Layer number lower temperature sensor is connected to |
| Integer | nTS2 | integer(AixLib.Utilities.Math.Functions.round(data.hTS2/(data.hTank/n) + 0.5, 0)) | Layer number upper temperature sensor is connected to |
| Integer | nHC1Up | integer(ceil(data.hHC1Up/(data.hTank/n))) | Layer number upper end of heating coil 1 is connected to |
| Integer | nHC1Low | integer(floor(data.hHC1Low/(data.hTank/n)) + 1) | Layer number lower end of heating coil 1 is connected to |
| Integer | nHC2Up | integer(ceil(data.hHC2Up/(data.hTank/n))) | Layer number upper end of heating coil 2 is connected to |
| Integer | nHC2Low | integer(floor(data.hHC2Low/(data.hTank/n)) + 1) | Layer number lower end of heating coil 2 is connected to |
| Integer | nHR | integer(AixLib.Utilities.Math.Functions.round(data.hHR/(data.hTank/n) + 0.5, 0)) | Layer number heating rod is connected to |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heatportOutside | Outer heat port | |
| Modelica.Blocks.Interfaces.RealOutput | TTop | Temperature at the top | |
| Modelica.Blocks.Interfaces.RealOutput | TBottom | Temperature at the Bottom | |
| Modelica.Fluid.Interfaces.FluidPort_a | fluidportTop1 | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_a | fluidportBottom2 | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | fluidportBottom1 | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | fluidportTop2 | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_a | portHC1In | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | portHC1Out | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_a | portHC2In | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | portHC2Out | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heatingRod |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| HeatTransfer | heatTransfer | Heat transfer model | |
| AixLib.Fluid.MixingVolumes.MixingVolume[n] | layer | Layer volumes | |
| AixLib.Fluid.Storage.BaseClasses.StorageCover | topCover | ||
| AixLib.Fluid.Storage.BaseClasses.StorageMantle[n] | storageMantle | ||
| AixLib.Fluid.Storage.BaseClasses.StorageCover | bottomCover | ||
| AixLib.Fluid.Storage.BaseClasses.HeatingCoil | heatingCoil1 | ||
| AixLib.Fluid.Storage.BaseClasses.HeatingCoil | heatingCoil2 |
Contents
| Name | Description |
|---|---|
| Medium model for HC1 | |
| Medium model for HC2 | |
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)