Skip to content

Commit

Permalink
Merge pull request #10141 from NREL/fix_inf_cap_for_wahp
Browse files Browse the repository at this point in the history
Prevent division by zero in WAHP heating design day calculations
  • Loading branch information
Myoldmopar committed Aug 16, 2023
2 parents 8b23fc9 + 0b37b49 commit d0d8fa7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/EnergyPlus/WaterToAirHeatPumpSimple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1333,16 +1333,16 @@ namespace WaterToAirHeatPumpSimple {
Real64 VolFlowRate;
Real64 CoolCapAtPeak; // Load on the cooling coil at cooling design conditions
Real64 HeatCapAtPeak; // Load on the heating coil at heating design conditions
Real64 PeakTotCapTempModFac = 0.0; // Peak total cooling capacity curve modifier
Real64 RatedTotCapTempModFac = 0.0; // Rated total cooling capacity curve modifier
Real64 PeakHeatCapTempModFac = 0.0; // Peak heating capacity curve modifier
Real64 PeakTotCapTempModFac = 1.0; // Peak total cooling capacity curve modifier
Real64 RatedTotCapTempModFac = 1.0; // Rated total cooling capacity curve modifier
Real64 PeakHeatCapTempModFac = 1.0; // Peak heating capacity curve modifier
Real64 DesignEntWaterTemp; // Design entering coil water temperature
Real64 SensCapAtPeak; // Sensible load on the cooling coil at cooling design conditions
Real64 PeakSensCapTempModFac = 0.0; // Peak sensible cooling capacity curve modifier
Real64 RatedSensCapTempModFac = 0.0; // Rated sensible cooling capacity curve modifier
Real64 RatedHeatCapTempModFac = 0.0; // Rated heating capacity curve modifier
Real64 RatedCoolPowerTempModFac = 0.0; // Rated cooling power curve modifier
Real64 RatedHeatPowerTempModFac = 0.0; // Rated heating power curve modifier
Real64 PeakSensCapTempModFac = 1.0; // Peak sensible cooling capacity curve modifier
Real64 RatedSensCapTempModFac = 1.0; // Rated sensible cooling capacity curve modifier
Real64 RatedHeatCapTempModFac = 1.0; // Rated heating capacity curve modifier
Real64 RatedCoolPowerTempModFac = 1.0; // Rated cooling power curve modifier
Real64 RatedHeatPowerTempModFac = 1.0; // Rated heating power curve modifier
Real64 RatedCapCoolTotalDesCDD; // Rated total cooling coil capacity determined at cooling design conditions
constexpr Real64 Tref(283.15); // Refrence Temperature for performance curves,10C [K]
int TimeStepNumAtMax;
Expand Down
2 changes: 1 addition & 1 deletion tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ TEST_F(EnergyPlusFixture, WaterToAirHeatPumpSimpleTest_SizeHVACWaterToAirRatedCo
state->dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(2).RatioRatedHeatRatedTotCoolCap = 1.23;

state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).DesCoolVolFlow = 0.20;
state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).DesHeatVolFlow = 0.0;
state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).DesHeatVolFlow = 0.0004;
state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).CoolDesTemp = 13.0;
state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).HeatDesTemp = 40;
state->dataSize->FinalZoneSizing(state->dataSize->CurZoneEqNum).CoolDesHumRat = 0.0075;
Expand Down

5 comments on commit d0d8fa7

@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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2698 of 2698 tests passed, 0 test warnings)

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.

develop (Myoldmopar) - x86_64-MacOS-10.17-clang-13.0.0: OK (2677 of 2677 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2676 of 2676 tests passed, 0 test warnings)

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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1902 of 1902 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (777 of 777 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.