diff --git a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc index 933dc69f8b1..aa2fbfcb986 100644 --- a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc +++ b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc @@ -1862,8 +1862,7 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) auto &thisInletNode = state.dataLoopNodes->Node(this->loadSideNodes.inlet); auto &thisOutletNode = state.dataLoopNodes->Node(this->loadSideNodes.outlet); auto &sim_component = DataPlant::CompData::getPlantComponent(state, this->loadSidePlantLoc); - bool RunFlag = true; - if ((this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpFuelFiredHeating && currentLoad <= 0.0) || !RunFlag) { + if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpFuelFiredHeating && currentLoad <= 0.0) { if (sim_component.FlowCtrl == DataBranchAirLoopPlant::ControlType::SeriesActive) this->loadSideMassFlowRate = thisInletNode.MassFlowRate; this->resetReportingVariables(); return; diff --git a/tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc b/tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc index f34d04b786c..682592cab74 100644 --- a/tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc +++ b/tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc @@ -4306,6 +4306,7 @@ TEST_F(EnergyPlusFixture, GAHP_HeatingSimulate_AirSource_with_Defrost) // for now we know the order is maintained, so get each heat pump object EIRFuelFiredHeatPump *thisHeatingPLHP = &state->dataEIRFuelFiredHeatPump->heatPumps[0]; + auto thisEIRPlantLoopHP = &(*(EIRPlantLoopHeatPump *)thisHeatingPLHP); // do a bit of extra wiring up to the plant PLHPPlantLoadSideComp.Name = thisHeatingPLHP->name; @@ -4363,6 +4364,7 @@ TEST_F(EnergyPlusFixture, GAHP_HeatingSimulate_AirSource_with_Defrost) // expect it to meet setpoint and have some pre-evaluated conditions // EXPECT_NEAR(specifiedLoadSetpoint, thisHeatingPLHP->loadSideOutletTemp, 0.001); EXPECT_NEAR(curLoad, thisHeatingPLHP->loadSideHeatTransfer, 0.001); + EXPECT_NEAR(18020.0, thisEIRPlantLoopHP->powerUsage, 0.001); } // now we can call it again from the load side, but this time there is load (still firsthvac, unit cannot meet load) @@ -4381,6 +4383,7 @@ TEST_F(EnergyPlusFixture, GAHP_HeatingSimulate_AirSource_with_Defrost) thisHeatingPLHP->simulate(*state, myLoadLocation, firstHVAC, curLoad, runFlag); EXPECT_NEAR(28800.0, thisHeatingPLHP->fuelRate, 0.001); EXPECT_NEAR(25920000.0, thisHeatingPLHP->fuelEnergy, 0.001); + EXPECT_NEAR(18020.0, thisEIRPlantLoopHP->powerUsage, 0.001); // expect it to miss setpoint and be at max capacity // EXPECT_NEAR(44.402, thisHeatingPLHP->loadSideOutletTemp, 0.001); // EXPECT_NEAR(availableCapacity, thisHeatingPLHP->loadSideHeatTransfer, 0.001); @@ -4402,6 +4405,7 @@ TEST_F(EnergyPlusFixture, GAHP_HeatingSimulate_AirSource_with_Defrost) // expect it to miss setpoint and be at max capacity EXPECT_NEAR(45.0, thisHeatingPLHP->loadSideOutletTemp, 0.001); EXPECT_NEAR(30.0, thisHeatingPLHP->sourceSideOutletTemp, 0.001); + EXPECT_NEAR(0.0, thisEIRPlantLoopHP->powerUsage, 0.001); } }