Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix heating energy calculation and reporting errors for gas fired and exhaust fired absorption chillerheater models #8645

Merged
8 changes: 7 additions & 1 deletion src/EnergyPlus/ChillerExhaustAbsorption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,13 @@ namespace EnergyPlus::ChillerExhaustAbsorption {
}

// Calculate operating part load ratio for cooling
lHeatPartLoadRatio = lHeatingLoad / lAvailableHeatingCapacity;
if (lAvailableHeatingCapacity <= 0.0) {
lAvailableHeatingCapacity = 0.0;
lHeatPartLoadRatio = 0.0;
} else
{
Comment on lines +1894 to +1895
Copy link
Contributor

Choose a reason for hiding this comment

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

Straightforward change to protect against divide by zero here and in the next chiller.
Minor formatting issue here, but that will get cleaned up with a global clang format sweep, so not holding this up for that.

lHeatPartLoadRatio = lHeatingLoad / lAvailableHeatingCapacity;
}

// Calculate ThermalEnergy consumption for heating
// ThermalEnergy used for heating availCap * HIR * HIR-FT * HIR-FPLR
Expand Down
7 changes: 6 additions & 1 deletion src/EnergyPlus/ChillerGasAbsorption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1803,7 +1803,12 @@ namespace EnergyPlus::ChillerGasAbsorption {
}

// Calculate operating part load ratio for cooling
lHeatPartLoadRatio = lHeatingLoad / lAvailableHeatingCapacity;
if (lAvailableHeatingCapacity <= 0.0) {
lAvailableHeatingCapacity = 0.0;
lHeatPartLoadRatio = 0.0;
} else {
lHeatPartLoadRatio = lHeatingLoad / lAvailableHeatingCapacity;
}

// Calculate fuel consumption for cooling
// fuel used for cooling availCap * HIR * HIR-FT * HIR-FPLR
Expand Down
Loading