-
Notifications
You must be signed in to change notification settings - Fork 460
Fix #11283 - Evaporative Fluid Coolers cannot have an Autosized Design Entering Water Temperature #11284
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
```
[ RUN ] EnergyPlusFixture.EvapFluidCooler_SingleSpeed_DesignEnteringWaterIsAutosized
/Users/julien/Software/Others/EnergyPlus2/tst/EnergyPlus/unit/EvaporativeFluidCoolers.unit.cc:406: Failure
Expected: EvapFluidCoolerSpecs::factory(*state, DataPlant::PlantEquipmentType::EvapFluidCooler_SingleSpd, "BIG EVAPORATIVEFLUIDCOOLER") doesn't throw an exception.
Actual: it throws EnergyPlus::FatalError with description "Errors found in getting evaporative fluid cooler input.".
/Users/julien/Software/Others/EnergyPlus2/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc:219: Failure
Expected equality of these values:
expected_string
Which is: ""
stream_str
Which is: " ** Severe ** EvaporativeFluidCooler:SingleSpeed = \"BIG EVAPORATIVEFLUIDCOOLER\", invalid data for \"Design Entering Water Temperature\", entered value <= 0.0, but must be >0 for Performance Input Method = \"USERSPECIFIEDDESIGNCAPACITY\".\n ** Severe ** EvaporativeFluidCooler:SingleSpeed = \"BIG EVAPORATIVEFLUIDCOOLER\", Design Entering Water Temperature must be greater than Design Entering Air Wet-bulb Temperature.\n ** Fatal ** Errors found in getting evaporative fluid cooler input.\n ...Summary of Errors that led to program termination:\n ..... Reference severe error count=2\n ..... Last severe error=EvaporativeFluidCooler:SingleSpeed = \"BIG EVAPORATIVEFLUIDCOOLER\", Design Entering Water Temperature must be greater than Design Entering Air Wet-bulb Temperature.\n"
With diff:
@@ -1,1 +1,6 @@
-""
+ ** Severe ** EvaporativeFluidCooler:SingleSpeed = \"BIG EVAPORATIVEFLUIDCOOLER\", invalid data for \"Design Entering Water Temperature\", entered value <= 0.0, but must be >0 for Performance Input Method = \"USERSPECIFIEDDESIGNCAPACITY\".
+ ** Severe ** EvaporativeFluidCooler:SingleSpeed = \"BIG EVAPORATIVEFLUIDCOOLER\", Design Entering Water Temperature must be greater than Design Entering Air Wet-bulb Temperature.
+ ** Fatal ** Errors found in getting evaporative fluid cooler input.
+ ...Summary of Errors that led to program termination:
+ ..... Reference severe error count=2
+ ..... Last severe error=EvaporativeFluidCooler:SingleSpeed = \"BIG EVAPORATIVEFLUIDCOOLER\", Design Entering Water Temperature must be greater than Design Entering Air Wet-bulb Temperature.\n
```
…d work ** Severe ** EvaporativeFluidCooler:TwoSpeed = "BIG EVAPORATIVEFLUIDCOOLER", invalid data for "Low Speed User Specified Design Capacity", entered value <= 0.0, but must be > 0 for Performance Input Method = "USERSPECIFIEDDESIGNCAPACITY".
Program Version,EnergyPlus, Version 25.2.0-8709e19061, YMD=2025.10.22 23:05, ** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - "-1" - Expected number greater than 0.000000 ** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - Failed to validate against child schema #0. ** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - Value type "number" for input "-1" not permitted by 'type' constraint. ** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - "-1" - Failed to match against any enum values. ** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - Failed to validate against child schema #1. ** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - Failed to validate against any schemas allowed by anyOf constraint.
| if (thisEFC.DesignEnteringWaterTemp <= 0.0) { | ||
| ShowSevereError(state, | ||
| format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be >0 for {} = \"{}\".", | ||
| state.dataIPShortCut->cCurrentModuleObject, | ||
| AlphArray(1), | ||
| state.dataIPShortCut->cNumericFieldNames(9), | ||
| state.dataIPShortCut->cAlphaFieldNames(4), | ||
| AlphArray(4))); | ||
| ErrorsFound = true; | ||
| } |
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.
This is useless. The Schema validates with minimum already
Program Version,EnergyPlus, Version 25.2.0-8709e19061, YMD=2025.10.22 23:05,
** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - "-1" - Expected number greater than 0.000000
** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - Failed to validate against child schema #0.
** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - Value type "number" for input "-1" not permitted by 'type' constraint.
** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - "-1" - Failed to match against any enum values.
** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - Failed to validate against child schema #1.
** Severe ** <root>[EvaporativeFluidCooler:SingleSpeed][Big EvaporativeFluidCooler][design_entering_water_temperature] - Failed to validate against any schemas allowed by anyOf constraint.
| if (thisEFC.DesignEnteringWaterTemp != DataSizing::AutoSize) { | ||
| if (thisEFC.DesignEnteringWaterTemp <= thisEFC.DesignEnteringAirWetBulbTemp) { | ||
| ShowSevereError(state, | ||
| format("{} = \"{}\", {} must be greater than {}.", | ||
| state.dataIPShortCut->cCurrentModuleObject, | ||
| AlphArray(1), | ||
| state.dataIPShortCut->cNumericFieldNames(9), | ||
| state.dataIPShortCut->cNumericFieldNames(11))); | ||
| ErrorsFound = true; | ||
| } |
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.
In Get Input, we only check this if the DesignEnteringWaterTemp isn't autosized.
We'll check again in Size
| if (thisEFC.LowSpeedUserSpecifiedDesignCapacity == Constant::AutoCalculate) { | ||
| thisEFC.LowSpeedUserSpecifiedDesignCapacity = thisEFC.HighSpeedUserSpecifiedDesignCapacity * NumArray(18); | ||
| } |
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.
For the TwoSpeed one, before throwing because LowSpeedUserSpecifiedDesignCapacity is < 0, actually calculate it with NumArray(18) which was completely unused and which is the "Low Speed User Specified Design Capacity Sizing Factor"
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.
Seems reasonable, and high speed capacity cannot be autosized and this field has a default.
N16, \field High Speed User Specified Design Capacity
\type real
\units W
\minimum> 0.0
\note Only used for Performance Input Method = UserSpecifiedDesignCapacity;
\note for other Performance Input Methods, this field is ignored.
N17, \field Low Speed User Specified Design Capacity
\type real
\units W
\minimum> 0.0
\autocalculatable
\note Only used for Performance Input Method = UserSpecifiedDesignCapacity;
\note for other Performance Input Methods, this field is ignored.
N18, \field Low Speed User Specified Design Capacity Sizing Factor
\type real
\default 0.5
\note This field is only used if the previous field is set to autocalculate
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'm realizing that N17 should have \default autocalculate to be pedantic about IDD correctness
| if (this->DesignEnteringWaterTempWasAutoSized && this->PerformanceInputMethod_Num == PIM::UserSpecifiedDesignCapacity) { | ||
| if (PltSizCondNum > 0) { |
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.
If we're in UserSpecifiedDesignCapacity, and DesignEnteringWaterTempWasAutoSized
| this->DesignEnteringWaterTemp = | ||
| state.dataSize->PlantSizData(PltSizCondNum).ExitTemp + state.dataSize->PlantSizData(PltSizCondNum).DeltaT; | ||
|
|
||
| if (this->DesignEnteringWaterTemp <= this->DesignEnteringAirWetBulbTemp) { | ||
| ShowSevereError( | ||
| state, format("Error when autosizing the Design Entering Water Temperature for Evaporative Fluid Cooler = {}.", this->Name)); | ||
| ShowContinueError( | ||
| state, | ||
| format("Design Entering Water Temperature ({:.2R} C) must be greater than design entering air wet-bulb temperature " | ||
| "({:.2R} C).", | ||
| this->DesignEnteringWaterTemp, | ||
| this->DesignEnteringAirWetBulbTemp)); | ||
| ShowContinueError( | ||
| state, | ||
| "Check the Sizing:Plant object and the Design Entering Air Wet-bulb Temp input field for the Evaporative Fluid Cooler."); | ||
| ShowFatalError(state, "Review and revise design input values as appropriate."); | ||
| } |
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.
We assign to the Sizing:Plant values, and we check that the Temps are matching because we skipped that in Get Input
|
|
||
| sizingPlant.ExitTemp = 30.0; | ||
| expected_ewt = sizingPlant.ExitTemp + sizingPlant.DeltaT; | ||
| EXPECT_EQ(40.0, expected_ewt); | ||
|
|
||
| EXPECT_NO_THROW(ptr->SizeEvapFluidCooler(*state)); | ||
| compare_err_stream(""); | ||
| EXPECT_EQ(expected_ewt, ptr->DesignEnteringWaterTemp); | ||
|
|
||
| EXPECT_TRUE(compare_eio_stream_substring("Component Sizing Information, EvaporativeFluidCooler:SingleSpeed, BIG EVAPORATIVEFLUIDCOOLER, " | ||
| "Design Entering Water Temperature [C], 40.00000")); |
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.
Test valid case: should report to EIO
| "Design Entering Water Temperature [C], 40.00000")); | ||
| } | ||
|
|
||
| TEST_F(EnergyPlusFixture, EvapFluidCooler_TwoSpeed_DesignEnteringWaterIsAutosized) |
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.
Same test but for the TwoSpeed
| "Design Entering Water Temperature [C], 40.00000")); | ||
| } | ||
|
|
||
| TEST_F(EnergyPlusFixture, EvapFluidCooler_TwoSpeed_UserSpecifiedDesignCapacity_LowSpeed_CanAutocalculate) |
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.
And a test for the LowSpeed autocalculate
| EXPECT_NO_THROW(EvapFluidCoolerSpecs::factory(*state, DataPlant::PlantEquipmentType::EvapFluidCooler_TwoSpd, "BIG EVAPORATIVEFLUIDCOOLER")); | ||
| compare_err_stream(""); |
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.
Before this
** Severe ** EvaporativeFluidCooler:TwoSpeed = "BIG EVAPORATIVEFLUIDCOOLER", invalid data for "Low Speed User Specified Design Capacity", entered value <= 0.0, but must be > 0 for Performance Input Method = "USERSPECIFIEDDESIGNCAPACITY".
| EXPECT_EQ(87921.0, ptr->HighSpeedUserSpecifiedDesignCapacity); | ||
| EXPECT_EQ(87921.0 * 0.25, ptr->LowSpeedUserSpecifiedDesignCapacity); |
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.
Test that the calculated LowSpeed is ok
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
|
… and PltSizCondNum is given to avoid diffs in Reporting Range
rraustad
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.
Everything looks good.
Pull request overview
Low Speed User Specified Design Capacity(using theLow Speed User Specified Design Capacity Sizing Factor)Description of the purpose of this PR
Pull Request Author
Reviewer