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#127 - Fix volume calculation to match EnergyPlus #4592

Merged
merged 11 commits into from Aug 4, 2022

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented May 23, 2022

Pull request overview

  • Fixes Fix volume calculation to match EnergyPlus (Bugzilla #730) #127
  • Add a Polyhedron class in utilities/geometry, which reimplements the same logic that E+ does, with two main methods:
    • isEnclosedVolume() which check that each edge/segment is used twice exactly, potentially splitting up existing edges (this is similar to what intersectSurfaces would do, but does not reuse that portion)
    • calcPolyhedronVolume, which assuming your volume is indeed enclosed, will return the appropriate volume.

Space::volume is enhanced to do:

  • If isEnclosedVolume() => calcPolyhedronVolume
  • Otherwise, keep existing behavior (which is take an average of the floor and ceiling heights, multiply by floor area)
    • E+ in fact has a few more potential alternatives, by checking if a floor and ceiling are the same surface or not, if walls are vertical etc. I did not seem it terribly important to also implements those, as the goal here is more to correctly calculate enclosed volumes (volumes are meant to be enclosed really)

Pull Request Author

  • Model API Changes / Additions
  • Model API methods are tested (in src/model/test)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • 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

@jmarrec jmarrec requested a review from tijcolem May 23, 2022 11:48
@jmarrec jmarrec self-assigned this May 23, 2022
@jmarrec jmarrec added the Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. label May 23, 2022
@jmarrec jmarrec mentioned this pull request May 23, 2022
19 tasks
@jmarrec
Copy link
Collaborator Author

jmarrec commented Jun 21, 2022

the windows build error makes no sense.

Unable to open file D:\jenkins\openstudio\develop\build\src\utilities\csharp_OpenStudioUtilitiesData_wrap.cxx: Permission denied

@jmarrec jmarrec added the Ready for Merge Set this once CI is passing and reviews are approved. label Jul 26, 2022
@jmarrec jmarrec added this to the OpenStudio SDK 3.5.0 milestone Jul 26, 2022
Copy link
Collaborator

@tijcolem tijcolem left a comment

Choose a reason for hiding this comment

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

This is great to have this issue resolved! many years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - Utilities Geometry Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. Ready for Merge Set this once CI is passing and reviews are approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix volume calculation to match EnergyPlus (Bugzilla #730)
3 participants