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 ideal loads heating sizing with outdoor air #7472

Merged
merged 2 commits into from
Aug 26, 2019
Merged

Conversation

mjwitte
Copy link
Contributor

@mjwitte mjwitte commented Aug 25, 2019

Pull request overview

Fixes #7375. ZoneHVAC:IdealLoadsAirSystem sizing for Design Size Maximum Sensible Heating Capacity did not account for the design outdoor air flow in v9.0 and v9.1.

Work Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • At least one of the following appropriate labels must be added to this PR to be consumed into the changelog:
    • Defect: This pull request repairs a github defect issue. The github issue should be referenced in the PR description
    • Refactoring: This pull request includes code changes that don't change the functionality of the program, just perform refactoring
    • NewFeature: This pull request includes code to add a new feature to EnergyPlus
    • Performance: This pull request includes code changes that are directed at improving the runtime performance of EnergyPlus
    • DoNoPublish: This pull request includes changes that shouldn't be included in the changelog

Review Checklist

This will not be exhaustively relevant to every PR.

  • Functional code review (it has to work!)
  • If defect, results of running current develop vs this branch should exhibit the fix
  • CI status: all green or justified
  • Performance: CI Linux results include performance check
  • Unit Test(s)
  • C++ checks:
    • Argument types
    • If any virtual classes, ensure virtual destructor included, other things
  • IDD changes n/a
  • If new idf included, locally check the err file and other outputs

@mjwitte mjwitte added the Defect Includes code to repair a defect in EnergyPlus label Aug 25, 2019
@mjwitte mjwitte added this to the EnergyPlus 9.2.0 milestone Aug 25, 2019
@mjwitte
Copy link
Contributor Author

mjwitte commented Aug 25, 2019

Develop - Before this fix - See how the cooling capacity increases with outdoor air, but not the heating capacity:

PurchAirTables-NoOA
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, ZONE1AIR, Design Size Maximum Sensible Heating Capacity [W], 7623.67810
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, ZONE1AIR, Design Size Maximum Total Cooling Capacity [W], 7799.32092

PurchAirTables-WithOA
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, ZONE1AIR, Design Size Maximum Sensible Heating Capacity [W], 7623.67810
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, ZONE1AIR, Design Size Maximum Total Cooling Capacity [W], 10474.86656

Ticket15219
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, MECHVENTXCHECKED:ZONE1 IDEAL LOADS AIR, Design Size Maximum Sensible Heating Capacity [W], 8171.70393
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, MECHVENTXCHECKED:ZONE1 IDEAL LOADS AIR, Design Size Maximum Total Cooling Capacity [W], 19854.26280
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, MECHVENTXNOTCHECKED:ZONE1 IDEAL LOADS AIR, Design Size Maximum Sensible Heating Capacity [W], 8171.70393
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, MECHVENTXNOTCHECKED:ZONE1 IDEAL LOADS AIR, Design Size Maximum Total Cooling Capacity [W], 13909.07795

After - this branch - now both heating and cooling capacity increase with outdoor air:

PurchAirTables-NoOA
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, ZONE1AIR, Design Size Maximum Sensible Heating Capacity [W], 7623.67810
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, ZONE1AIR, Design Size Maximum Total Cooling Capacity [W], 7799.32092

PurchAirTables-WithOA
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, ZONE1AIR, Design Size Maximum Sensible Heating Capacity [W], 11703.89179
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, ZONE1AIR, Design Size Maximum Total Cooling Capacity [W], 10474.86656

Ticket15219
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, MECHVENTXCHECKED:ZONE1 IDEAL LOADS AIR, Design Size Maximum Sensible Heating Capacity [W], 20559.71746
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, MECHVENTXCHECKED:ZONE1 IDEAL LOADS AIR, Design Size Maximum Total Cooling Capacity [W], 19854.26280
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, MECHVENTXNOTCHECKED:ZONE1 IDEAL LOADS AIR, Design Size Maximum Sensible Heating Capacity [W], 8171.70393
 Component Sizing Information, ZoneHVAC:IdealLoadsAirSystem, MECHVENTXNOTCHECKED:ZONE1 IDEAL LOADS AIR, Design Size Maximum Total Cooling Capacity [W], 13909.07795

@@ -1737,6 +1737,7 @@ namespace PurchasedAirManager {
SizingString = PurchAirNumericFields(PurchAirNum).FieldNames(FieldNum) + " [m3/s]";
IsAutoSize = false;
PrintFlag = true;
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FinalZoneSizing(CurZoneEqNum).MinOA;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Minimally invasive surgery here. Hopefully no unexpected diffs will show up.

@@ -149,23 +149,20 @@ TEST_F(EnergyPlusFixture, SizePurchasedAirTest_Test1)
DataEnvironment::StdRhoAir = 1.0; // Prevent divide by zero in ReportSizingManager
ZoneEqSizing(CurZoneEqNum).SizingMethod.allocate(24);
CurSysNum = 0;
ZoneHVACSizing.allocate(1);
ZoneHVACSizing(1).CoolingSAFMethod = SupplyAirFlowRate;
ZoneHVACSizing(1).HeatingSAFMethod = SupplyAirFlowRate;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cleaned out some unnecessary things in the existing unit test.

FinalZoneSizing(CurZoneEqNum).DesHeatVolFlow = 1.0;
ZoneEqSizing(CurZoneEqNum).HeatingAirVolFlow = 1.0;
FinalZoneSizing(CurZoneEqNum).DesHeatCoilInTemp = 30.0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The unit test shouldn't be setting ZoneEqSizing - the component sizing function should be doing that.

SizePurchasedAir(PurchAirNum);
EXPECT_DOUBLE_EQ(1.0, PurchAir(PurchAirNum).MaxHeatVolFlowRate);
EXPECT_NEAR(50985.58, PurchAir(PurchAirNum).MaxHeatSensCap, 0.1);
EXPECT_DOUBLE_EQ(2.0, PurchAir(PurchAirNum).MaxCoolVolFlowRate);
EXPECT_NEAR(30844.14, PurchAir(PurchAirNum).MaxCoolTotCap, 0.1);
}

TEST_F(EnergyPlusFixture, SizePurchasedAirTest_Test2)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a second unit test with OA.

@mjwitte mjwitte requested a review from rraustad August 26, 2019 02:19
Copy link
Contributor

@rraustad rraustad left a comment

Choose a reason for hiding this comment

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

Correct use of ZoneEqSizing to pass OA to sizing routine (RequestSizing). Unit test added to include impact of OA on sizing.

@rraustad
Copy link
Contributor

CI is clean, unit test confirms correction to heating coil sizing when OA > 0.

@rraustad rraustad merged commit 2dab9ed into develop Aug 26, 2019
@rraustad rraustad deleted the IdealLoadsSizing7375 branch August 26, 2019 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ideal loads heating capacity sizing does not account for OA load - was ok in v8.9
7 participants