blockTankCycle

Block that determines the tank cycle flag

Information

The tank operating conditions should match the operating limits and selection conditions of the chillers and HRCs. The highest temperature (at the top of the tank) should be limited by the maximum evaporator entering temperature per manufacturer’s recommendations. The lowest temperature (at the bottom of the tank) should be limited by the design CHW supply temperature. This gives the tank maximum ΔT and the actual storage capacity. However, this value is likely above the maximum ΔT that chillers and HRCs can achieve across the condenser or evaporator barrel (typically 11 K). Therefore, in order to fully leverage the TES capacity, two temperature cycles are needed.

The first tank cycle (higher temperature setpoint) is activated whenever all of the following conditions are true.

  • All tank temperature sensors measure a value higher than the mean setpoint value of the second tank cycle for min.
  • The flow rate out of the lower port of the tank is positive (tank is charging) for min.

The second tank cycle (lower temperature setpoint) is activated whenever both of the following conditions are true.

  • All tank temperature sensors measure a value lower than the mean setpoint value of the first tank cycle for min.
  • The flow rate out of the lower port of the tank is negative (tank is discharging) for min.

At initial time the tank cycle flag is set based on the tank temperature condition only from the above two clauses without a time delay. If neither condition is true, the tank cycle flag is set based on the flow condition only in the above two clauses without a time delay.

The minimum runtime of each tank cycle is fixed at 30 min.

Parameters

TypeNameDefaultDescription
RealmConWatHexCoo_flow_nominalDesign total CW mass flow rate through condenser barrels (all units)
IntegernTTan0Number of tank temperature points
CW loop, TES tank and heat pumps
Real[2,2]TTanSetTank temperature setpoints: 2 cycles with 2 setpoints

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.RealInputmConWatOutTan_flowMass flow rate out of lower port of TES tank (>0 when charging)
Buildings.Controls.OBC.CDL.Interfaces.RealInput[nTTan]TTanTES tank temperature
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutputidxCycTanIndex of active tank cycle

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold[nTTan]criTem1Temperature criterion for first tank cycle
Buildings.Controls.OBC.CDL.Logical.MultiAndallCriTem1All temperature criteria met
Buildings.Controls.OBC.CDL.Reals.GreaterThresholdcriFlo1Flow criterion for first tank cycle
Buildings.Controls.OBC.CDL.Reals.LessThreshold[nTTan]criTem2Temperature criterion for first tank cycle
Buildings.Controls.OBC.CDL.Logical.MultiAndallCriTem2All temperature criteria met
Buildings.Controls.OBC.CDL.Conversions.BooleanToIntegerbooToIntConvert
Buildings.Controls.OBC.CDL.Logical.Oror2Neither of temperature criterion is true
Buildings.Controls.OBC.CDL.Conversions.BooleanToIntegerbooToInt3Convert
Buildings.Controls.OBC.CDL.Conversions.BooleanToIntegerbooToInt4Convert
Buildings.Controls.OBC.CDL.Integers.MaxmaxInt1Set cycle index as maximum
Buildings.Controls.OBC.CDL.Logical.AndallCri2All criteria met
Buildings.Controls.OBC.CDL.Logical.AndallCri1All criteria met
Buildings.Controls.OBC.CDL.Integers.SwitchidxIniIndex at initial time
Buildings.Controls.OBC.CDL.Logical.TimertimAllCri1All criteria met for given time
Buildings.Controls.OBC.CDL.Logical.TimertimAllCri2All criteria met for given time
Buildings.Controls.OBC.CDL.Integers.SwitchintSwiSwitch index
Buildings.Controls.OBC.CDL.Integers.Sources.Constantidx1Index
Buildings.Controls.OBC.CDL.Integers.SwitchintSwi1Switch index
Buildings.Controls.OBC.CDL.Integers.Sources.Constantidx2Index
Buildings.Controls.OBC.CDL.Logical.NotcriFlo2Flow criterion for second tank cycle
Buildings.DHC.Plants.Combined.Controls.BaseClasses.IntegerArrayHoldholHold for minimum runtime
Buildings.Controls.OBC.CDL.Integers.GreaterThresholdintGreThrConvert the cycling index to boolean
Buildings.Controls.OBC.CDL.Logical.Prepre1Value from previou state
Buildings.Controls.OBC.CDL.Conversions.BooleanToIntegerbooToInt1Reverted back to cycling index

Revisions

  • February 24, 2023, by Antoine Gautier:
    First implementation.