Skip to content

Commit

Permalink
Fix timed defrost.
Browse files Browse the repository at this point in the history
  • Loading branch information
lymereJ committed Dec 14, 2023
1 parent 4ccd87a commit 43dfa02
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
20 changes: 15 additions & 5 deletions src/EnergyPlus/DXCoils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
8 changes: 3 additions & 5 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 43dfa02

Please sign in to comment.