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

Add density option to ZoneInfiltration:DesignFlowRate and ZoneVentilation:DesignFlowRate #10929

Merged
merged 11 commits into from
Feb 13, 2025

Conversation

mjwitte
Copy link
Contributor

@mjwitte mjwitte commented Feb 7, 2025

Pull request overview

Description of the purpose of this PR

Add new field for Density Basis to ZoneInfiltration:DesignFlowRate and ZoneVentilation:DesignFlowRate objects.

Pull Request Author

  • 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

  • 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 NewFeature Includes code to add a new feature to EnergyPlus IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) labels Feb 7, 2025
@mjwitte mjwitte added this to the EnergyPlus 25.1 IO Freeze milestone Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

⚠️ Regressions detected on macos-14 for commit 263f558

Regression Summary
  • Table Big Diffs: 345
  • Table Small Diffs: 3

@mjwitte mjwitte marked this pull request as ready for review February 7, 2025 23:10
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.

Kind of slipping this in at the last minute while everyone else is busy with ASHRAE, but the time is ripe (way past ripe) to add this option. If you don't like the field name or choices, please speak up.

@@ -908,6 +911,10 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err
ShowContinueError(state, "Infiltration Coefficients are all zero. No Infiltration will be reported.");
}
}
if (!lAlphaFieldBlanks(5)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Process new input

Copy link
Contributor

Choose a reason for hiding this comment

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

Since #10295, and when using getObjectItem, you don't have to check if the field is blank if it has a default, even if the field is not present. I know it's a little scary to go there but the field will get stuffed with the default even after min fields (A5 is past min-fields = 12). 5ZoneEndUses - but any file will show this result. I'm not asking for a change here just pointing out a new field rule.

image

Comment on lines +5524 to +5526
Real64 AirDensity = 0.0; // Density of air for converting from volume flow to mass flow (kg/m^3)
switch (thisVentilation.densityBasis) {
case DataHeatBalance::InfVentDensityBasis::Standard: {
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 switch to set desired density for ventilation calculation.

Comment on lines +6425 to +6427
Real64 AirDensity = 0.0; // Density of air for converting from volume flow to mass flow (kg/m^3)
switch (thisInfiltration.densityBasis) {
case DataHeatBalance::InfVentDensityBasis::Standard: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

And here for infiltration.

@@ -219,6 +219,21 @@ TEST_F(EnergyPlusFixture, InfiltrationObjectLevelReport)
" 0, !- Velocity Term Coefficient",
" 0; !- Velocity Squared Term Coefficient",

"ZoneInfiltration:DesignFlowRate,",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

And then extend some unit tests.

@mjwitte mjwitte changed the title 4422 infil vent density basis Add density option to ZoneInfiltration:DesignFlowRate and ZoneVentilation:DesignFlowRate Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

⚠️ Regressions detected on macos-14 for commit 8965029

Regression Summary
  • Table Big Diffs: 345
  • Table Small Diffs: 3

Copy link

github-actions bot commented Feb 8, 2025

⚠️ Regressions detected on macos-14 for commit 8d666f2

Regression Summary
  • Table Big Diffs: 345
  • Table Small Diffs: 3

@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 8, 2025

Diffs are as expected, table diffs like this.
image

@mjwitte mjwitte added Defect Includes code to repair a defect in EnergyPlus and removed NewFeature Includes code to add a new feature to EnergyPlus labels Feb 8, 2025
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.

Great set of changes here, thanks @mjwitte. This is nice.

@Myoldmopar
Copy link
Member

Passes happily with latest develop, thanks @mjwitte

@Myoldmopar Myoldmopar merged commit 1789f2e into develop Feb 13, 2025
11 checks passed
@Myoldmopar Myoldmopar deleted the 4422InfilVentDensityBasis branch February 13, 2025 15:55
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 IDDChange Code changes impact the IDD file (cannot be merged after IO freeze)
Projects
None yet
4 participants