blockModeCondenserLoop

Block that determines the condenser loop mode

Information

Tank charge fraction and rate of change

The tank charge fraction fraChaTan (-) is computed as the 5-minute moving average of the following expression: (∑i (TTani - min(TTanSet)) / (max(TTanSet) - min(TTanSet)) / nTTan - fraUslTan) / (1 - fraUslTan), where TTani is the measurement from the i-th temperature sensor along the vertical axis of the tank, TTanSet are the tank temperature setpoints (two values for each tank cycle), nTTan is the number of temperature sensors along the vertical axis of the tank, fraUslTan is the useless fraction of the tank which is computed as follows: fraUslTan = ((max(TTanSet[2]) - min(TTanSet)) / (max(TTanSet) - min(TTanSet)) * hThe + hHee) / hTan, where hThe is the height of the thermocline (m by default) which is considered useless only during the second tank cycle, hHee is the upper and lower heel heights above and below the diffusers (m by default), hTan is the tank height (used as an approximation for the normal operating level of the tank at minimum temperature). Please see the detailed calculation of the tank charge fraction in Buildings.DHC.Plants.Combined.Controls.BaseClasses.TankChargeFraction.

The rate of change of the tank charge fraction ratFraChaTan (h-1) is computed over several time periods (10, 30, 120, 240 and 360 min) as: ratFraChaTan(Δt) = (fraChaTan(t) - fraChaTan(t - Δt)) / Δt * 3600, where Δt is the time period in seconds. Please see the detailed calculation of the rate of change in Buildings.DHC.Plants.Combined.Controls.BaseClasses.TankChargeFractionRate.

Operating modes

Three operating modes are defined within Buildings.DHC.Plants.Combined.Controls.ModeCondenserLoop.

Charge Assist

The mode is enabled whenever any of the following conditions is true for min. Any of the rates of change exceeds the values specified with the parameter ratFraChaTanLim. The tank charge fraction is lower than 97 % and 1 - fraChaTan > 0.08 * abs(nHouToWarUp - 2), where fraChaTan is the tank charge fraction and nHouToWarUp is the number of hours between the present time and the start time of morning warmup (4 AM by default). The 2-hour offset forces Charge Assist mode two hours before morning warmup if the tank is not fully charged. Please see Buildings.DHC.Plants.Combined.Controls.BaseClasses.HoursToNextWarmup for the calculation of the number of hours to next warmup period.

The mode is disabled whenever none of the Enable conditions is true for 15 min, or the flow rate out of the lower port of the tank is positive for min and the temperature at the bottom of the tank is higher than the maximum tank temperature setpoint minus K for min.

Heat Rejection

The mode is enabled whenever all of the following conditions are true. The Charge Assist mode is disabled for min. The flow rate out of the lower port of the tank is positive for min. The tank charge fraction is higher than 97 % for min or the temperature at the bottom of the tank is higher than the maximum tank temperature setpoint minus K for min.

The mode is disabled whenever there is reverse flow through the cooling heat exchanger for min.

Tank Charge/Discharge

The mode is enabled whenever neither Charge Assist nor Heat Rejection mode is enabled.

Parameters

TypeNameDefaultDescription
RealmConWatHexCoo_flow_nominalDesign total CW mass flow rate through condenser barrels (all units)
RealQHeaPum_flow_nominalDesign heat flow from heat pumps (all units)
IntegernTTan2Number of tank temperature points
Real[5]ratFraChaTanLim{-0.3, -0.2, -0.15, -0.10, -0.08}Rate of change of tank charge fraction (over 10, 30, 120, 240, and 360') that triggers Charge Assist (<0)
Realcp_defaultBuildings.Utilities.Psychrometrics.Constants.cpWatLiqSpecific heat capacity of the fluid
CW loop, TES tank and heat pumps
Real[2,2]TTanSetTank temperature setpoints: 2 cycles with 2 setpoints
RealfraUslTanUseless fraction of TES

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.RealInputmConWatHexCoo_flowCW mass flow rate through secondary (plant) side of HX
Buildings.Controls.OBC.CDL.Interfaces.RealInputmConWatCon_flowCW condenser loop mass flow rate
Buildings.Controls.OBC.CDL.Interfaces.RealInputTConWatConChiLvgChiller and HRC leaving CW temperature
Buildings.Controls.OBC.CDL.Interfaces.RealInputTConWatConRetCWC return temperature
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.IntegerOutputmodeCondenser loop operating mode

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Reals.LessThreshold[5]lesThrCompare rate of change to threshold
Buildings.Controls.OBC.CDL.Logical.Timer[5]timCondition is true for given time
Buildings.Controls.OBC.CDL.Logical.MultiOranyEnaTruAny of the enable conditions is true
Buildings.Controls.OBC.CDL.Reals.GreatercriWarUpEnable criterion based on time to warmup
Buildings.Controls.OBC.CDL.Logical.AndcriWarUpAndChaLowBoth enable criteria met
Buildings.Controls.OBC.CDL.Reals.LessThresholdcriChaLowLow charge fraction criterion
Buildings.Controls.OBC.CDL.Logical.Not[6]enaFalTrue if enabling condition is false
Buildings.Controls.OBC.CDL.Logical.MultiAndnoEnaTruAndRatConNone of the enable conditions is true AND HR rate condition true
Buildings.Controls.OBC.CDL.Logical.Timertim2None of the enabling conditions is true for given time
Buildings.Controls.OBC.CDL.Reals.GreaterThresholdcriFloDisable criterion based on flow rate
Buildings.Controls.OBC.CDL.Reals.GreaterThresholdcriTemDisable criterion based on temperature
Buildings.Controls.OBC.CDL.Logical.AndcriFloAndTemFlow criterion and temperature criterion both true
Buildings.Controls.OBC.CDL.Logical.TimertimCriFloCriterion true for given time
Buildings.Controls.OBC.CDL.Logical.OrdisChaAny of the disabling conditions is true
Buildings.Controls.OBC.CDL.Logical.LatchenaChaEnable charge assist mode
Buildings.Controls.OBC.CDL.Logical.TimertimNotCha
Buildings.Controls.OBC.CDL.Logical.TimertimCriTemCriterion true for given time
Buildings.Controls.OBC.CDL.Logical.NotcriFraChaHigHigh charge fraction criterion
Buildings.Controls.OBC.CDL.Logical.AndallEnaTruAll enable criteria true
Buildings.Controls.OBC.CDL.Logical.AndcriTemOrCriChaHigAndTimCriFloTemperature or high charge fraction criterion true and given time criterion true
Buildings.Controls.OBC.CDL.Logical.TimertimCriFraChaHig
Buildings.Controls.OBC.CDL.Logical.OrcriTemOrCriChaHigTemperature criterion or high charge fraction criterion true
Buildings.Controls.OBC.CDL.Reals.LessThresholdcriFlo1
Buildings.Controls.OBC.CDL.Logical.TimertimCriFlo1Criterion true for given time
Buildings.Controls.OBC.CDL.Logical.LatchenaRejEnable heat rejection mode
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantmodTanTank Charge/Discharge mode
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantmodRejHeat rejection mode
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantmodChaCharge assist mode
Buildings.Controls.OBC.CDL.Integers.SwitchintSwi
Buildings.Controls.OBC.CDL.Integers.SwitchintSwi1
Buildings.Controls.OBC.CDL.Logical.NotisChaDisCharge assist mode disabled
Buildings.Controls.OBC.CDL.Logical.AndenaAndNotDisReset enable condition when disable is true to trigger latch block when (enable, disable) becomes (true, false) again
Buildings.Controls.OBC.CDL.Logical.NotnotDisNot disabled
Buildings.Controls.OBC.CDL.Logical.AndenaAndNotDis1Reset enable condition when disable is true to trigger latch block when (enable, disable) becomes (true, false) again
Buildings.Controls.OBC.CDL.Logical.NotnotDis1Not disabled
Buildings.Controls.OBC.CDL.Logical.Timertim1Condition is true for given time
Buildings.Controls.OBC.CDL.Reals.SubtractdelTemCompute Delta-T
Buildings.Controls.OBC.CDL.Reals.MultiplyfloOutHeaPumCompute HP heat flow rate output
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameterfloCapCompute capacity flow rate
Buildings.Controls.OBC.CDL.Reals.SubtractdelTem1Compute Delta-T
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameterfloCap1Compute capacity flow rate
Buildings.Controls.OBC.CDL.Reals.MultiplyfloChaTanCompute tank charge rate
Buildings.Controls.OBC.CDL.Reals.SubtractratHeaRecCompute heat recovery rate
Buildings.Controls.OBC.CDL.Reals.GreaterThresholdcriRatHeaRecDisable criterion based on heat recovery rate
Buildings.DHC.Plants.Combined.Controls.BaseClasses.TankChargeFractiontanChaFraTank charge fraction used for control logic
Buildings.DHC.Plants.Combined.Controls.BaseClasses.TankChargeFractionRatetanChaFraRatChange rate of the tank charge fraction
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantoneConstant one
Buildings.Controls.OBC.CDL.Reals.Subtractsub3Compute variable used to evaluate warmup criterion
Buildings.DHC.Plants.Combined.Controls.BaseClasses.HoursToNextWarmupnexWarHouNumber of hours to next warmup period, (set at 4 AM by default)
Buildings.Controls.OBC.CDL.Reals.SubtractsubFind difference
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantconConstant 2
Buildings.Controls.OBC.CDL.Reals.Absabs1Absolute value
Buildings.Controls.OBC.CDL.Reals.MultiplyByParametergaiGain factor

Revisions

  • February 25, 2025, by Jianjun Hu:
    Reimplemented it to comply with CDL specification. This is for #4110.
  • August 29, 2023, by Hongxiang Fu:
    Because of the removal of Logical.And3 based on ASHRAE 231P, replaced it with a stack of two Logical.And blocks. This is for #2465.
  • February 24, 2023, by Antoine Gautier:
    First implementation.