diff --git a/src/EnergyPlus/Coils/CoilCoolingDX.cc b/src/EnergyPlus/Coils/CoilCoolingDX.cc index 7f7daafb556..00ecb4fa3e9 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDX.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDX.cc @@ -672,6 +672,8 @@ void CoilCoolingDX::simulate(EnergyPlusData &state, bool const singleMode, Real64 const LoadSHR) { + assert(speedNum != 0); + if (this->myOneTimeInitFlag) { this->oneTimeInit(state); this->myOneTimeInitFlag = false; @@ -777,7 +779,7 @@ void CoilCoolingDX::simulate(EnergyPlusData &state, this->wasteHeatEnergyRate = this->performance.wasteHeatRate; this->wasteHeatEnergy = this->performance.wasteHeatRate * reportingConstant; - this->partLoadRatioReport = speedNum == 1 ? 1.0 : speedRatio; + this->partLoadRatioReport = speedNum > 1 ? 1.0 : speedRatio; this->speedNumReport = speedNum; this->speedRatioReport = speedRatio; diff --git a/src/EnergyPlus/UnitarySystem.cc b/src/EnergyPlus/UnitarySystem.cc index f4905ed3d97..0a9242bfd48 100644 --- a/src/EnergyPlus/UnitarySystem.cc +++ b/src/EnergyPlus/UnitarySystem.cc @@ -11660,24 +11660,25 @@ namespace UnitarySystems { } break; case DataHVACGlobals::CoilDX_Cooling: { // CoilCoolingDX bool const singleMode = (this->m_SingleMode == 1); + CoilPLR = 0.0; if (this->m_ControlType == UnitarySysCtrlType::Setpoint) { if (CompressorOn == DataHVACGlobals::CompressorOperation::On) { CoilPLR = (this->m_CoolingSpeedNum > 1) ? 1.0 : PartLoadRatio; - } else - CoilPLR = 0.0; + } } else { if (this->m_EMSOverrideCoilSpeedNumOn) { CoilPLR = this->m_CoolingSpeedRatio; } else { - if (CompressorOn == DataHVACGlobals::CompressorOperation::Off) { - this->m_CoolingSpeedNum = 1; // Bypass mixed-speed calculations in called functions - CoilPLR = 0.0; - } else { - if (singleMode) { - CoilPLR = (m_CoolingSpeedNum == 1) ? PartLoadRatio - : 0.0; // singleMode allows cycling, but not part load operation at higher speeds + if (state.dataUnitarySystems->CoolingLoad) { + if (CompressorOn == DataHVACGlobals::CompressorOperation::Off) { + this->m_CoolingSpeedNum = 1; // Bypass mixed-speed calculations in called functions } else { - CoilPLR = PartLoadRatio; + if (singleMode) { + CoilPLR = (m_CoolingSpeedNum == 1) ? PartLoadRatio + : 0.0; // singleMode allows cycling, but not part load operation at higher speeds + } else { + CoilPLR = PartLoadRatio; + } } } } diff --git a/src/EnergyPlus/UnitarySystem.hh b/src/EnergyPlus/UnitarySystem.hh index f6426deecde..5ddccfdad38 100644 --- a/src/EnergyPlus/UnitarySystem.hh +++ b/src/EnergyPlus/UnitarySystem.hh @@ -372,7 +372,7 @@ namespace UnitarySystems { Real64 m_CoolingCycRatio = 0.0; Real64 m_CoolingSpeedRatio = 0.0; - int m_CoolingSpeedNum = 0; + int m_CoolingSpeedNum = 1; int m_EconoSpeedNum = 0; Real64 m_EconoPartLoadRatio = 0;