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

Calculate UEF; move simulation code into HPWH #191

Closed
wants to merge 27 commits into from
Closed

Conversation

spahrenk
Copy link
Contributor

@spahrenk spahrenk commented Dec 20, 2023

Description

  • Enables calculation of UEF (uniform energy factor) for a specified Model (preset or file). The code is placed within the test suite and follows the form of existing tests. However, the functionality serves only as a utility at this stage, so no new tests are added. The UEF value is simply displayed on the console upon completion.
  • The UEF calculation routine runs four simulations using synthetic schedule profiles, while tracking the total volume of water drawn and the total energy "consumed", then applies the definition from document EERE–2019–BT–TP–0032. No variations in water density or specific heat capacity were included.
  • Previously, HPWH model tests used simulation code implemented in main.cc. These did not have the form of a set of routines callable from other projects in HPWHsim, so the simulation code was transformed into a set of HPWH member functions. Considerable clean-up and reorganization of the simulation code was performed, which enables broader utility than was previously available.
  • One evident error in the previous code that calculated modified draws for year-long tests was found. This resulted in change of some values in DHW_YRLY.csv, but will have no impact on uses of HPWHsim that do not involve the built-in simulation routines.
  • The previous code performed energy-balance checks when running simulations, but did not report the results. Enabling a failure for energy-balance errors revealed a previously unidentified energy-balance issue on the order of 0.01% for a model with an external condenser configuration. Therefore, the failure mechanism was temporarily disabled, pending address of this issue in a separate PR.
  • An additional option was added to allow specification in testInfo.txt of temperature units as degF.

Author Progress Checklist:

  • Open draft pull request
    • Make title clearly understandable in a standalone change log context
    • Assign yourself the issue
    • Add at least one label (enhancement, bug, or maintenance)
    • Link the issue(s) addressed by this PR (under "Development" in the sidebar menu)
  • Make code changes (if you haven't already)
  • Self-review of code
    • My code follows the style guidelines of this project
    • I have added comments to my code, particularly in hard-to-understand areas
    • I have only committed the necessary changes for this fix or feature
    • I have made corresponding changes to the documentation
    • My changes generate no new warnings
    • I have ensured that my fix is effective or that my feature works as intended by:
      • exercising the code changes in the test framework, and/or
      • manually verifying the changes (as explained in the the pull request description above)
    • My changes pass all local tests
    • My changes successfully passes CI checks
    • Add any unit test for proof and documentation.
    • Merge in main branch and address resulting conflicts and/or test failures.
  • Move pull request out of draft mode and assign reviewers
  • Iterate with reviewers until all changes are approved
    • Make changes in response to reviewer comments
    • Merge in main branch and address resulting conflicts and/or test failures.
    • Re-request review in GitHub

Reviewer Checklist:

  • Read the pull request description
  • Perform a code review on GitHub
  • Confirm all CI checks pass and there are no build warnings
  • Pull, build, and run automated tests locally
  • Perform manual tests of the fix or feature locally
  • Add any review comments, if applicable
  • Submit review in GitHub as either
    • Request changes, or
    • Approve
  • Iterate with author until all changes are approved

@nealkruis
Copy link
Member

This works, but it's not exactly what I had in mind. I was envisioning a method on a HPWH object like double HPWH::calculateUEF(). It wouldn't rely on external data files, but have the draw profiles compiled into the class as a private static data member.

@spahrenk spahrenk closed this Dec 29, 2023
@spahrenk spahrenk deleted the calc-UEF branch February 20, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants