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

Correction of Some Problems in the ChillerHeater Model #10635

Merged
merged 6 commits into from
Sep 11, 2024

Conversation

RKStrand
Copy link
Contributor

@RKStrand RKStrand commented Jul 31, 2024

Pull request overview

  • Fixes CentralHeatPumpSystem / ChillerHeater Misbehavior #10065 and CentralHeatPumpSystem-CentralChillerHeaterSystem_Cooling_Heating.idf #7838
  • Changes were made to the ChillerHeater model to correct some issues that users noted. First, when in heating mode or heating dominant mode, the evaporator heat flow and compressor power consumption were always fixed at maximum PLR and thus the evaporator and compressor sum would be higher than the condenser heat flow. This was traced back to a bug in the algorithm for when the ChillerHeater was in that mode where when the condenser heat transfer was reduced the evaporator heat transfer and compressor power were never reduced accordingly. This has been corrected. Second, when there were cases where when in simultaneous heating and cooling mode that zero electric consumption from the compressor was being reported despite there being heat transfer at both the evaporator and condenser. This was traced back to a problem in a key logic decision in the ChillerHeater code that caused the compressor energy to be left at zero and the condenser to not be simulated when in heat recovery mode when heating was dominant. These issues along with a few other improvements in some parts of the algorithm and making the code much easier to read were made and 5 new unit tests were added to exercise new subroutines that were added as part of the code improvements. Differences in the output were noted only for the two files that have ChillerHeaters in the file and this was expected because of the fixes to the problems noted above.

NOTE: ENHANCEMENTS MUST FOLLOW A SUBMISSION PROCESS INCLUDING A FEATURE PROPOSAL AND DESIGN DOCUMENT PRIOR TO SUBMITTING CODE

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

RKStrand added 6 commits July 22, 2024 13:59
This commit includes the "design document" for the fix to the chiller heater issue described in #10065.
This commit includes fixes for two separate issues.  First, when in heating mode, the evaporator and compressor power was always at full power, not at the power that the condenser needed.  Second, there were random times when in simultaneously heating and cooling mode that no evaporator load or compressor energy due to a logic flaw in the code.  This should fix those issues though there are probably more issues with this model.  This at least addresses those two issues that have caused users problems.
This commit includes unit tests, a couple of fixes to the code that the unit tests uncovered, and some code simplification.  This is PR candidate.
After further review of the code and the concepts of minPLR and frac, I realized that this one change was not consistent with the concept and the change was a mistake on my part.  This backs out this change and corrects the unit test as well.  Now this is PR ready.
@RKStrand RKStrand added the Defect Includes code to repair a defect in EnergyPlus label Jul 31, 2024
@RKStrand RKStrand added this to the EnergyPlus 24.2 milestone Jul 31, 2024
@RKStrand RKStrand requested review from Myoldmopar and mjwitte July 31, 2024 12:57
@RKStrand RKStrand self-assigned this Jul 31, 2024
@RKStrand
Copy link
Contributor Author

@Myoldmopar @mjwitte Ok, this is a significant improvement over what we had before. I think that the bugs noted by the users previously have been fixed now. Not saying that this model is without problems but this should be a good step forward. Let me know if you have any questions or concerns.

@mjwitte mjwitte assigned Myoldmopar and unassigned RKStrand Jul 31, 2024
@RKStrand
Copy link
Contributor Author

RKStrand commented Aug 5, 2024

Graphs showing fix of evaporator/compressor always at full power when they should not be (this is for control mode 2--heating only):

image image

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.

This looks fine to me. Good testing and description of the issue and changes. And good improvement just for a few dozen lines of code. I'm happy with this.

@Myoldmopar
Copy link
Member

And CI has just the expected diffs in two files, otherwise clean. I'm inclined to merge, anyone have any issues here?

@rraustad
Copy link
Contributor

No issues. It looks much better than before.

@Myoldmopar
Copy link
Member

Great, this is clean and ready! Thanks @RKStrand and @rraustad

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

CentralHeatPumpSystem / ChillerHeater Misbehavior
8 participants