Skip to content

Commit

Permalink
removed unused VAR and modified unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigusse committed Mar 5, 2024
1 parent b5547be commit bc1738c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/EnergyPlus/PlantLoopHeatPumpEIR.cc
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand All @@ -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);
Expand All @@ -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);
}
}

Expand Down

5 comments on commit bc1738c

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eirPlantLoopHP-HeatPump-powerEnergy (Nigusse) - Win64-Windows-10-VisualStudio-16: OK (2766 of 2766 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eirPlantLoopHP-HeatPump-powerEnergy (Nigusse) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3594 of 3595 tests passed, 0 test warnings)

Messages:\n

  • 1 test had: ESO big diffs.

Failures:\n

regression Test Summary

  • Passed: 806
  • Failed: 1

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eirPlantLoopHP-HeatPump-powerEnergy (Nigusse) - x86_64-MacOS-10.18-clang-15.0.0: OK (3552 of 3554 tests passed, 0 test warnings)

Messages:\n

  • 1 test had: ESO big diffs.

Failures:\n

regression Test Summary

  • Passed: 786
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eirPlantLoopHP-HeatPump-powerEnergy (Nigusse) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (791 of 791 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eirPlantLoopHP-HeatPump-powerEnergy (Nigusse) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1978 of 1978 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.