Set the correct identifier for variable speed cooling tower in GetTowerInput#10859
Set the correct identifier for variable speed cooling tower in GetTowerInput#10859Myoldmopar merged 4 commits intodevelopfrom
GetTowerInput#10859Conversation
|
|
||
| auto &tower = state.dataCondenserLoopTowers->towers(TowerNum); | ||
| tower.VSTower = VariableSpeedTowerNumber; | ||
| tower.VSTower = TowerNum; |
There was a problem hiding this comment.
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.
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:
https://github.com/NREL/EnergyPlus/blob/aa39f9fea74d3a3041985ed83fcd60cb093fe6ba/src/EnergyPlus/CondenserLoopTowers.cc#L3278-L3282
where (state.dataCondenserLoopTowers->towers(this->VSTower).MaxWaterFlowRatio
would become this->MaxWaterFlowRatio
There was a problem hiding this comment.
I think that this is correct. I can make that change throughout.
Myoldmopar
left a comment
There was a problem hiding this comment.
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.