-
Notifications
You must be signed in to change notification settings - Fork 418
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
Fix #10817 - Avoid crash in FluidCooler/EvaporativeFluidCooler when Water flow rate autosized and no Sizing:Plant #10855
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
316d5ae
Highlight an issue in an existing test
jmarrec a003e07
Fix problem in existing test: the allocate after GetInput was resetti…
jmarrec 61c4c5d
Rename test for clarity
jmarrec 93c4e0b
Unrelated, but place the fluid coolers on the SUPPLY side of the plan…
jmarrec dee7e5b
Add tests for #10817
jmarrec 6932358
Add test: EvaporativeFluidCooler also had the same issue as #10817
jmarrec 9e8586b
Fix #10817 - Avoid crash in FluidCooler/EvaporativeFluidCooler when W…
jmarrec b02725a
Dry up code via a lambda
jmarrec 23fa180
Rename Fluidcooler -> FluidCooler in examples files for easier grepping
jmarrec a179c0d
Increase num sig digits from default=2 to 6 to report the **Water** F…
jmarrec 4aaa7c0
Calculate DesignLeavingWaterTemp in all cases, since it's reported (a…
jmarrec 080ff2e
Merge develop; resolve conflicts
Myoldmopar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1341,14 +1341,10 @@ namespace EvaporativeFluidCoolers { | |
Real64 constexpr Acc(0.0001); // Accuracy of result | ||
std::string const CalledFrom("SizeEvapFluidCooler"); | ||
|
||
int SolFla; // Flag of solver | ||
Real64 UA; // Calculated UA value [W/C] | ||
Real64 OutWaterTempAtUA0; // Water outlet temperature at UA0 | ||
Real64 OutWaterTempAtUA1; // Water outlet temperature at UA1 | ||
Real64 DesignEnteringAirWetBulb; // Intermediate variable to check that design exit | ||
// temperature specified in the plant:sizing object | ||
// is higher than the design entering air wet-bulb temp | ||
// when autosize feature is used | ||
int SolFla; // Flag of solver | ||
Real64 UA; // Calculated UA value [W/C] | ||
Real64 OutWaterTempAtUA0; // Water outlet temperature at UA0 | ||
Real64 OutWaterTempAtUA1; // Water outlet temperature at UA1 | ||
|
||
Real64 DesEvapFluidCoolerLoad = 0.0; // Design evaporative fluid cooler load [W] | ||
Real64 tmpDesignWaterFlowRate = this->DesignWaterFlowRate; | ||
|
@@ -1359,6 +1355,33 @@ namespace EvaporativeFluidCoolers { | |
|
||
if (this->DesignWaterFlowRateWasAutoSized && this->PerformanceInputMethod_Num != PIM::StandardDesignCapacity) { | ||
if (PltSizCondNum > 0) { | ||
|
||
// Check when the user specified Condenser/Evaporative Fluid Cooler water design setpoint | ||
// temperature is less than design inlet air wet bulb temperature | ||
Real64 DesignEnteringAirWetBulb = 0; | ||
if (this->PerformanceInputMethod_Num == PIM::UFactor) { | ||
DesignEnteringAirWetBulb = 25.6; | ||
} else { | ||
DesignEnteringAirWetBulb = this->DesignEnteringAirWetBulbTemp; | ||
} | ||
if (state.dataSize->PlantSizData(PltSizCondNum).ExitTemp <= DesignEnteringAirWetBulb) { | ||
ShowSevereError(state, format("Error when autosizing the UA value for Evaporative Fluid Cooler = {}.", this->Name)); | ||
ShowContinueError(state, | ||
format("Design Loop Exit Temperature ({:.2R} C) must be greater than design entering air wet-bulb temperature " | ||
"({:.2R} C) when autosizing the Evaporative Fluid Cooler UA.", | ||
state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, | ||
DesignEnteringAirWetBulb)); | ||
ShowContinueError( | ||
state, | ||
"It is recommended that the Design Loop Exit Temperature = Design Entering Air Wet-bulb Temp plus the Evaporative " | ||
"Fluid Cooler design approach temperature (e.g., 4 C)."); | ||
ShowContinueError( | ||
state, | ||
"If using HVACTemplate:Plant:ChilledWaterLoop, then check that input field Condenser Water Design Setpoint must be " | ||
"> Design Entering Air Wet-bulb Temp if autosizing the Evaporative Fluid Cooler."); | ||
ShowFatalError(state, "Review and revise design input values as appropriate."); | ||
} | ||
|
||
if (state.dataSize->PlantSizData(PltSizCondNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) { | ||
tmpDesignWaterFlowRate = state.dataSize->PlantSizData(PltSizCondNum).DesVolFlowRate * this->SizFac; | ||
if (state.dataPlnt->PlantFirstSizesOkayToFinalize) this->DesignWaterFlowRate = tmpDesignWaterFlowRate; | ||
|
@@ -1383,28 +1406,6 @@ namespace EvaporativeFluidCoolers { | |
ShowFatalError(state, "Autosizing of evaporative fluid cooler condenser flow rate requires a loop Sizing:Plant object."); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Throw when PltSizCondNum is not > 0 is here. |
||
} | ||
} | ||
// Check when the user specified Condenser/Evaporative Fluid Cooler water design setpoint | ||
// temperature is less than design inlet air wet bulb temperature | ||
if (this->PerformanceInputMethod_Num == PIM::UFactor) { | ||
DesignEnteringAirWetBulb = 25.6; | ||
} else { | ||
DesignEnteringAirWetBulb = this->DesignEnteringAirWetBulbTemp; | ||
} | ||
if (state.dataSize->PlantSizData(PltSizCondNum).ExitTemp <= DesignEnteringAirWetBulb) { | ||
ShowSevereError(state, format("Error when autosizing the UA value for Evaporative Fluid Cooler = {}.", this->Name)); | ||
ShowContinueError(state, | ||
format("Design Loop Exit Temperature ({:.2R} C) must be greater than design entering air wet-bulb temperature " | ||
"({:.2R} C) when autosizing the Evaporative Fluid Cooler UA.", | ||
state.dataSize->PlantSizData(PltSizCondNum).ExitTemp, | ||
DesignEnteringAirWetBulb)); | ||
ShowContinueError(state, | ||
"It is recommended that the Design Loop Exit Temperature = Design Entering Air Wet-bulb Temp plus the Evaporative " | ||
"Fluid Cooler design approach temperature (e.g., 4 C)."); | ||
ShowContinueError(state, | ||
"If using HVACTemplate:Plant:ChilledWaterLoop, then check that input field Condenser Water Design Setpoint must be " | ||
"> Design Entering Air Wet-bulb Temp if autosizing the Evaporative Fluid Cooler."); | ||
ShowFatalError(state, "Review and revise design input values as appropriate."); | ||
} | ||
} | ||
|
||
if (this->PerformanceInputMethod_Num == PIM::UFactor && !this->HighSpeedEvapFluidCoolerUAWasAutoSized) { | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is to basically ensure the check is done INSIDE the
if(PltSizCondNum > 0)
If PltSizCondNum is not > 0, it'll throw anyways