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 HVAC Sizing Summary Min OA flow for Spaces #10728

Merged
merged 1 commit into from
Sep 12, 2024
Merged

Conversation

mjwitte
Copy link
Contributor

@mjwitte mjwitte commented Sep 12, 2024

Pull request overview

  • Fixes HVAC Sizing Summary, Minimum Outdoor Air Flow Rate always zero for Spaces.

Pull Request Author

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)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • 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 Sep 12, 2024
Copy link

⚠️ Regressions detected on macos-14 for commit bb4552c

Regression Summary
  • EIO: 2
  • Table Big Diffs: 2
  • SSZ Big Diffs: 1
  • Table String Diffs: 1

@mjwitte
Copy link
Contributor Author

mjwitte commented Sep 12, 2024

With develop, HVAC Sizing Summary, Minimum Outdoor Air Flow Rate is always zero for Spaces. 5ZoneAirCooledWithSpacesHVAC
image
With this branch:
image

For 5ZoneAirCooledWithSpaceHeatBalance which has one space per zone, the OA rates in the space table match the OA rates in the zone table. (And for 5ZoneAirCooledWithSpacesHVAC, the space OA rates add up to the zone OA rates).
image
image

Copy link
Contributor Author

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

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

Code walkthru

bool const UseMinOASchFlag, // Use min OA schedule in DesignSpecification:OutdoorAir object
bool const PerPersonNotSet, // when calculation should not include occupants (e.g., dual duct)
bool const MaxOAVolFlowFlag, // TRUE when calculation uses occupancy schedule (e.g., dual duct)
int const spaceNum)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add spaceNum parameter to several OA function calls.

PerPersonNotSet,
MaxOAVolFlowFlag,
thisDSOA.dsoaSpaceIndexes(dsoaCount));
if ((spaceNum == 0) || ((spaceNum > 0) && (spaceNum == thisDSOA.dsoaSpaceIndexes(dsoaCount)))) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When calculating for a DesignSpecification:OutdoorAir:SpaceList, if spaceNum==0 then sum all the spaces on the list, otherwise "sum" only the matching space. Same approach for 3 OA functions.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense.

Comment on lines -1002 to -1006
// Use the max occupancy PEOPLE structure to calculate design min OA for each zone from the outside air flow per person input
Real64 TotPeopleInZone = 0.0;
Real64 ZoneMinOccupancy = 0.;
int DSOAPtr = finalZoneSizing.ZoneDesignSpecOAIndex; // index to DesignSpecification:OutdoorAir object
if ((DSOAPtr > 0) && !dsoaError) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Move a chunk of code to a separate function so it can be called for zones or spaces.

Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines +1047 to +1058
void calcSizingOA(EnergyPlusData &state,
DataSizing::ZoneSizingData &zsFinalSizing,
DataSizing::ZoneSizingData &zsCalcFinalSizing,
bool &dsoaError,
bool &ErrorsFound,
int const zoneNum,
int const spaceNum)
{
// Use the max occupancy PEOPLE structure to calculate design min OA for each zone from the outside air flow per person input
Real64 TotPeopleInZone = 0.0;
Real64 ZoneMinOccupancy = 0.;
int DSOAPtr = zsFinalSizing.ZoneDesignSpecOAIndex; // index to DesignSpecification:OutdoorAir object
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's the new function.

@mjwitte mjwitte added this to the EnergyPlus 24.2 milestone Sep 12, 2024
Copy link
Member

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

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

Looks good to me.

PerPersonNotSet,
MaxOAVolFlowFlag,
thisDSOA.dsoaSpaceIndexes(dsoaCount));
if ((spaceNum == 0) || ((spaceNum > 0) && (spaceNum == thisDSOA.dsoaSpaceIndexes(dsoaCount)))) {
Copy link
Member

Choose a reason for hiding this comment

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

Makes sense.

Real64 desFlowPerZonePerson(EnergyPlusData &state,
int const actualZoneNum // Zone index
);
Real64 desFlowPerZonePerson(EnergyPlusData &state, int const actualZoneNum, int const spaceNum = 0);
Copy link
Member

Choose a reason for hiding this comment

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

Nice. Love the default argument value usage here. Clean.

Comment on lines -1002 to -1006
// Use the max occupancy PEOPLE structure to calculate design min OA for each zone from the outside air flow per person input
Real64 TotPeopleInZone = 0.0;
Real64 ZoneMinOccupancy = 0.;
int DSOAPtr = finalZoneSizing.ZoneDesignSpecOAIndex; // index to DesignSpecification:OutdoorAir object
if ((DSOAPtr > 0) && !dsoaError) {
Copy link
Member

Choose a reason for hiding this comment

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

👍

@Myoldmopar
Copy link
Member

Happy with develop pulled in, let's get this in. Thanks @mjwitte

@Myoldmopar Myoldmopar merged commit d66e1dd into develop Sep 12, 2024
11 checks passed
@Myoldmopar Myoldmopar deleted the spaceSizingFixes branch September 12, 2024 16:17
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.

5 participants