From 43dfa02f5b348609e4f3a4a908f4209001116873 Mon Sep 17 00:00:00 2001 From: "Lerond, Jeremy" Date: Thu, 14 Dec 2023 15:03:11 -0800 Subject: [PATCH] Fix timed defrost. --- src/EnergyPlus/DXCoils.cc | 20 ++++++++++++++----- src/EnergyPlus/HVACVariableRefrigerantFlow.cc | 8 +++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 29be1fed671..fc9ad222eac 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -11174,10 +11174,8 @@ void CalcDXHeatingCoil(EnergyPlusData &state, // Calculate defrost adjustment factors depending on defrost control type if (thisDXCoil.DefrostControl == StandardRatings::HPdefrostControl::Timed) { FractionalDefrostTime = thisDXCoil.DefrostTime; - if (FractionalDefrostTime > 0.0) { - HeatingCapacityMultiplier = 0.909 - 107.33 * OutdoorCoildw; - InputPowerMultiplier = 0.90 - 36.45 * OutdoorCoildw; - } + HeatingCapacityMultiplier = 0.909 - 107.33 * OutdoorCoildw; + InputPowerMultiplier = 0.90 - 36.45 * OutdoorCoildw; } else { // else defrost control is on-demand FractionalDefrostTime = 1.0 / (1.0 + 0.01446 / OutdoorCoildw); HeatingCapacityMultiplier = 0.875 * (1.0 - FractionalDefrostTime); @@ -13796,7 +13794,7 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, DefrostPowerLS = 0.0; DefrostPowerHS = 0.0; - // Check outdoor temperature to determine of defrost is active + // Check outdoor temperature to determine if defrost is active if (OutdoorDryBulb <= thisDXCoil.MaxOATDefrost) { // Calculate defrost adjustment factors depending on defrost control type if (thisDXCoil.DefrostControl == StandardRatings::HPdefrostControl::Timed) { @@ -13829,6 +13827,12 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, } } + // Make no adjustment if there is no defrost power available + if (thisDXCoil.DefrostPower == 0.0) { + HeatingCapacityMultiplier = 1.0; + InputPowerMultiplier = 1.0; + } + TotCapLSAdj = TotCapLS * HeatingCapacityMultiplier; TotCapHSAdj = TotCapHS * HeatingCapacityMultiplier; @@ -14039,6 +14043,12 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, } } + // Make no adjustment if there is no defrost power available + if (thisDXCoil.DefrostPower == 0.0) { + HeatingCapacityMultiplier = 1.0; + InputPowerMultiplier = 1.0; + } + // Modify total heating capacity based on defrost heating capacity multiplier TotCapAdj = TotCap * HeatingCapacityMultiplier; diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index d0e65502f05..5099baf93e8 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -870,10 +870,8 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) // Calculate defrost adjustment factors depending on defrost control type if (vrf.DefrostControl == StandardRatings::HPdefrostControl::Timed) { FractionalDefrostTime = vrf.DefrostFraction; - if (FractionalDefrostTime > 0.0) { - HeatingCapacityMultiplier = 0.909 - 107.33 * OutdoorCoildw; - InputPowerMultiplier = 0.90 - 36.45 * OutdoorCoildw; - } + HeatingCapacityMultiplier = 0.909 - 107.33 * OutdoorCoildw; + InputPowerMultiplier = 0.90 - 36.45 * OutdoorCoildw; } else { // else defrost control is on-demand FractionalDefrostTime = 1.0 / (1.0 + 0.01446 / OutdoorCoildw); HeatingCapacityMultiplier = 0.875 * (1.0 - FractionalDefrostTime); @@ -916,7 +914,7 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) vrf.DefrostPower = DefrostEIRTempModFac * (vrf.HeatingCapacity / 1.01667) * FractionalDefrostTime; - } else { // Defrost strategy is resistive + } else { // Defrost strategy is resistive vrf.DefrostPower = vrf.DefrostCapacity * FractionalDefrostTime; } }