-
Notifications
You must be signed in to change notification settings - Fork 460
New attempt at fixing #7464: outlet water temperature control issue for variable speed cooling tower #10248
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
Conversation
…ases where the tower does no outlet temperature control but run the fan at full speed.
|
The proposed changes have a large impact on the heat rejection energy use because the tower is now running appropriately. In the current case, the tower is running more because the following code snippet sets the airflow ratio, attempts to calculate the outlet and if the outlet is greater than the setpoint it assumes that the unit is running at full capacity, however, if the combination of lower and upper bound passed to regula falsi lead to a returned value of -2 the outlet water temperature is not actually controlled (i.e. not calculated) so the tower energy use is overestimated. EnergyPlus/src/EnergyPlus/CondenserLoopTowers.cc Lines 5223 to 5244 in 8f094c8
|
|
So if the SP is 30C, why is the tower outlet temp now showing 32.2C? I don't see anything in the tower inputs that would explain that. But a new loop on range temp may be influencing the results? But then I do see a min range (1.11) and approach (1.11) temperature that would explain that (30 + 2.22 = 32.22)? Too hard to know how these inputs affect results without spending a lot of time with this model. |
|
What energy results from a single-speed and two-speed tower? Those results could be compared to these. |
That schedule is not in the defect file. The defect file uses 32.22. |
I have results for the variable speed Merkel model but I'll generate these as well. |
|
OK, I am looking at in-moreoutput-2xTower.idf from #7464. Now I see there is defect_file.zip which I assume you are using. Good, that answers the SP issue. |
Here are the results for the other models: So the current case ( |
|
So with cooling energy roughly the same at 280 GJ, the difference in Heat Rejection is due to a reduction in fan/pump power. This trend (heat rejection energy falling as tower speeds increase) should provide a good basis to validate all tower models. Now the results of this branch make more sense. |
|
@lymereJ @Myoldmopar it has been 28 days since this pull request was last updated. |
4 similar comments
|
@lymereJ @Myoldmopar it has been 28 days since this pull request was last updated. |
|
@lymereJ @Myoldmopar it has been 28 days since this pull request was last updated. |
|
@lymereJ @Myoldmopar it has been 28 days since this pull request was last updated. |
|
@lymereJ @Myoldmopar it has been 28 days since this pull request was last updated. |
|
@lymereJ @Myoldmopar it has been 28 days since this pull request was last updated. |
1 similar comment
|
@lymereJ @Myoldmopar it has been 28 days since this pull request was last updated. |
lymereJ
left a comment
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.
Walkthrough of the changes.
| SetupOutputVariable(state, | ||
| "Cooling Tower Approach", | ||
| Constant::Units::C, | ||
| this->coolingTowerApproach, | ||
| OutputProcessor::TimeStepType::System, | ||
| OutputProcessor::StoreType::Average, | ||
| this->Name); | ||
| SetupOutputVariable(state, | ||
| "Cooling Tower Range", | ||
| Constant::Units::C, | ||
| this->coolingTowerRange, | ||
| OutputProcessor::TimeStepType::System, | ||
| OutputProcessor::StoreType::Average, | ||
| this->Name); |
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.
Add range and approach as outputs for all cooling tower objects.
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.
Looks good.
|
|
||
| Real64 OutletWaterTempLocal = this->WaterTemp - Tr; | ||
| // calculate outlet temperature | ||
| Real64 outletWaterTempLocal = this->WaterTemp - min(Tr, this->MaxRangeTemp); |
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.
Make sure that the range doesn't exceeds the model's maximum range.
| } else if (SolFla == -2) { | ||
| // bad starting value means that solution corresponds to a range that is beyond | ||
| // the bounds of the model; The maximum range is used here | ||
| outletWaterTempLocal = this->WaterTemp - this->MaxRangeTemp; | ||
| ++this->VSErrorCountTRCalc; | ||
| if (this->VSErrorCountTRCalc < 2) { | ||
| ShowWarningError( | ||
| state, | ||
| format("The range for the cooling tower {} likely exceeds the bounds of the model. The maximum range of the model is used {}.", | ||
| this->Name, | ||
| this->MaxRangeTemp)); | ||
| ShowContinueError(state, | ||
| format(" ... Occurrence info = {}, {} {}", | ||
| state.dataEnvrn->EnvironmentName, | ||
| state.dataEnvrn->CurMnDy, | ||
| General::CreateSysTimeIntervalString(state))); | ||
| } else { | ||
| ShowRecurringWarningErrorAtEnd( | ||
| state, | ||
| format("The range for the cooling tower {} likely exceeds the bounds of the model. The maximum range of the model is used {}", | ||
| this->Name, | ||
| this->MaxRangeTemp), | ||
| this->ErrIndexTRCalc); |
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.
Previously, if a "bad starting value" error was returned by Regula Falsi (SolFla == -2, i.e., both the output for the function for the lower and upper bounds are of the same sign), the outlet temperature was only recalculated if the inlet temperature minus the range were greater than the setpoint. As described in the issue, this occurs for the YorkCalc model. Looking at that model closer shows that this typically occurs when the range returned by the model is significantly greater than the maximum range. In the first figure below, the solution is a range of about 63 deg. C which is way beyond the limit of the model (22.2222).
Inlet water temperature: 38.75 deg. C; Wet-bulb temperature: 15.4 deg. C; Flow ratio: 2

Increasing further the upper bound used with Regula Falsi works but doesn't make sense since the solutions are outside the limits of the model. The proposed changes apply the maximum range every time SolFla == 2. As shown in the simulation results above, this approach leads to the correct control of the outlet of the tower and reasonable fan power unlike the status quo.
Currently, when the outlet is not recalculated, no warning is issued, The proposed changes include a (recurring) warning every time this happens.
| VSTower.calculateVariableSpeedTower(*state); | ||
| EXPECT_DOUBLE_EQ(30.0, VSTower.OutletWaterTemp); | ||
| EXPECT_NEAR(0.5213, VSTower.FanCyclingRatio, 0.0001); | ||
| EXPECT_NEAR(0.5424, VSTower.FanCyclingRatio, 0.0001); |
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.
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.
Interesting. And makes sense.
| EXPECT_EQ(vSpdMerkel_tower.HeatRejectCapNomCapSizingRatio, 1.25); | ||
| } | ||
|
|
||
| TEST_F(EnergyPlusFixture, CondenserLoopTowers_CalculateVariableTowerOutletTemp) |
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.
New unit test for defect.
|
The RDD/AUD diffs are due to the new outputs. Most ERR files are due to the new warning. The two EIO diffs are very small convergence value changes. The ESO files diffs appears very small. |
|
CI results do look OK based on the intended changes. I'm building and testing locally and looking over the changes now. |
Myoldmopar
left a comment
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.
No major red flags here, I think this is good to go in.
| SetupOutputVariable(state, | ||
| "Cooling Tower Approach", | ||
| Constant::Units::C, | ||
| this->coolingTowerApproach, | ||
| OutputProcessor::TimeStepType::System, | ||
| OutputProcessor::StoreType::Average, | ||
| this->Name); | ||
| SetupOutputVariable(state, | ||
| "Cooling Tower Range", | ||
| Constant::Units::C, | ||
| this->coolingTowerRange, | ||
| OutputProcessor::TimeStepType::System, | ||
| OutputProcessor::StoreType::Average, | ||
| this->Name); |
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.
Looks good.
| VSTower.calculateVariableSpeedTower(*state); | ||
| EXPECT_DOUBLE_EQ(30.0, VSTower.OutletWaterTemp); | ||
| EXPECT_NEAR(0.5213, VSTower.FanCyclingRatio, 0.0001); | ||
| EXPECT_NEAR(0.5424, VSTower.FanCyclingRatio, 0.0001); |
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.
Interesting. And makes sense.
|
@rraustad these changes seem fine, let me know soon if you want anything else done here, otherwise I'll merge. |
|
I'm good. |











Pull request overview
#7702 provided a fix for the original defect file from #7464 by increasing the upper bound used to solve for the range to determine the outlet water temperature of the tower. Tests have shown that increasing further the upper bound would solve the issue for the new defect file, however, it might still not be a solution that is general enough . The proposed changes include a variable upper bound in order to avoid this type of error before calling regula falsi.
A warning (and recurring as well) was added to identify instances where no outlet temperature control is attempted due potential bad intervals passed to regula falsi.
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.