Skip to content

Commit

Permalink
Initial fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigusse committed Jul 29, 2024
1 parent 18f5c3f commit ebe1e6c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/EnergyPlus/PlantLoopHeatPumpEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ebe1e6c

Please sign in to comment.