Skip to content

Fix WindowProperty:FrameAndDivider divider error checks#11629

Merged
mitchute merged 10 commits into
developfrom
win-div-area
Jun 10, 2026
Merged

Fix WindowProperty:FrameAndDivider divider error checks#11629
mitchute merged 10 commits into
developfrom
win-div-area

Conversation

@joseph-robertson

Copy link
Copy Markdown
Collaborator

Pull request overview

Description of the purpose of this PR

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
  • If adding/removing any output files (e.g., eplustbl.*)
    • Update ..\scripts\Epl-run.bat
    • Update ..\scripts\RunEPlus.bat
    • Update ..\src\EPLaunch\ MainModule.bas, epl-ui.frm, and epl.vbp (VersionComments)
    • Update ...github\workflows\energyplus.py

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

@joseph-robertson joseph-robertson self-assigned this Jun 8, 2026
@joseph-robertson joseph-robertson added the Defect Includes code to repair a defect in EnergyPlus label Jun 8, 2026
state.dataSurface->FrameDivider(FrDivNum).VertDividers * surf.Height -
state.dataSurface->FrameDivider(FrDivNum).HorDividers *
state.dataSurface->FrameDivider(FrDivNum).VertDividers * DivWidth);
if (DivWidth * state.dataSurface->FrameDivider(FrDivNum).HorDividers > surf.Height) {

@joseph-robertson joseph-robertson Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This check for total horizontal divider width not exceeding the height of the glazed opening, and the similar check below for vertical divider width, are the main additions in this PR.

Comment on lines +12768 to +12769
" 20, !- Number of Horizontal Dividers",
" 20, !- Number of Vertical Dividers",

@joseph-robertson joseph-robertson Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Before, if we went from 19 -> 20 vertical dividers, the calculated divider area was less than the glazed opening (no error). Now we get an error -- the divider area calculation will be applied to a window with overlapping horizontal, or vertical, dividers (which doesn't make sense).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR is a follow-up to #11589 that tightens validation around WindowProperty:FrameAndDivider divider geometry in ProcessSurfaceVertices, and expands unit test coverage to assert the new severe error checks and resulting divider-area calculations.

Changes:

  • Add severe error checks when horizontal/vertical divider widths cumulatively exceed the glazed opening height/width.
  • Adjust divider-area error reporting and update the divider-geometry unit test to cover additional invalid cases.
  • Extend the existing SurfaceGeometry_BadDividerGeometry unit test with new frame/divider objects and fenestration surfaces.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/EnergyPlus/SurfaceGeometry.cc Adds new divider dimension validation and updates divider-area error handling in ProcessSurfaceVertices.
tst/EnergyPlus/unit/SurfaceGeometry.unit.cc Expands the bad-divider-geometry test to cover new severe error conditions and divider area outcomes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/EnergyPlus/SurfaceGeometry.cc Outdated
Comment thread src/EnergyPlus/SurfaceGeometry.cc Outdated
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 0393440

Regression Summary
  • ESO Small Diffs: 708
  • Table Small Diffs: 393
  • MTR Small Diffs: 525
  • Table String Diffs: 177
  • EIO: 397
  • JSON Small Diffs: 2
  • ZSZ Small Diffs: 71
  • Table Big Diffs: 35
  • ERR: 15
  • MTR Big Diffs: 2
  • ESO Big Diffs: 10
  • EDD: 4
  • SSZ Small Diffs: 13
  • JSON Big Diffs: 2

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 5842b51

Regression Summary
  • ESO Small Diffs: 708
  • Table Small Diffs: 393
  • MTR Small Diffs: 525
  • Table String Diffs: 177
  • EIO: 397
  • JSON Small Diffs: 2
  • ZSZ Small Diffs: 71
  • Table Big Diffs: 35
  • ERR: 15
  • MTR Big Diffs: 2
  • EDD: 4
  • ESO Big Diffs: 10
  • SSZ Small Diffs: 13
  • JSON Big Diffs: 2

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit b1c177c

Regression Summary
  • ESO Small Diffs: 708
  • Table Small Diffs: 393
  • MTR Small Diffs: 525
  • Table String Diffs: 177
  • EIO: 397
  • JSON Small Diffs: 2
  • ZSZ Small Diffs: 71
  • Table Big Diffs: 35
  • ERR: 15
  • MTR Big Diffs: 2
  • EDD: 4
  • ESO Big Diffs: 10
  • SSZ Small Diffs: 13
  • JSON Big Diffs: 2

Comment on lines +12986 to +12989
{" ** Severe ** ProcessSurfaceVertices: Horizontal dividers exceed glazed opening height for window FENESTRATIONSURFACE",
" ** ~~~ ** Number of horizontal dividers=[20], divider width=[0.50] m, glazed opening height=[9.80] m.",
" ** Severe ** ProcessSurfaceVertices: Divider area exceeds glazed opening for window FENESTRATIONSURFACE",
" ** ~~~ ** Window surface area=[95.06] m2, divider area=[95.10] m2.",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

First window: divider area exceeds glazed opening, and number of horizontal dividers is too large.

Comment on lines +12990 to +12993
" ** Severe ** ProcessSurfaceVertices: Horizontal dividers exceed glazed opening height for window FENESTRATIONSURFACE2",
" ** ~~~ ** Number of horizontal dividers=[20], divider width=[0.50] m, glazed opening height=[9.80] m.",
" ** Severe ** ProcessSurfaceVertices: Vertical dividers exceed glazed opening width for window FENESTRATIONSURFACE2",
" ** ~~~ ** Number of vertical dividers=[20], divider width=[0.50] m, glazed opening width=[9.70] m.",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Second window: divider area doesn't exceed glazed opening, but number of horizontal (and vertical) dividers is too large.

Comment on lines +12994 to +12999
" ** Severe ** ProcessSurfaceVertices: Horizontal dividers exceed glazed opening height for window FENESTRATIONSURFACE3",
" ** ~~~ ** Number of horizontal dividers=[50], divider width=[0.50] m, glazed opening height=[9.80] m.",
" ** Severe ** ProcessSurfaceVertices: Vertical dividers exceed glazed opening width for window FENESTRATIONSURFACE3",
" ** ~~~ ** Number of vertical dividers=[50], divider width=[0.50] m, glazed opening width=[9.70] m.",
" ** Severe ** ProcessSurfaceVertices: Calculated divider area <= 0.0 for window FENESTRATIONSURFACE3",
" ** ~~~ ** Window surface area=[95.06] m2, divider area=[-137.50] m2."})));

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Third window: divider area is negative, and number of horizontal (and vertical) dividers is too large.

@joseph-robertson joseph-robertson marked this pull request as ready for review June 9, 2026 16:15
@joseph-robertson joseph-robertson requested a review from mitchute June 9, 2026 18:17

@mitchute mitchute left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@mitchute mitchute merged commit a3098ea into develop Jun 10, 2026
11 checks passed
@mitchute mitchute deleted the win-div-area branch June 10, 2026 04:02
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.

4 participants