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

Set the correct identifier for variable speed cooling tower in GetTowerInput #10859

Merged
merged 4 commits into from
Dec 27, 2024

Conversation

lymereJ
Copy link
Collaborator

@lymereJ lymereJ commented Dec 17, 2024

Pull request overview

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: in_V2410.zip

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

@lymereJ lymereJ added the Defect Includes code to repair a defect in EnergyPlus label Dec 17, 2024
@lymereJ lymereJ marked this pull request as draft December 17, 2024 00:01
@@ -1017,7 +1017,7 @@ namespace CondenserLoopTowers {
state, UniqueSimpleTowerNames, AlphArray(1), cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1), ErrorsFound);

auto &tower = state.dataCondenserLoopTowers->towers(TowerNum);
tower.VSTower = VariableSpeedTowerNumber;
tower.VSTower = TowerNum;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The variable speed tower index used to be based on the variable speed tower indices, and not on all the cooling tower indices. So for instances where different types of tower are modeled together the wrong inputs were retrieved. For this file, the two speed tower inputs were being retrieved for the variable speed tower.

This issue did not come up before 24.2 because of #7464, the tower calculation were failing silently.

Copy link
Contributor

Choose a reason for hiding this comment

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

So, if I'm following this correctly, we no longer need the field VSTower and eliminating that would simplify the code in places like this in CoolingTower:onInitLoopEquip:

Real64 const FlowRateRatioStep = (state.dataCondenserLoopTowers->towers(this->VSTower).MaxWaterFlowRatio -
state.dataCondenserLoopTowers->towers(this->VSTower).MinWaterFlowRatio) /
10.0;
bool ModelCalibrated = true;
Real64 ModelWaterFlowRatioMax = state.dataCondenserLoopTowers->towers(this->VSTower).MaxWaterFlowRatio *

where (state.dataCondenserLoopTowers->towers(this->VSTower).MaxWaterFlowRatio
would become this->MaxWaterFlowRatio

Copy link
Collaborator Author

@lymereJ lymereJ Dec 20, 2024

Choose a reason for hiding this comment

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

I think that this is correct. I can make that change throughout.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mjwitte, done!

@lymereJ lymereJ marked this pull request as ready for review December 17, 2024 05:29
Copy link
Contributor

@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.

Fix works as expected. Compared annual simulations with 24.1 and this branch and annual results are very similar. And thanks @lymereJ for the additional code cleanup.

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.

Fine change and set of cleanups. I'll do a quick check with latest develop, but this is probably still ready to go.

@Myoldmopar
Copy link
Member

It all passes fine, although now I'm noticing the LgOffVAVusingBasement test is taking notably longer on my machine. Once my brain reboots after the holidays I'll go back and see why. But this doesn't need to wait, good to go. Thanks @lymereJ and @mjwitte

@Myoldmopar Myoldmopar merged commit ea846c6 into develop Dec 27, 2024
9 checks passed
@Myoldmopar Myoldmopar deleted the fix_10858 branch December 27, 2024 19:22
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.

Runaway temperature error from chiller condenser flow control changes
5 participants