-
Notifications
You must be signed in to change notification settings - Fork 396
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
Conversation
@@ -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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
:
EnergyPlus/src/EnergyPlus/CondenserLoopTowers.cc
Lines 3278 to 3282 in aa39f9f
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjwitte, done!
There was a problem hiding this 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.
There was a problem hiding this 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.
Pull request overview
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.