From ebe1e6c3b182551e2f74c9126f3b2fa3a8cbe9cd Mon Sep 17 00:00:00 2001 From: Bereket Nigusse Date: Mon, 29 Jul 2024 08:52:49 -0400 Subject: [PATCH] Initial fix --- src/EnergyPlus/PlantLoopHeatPumpEIR.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc index 9eff1c9a64f..bd864151e5f 100644 --- a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc +++ b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc @@ -486,13 +486,17 @@ void EIRPlantLoopHeatPump::calcAvailableCapacity(EnergyPlusData &state, Real64 c } } if (this->heatRecoveryHeatPump) { + this->setPartLoadAndCyclingRatio(state, partLoadRatio); + this->calcLoadSideHeatTransfer(state, availableCapacity); + this->calcPowerUsage(state); + Real64 sourceSideHeatTransfer = this->loadSideHeatTransfer + this->powerUsage; + // check to see if souce side outlet temp exceeds limit and reduce PLR if necessary auto &thisSourcePlantLoop = state.dataPlnt->PlantLoop(this->sourceSidePlantLoc.loopNum); Real64 const CpSrc = FluidProperties::GetSpecificHeatGlycol( state, thisSourcePlantLoop.FluidName, this->sourceSideInletTemp, thisSourcePlantLoop.FluidIndex, "EIRPlantLoopHeatPump::doPhysics()"); Real64 const sourceMCp = this->sourceSideMassFlowRate * CpSrc; - Real64 const tempSourceOutletTemp = - this->calcSourceOutletTemp(this->sourceSideInletTemp, (availableCapacity * partLoadRatio) / sourceMCp); + Real64 const tempSourceOutletTemp = this->calcSourceOutletTemp(this->sourceSideInletTemp, sourceSideHeatTransfer / sourceMCp); if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRHeating && tempSourceOutletTemp < this->minSourceTempLimit) { partLoadRatio *= (this->sourceSideInletTemp - this->minSourceTempLimit) / (this->sourceSideInletTemp - tempSourceOutletTemp); } else if (tempSourceOutletTemp > this->maxSourceTempLimit) {