#11289 - Case sensitivity error in getWaterTankStratifiedInput#11290
Merged
#11289 - Case sensitivity error in getWaterTankStratifiedInput#11290
Conversation
[ RUN ] EnergyPlusFixture.thermalStorageTankInputReading_Autocalculate /home/julien/Software/Others/EnergyPlus/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc:6856: Failure Expected: WaterThermalTanks::getWaterTankStratifiedInput(*state, cStratifiedCWTankModuleObj) doesn't throw an exception. Actual: it throws nlohmann::json_abi_v3_12_0::detail::type_error with description "[json.exception.type_error.302] type must be number, but is string". /home/julien/Software/Others/EnergyPlus/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc:6862: Failure
…ermalStorage:Chilled/HotWater:XX object
jmarrec
commented
Oct 24, 2025
Comment on lines
+6856
to
+6865
| EXPECT_NO_THROW(WaterThermalTanks::getWaterTankStratifiedInput(*state, cStratifiedCWTankModuleObj)); | ||
| compare_err_stream(""); | ||
|
|
||
| auto &TankChilled = state->dataWaterThermalTanks->WaterThermalTank(1); | ||
| EXPECT_EQ(TankChilled.Name, "CHILLED WATER STORAGE TANK 1"); | ||
| EXPECT_EQ(8.0, TankChilled.Height); | ||
| EXPECT_EQ(TankChilled.Height, TankChilled.UseInletHeight); | ||
| EXPECT_EQ(TankChilled.Height, TankChilled.SourceOutletHeight); | ||
|
|
||
| EXPECT_NO_THROW(WaterThermalTanks::getWaterTankStratifiedInput(*state, cStratifiedHWTankModuleObj)); |
Contributor
Author
There was a problem hiding this comment.
Before fix
EnergyPlusFixture.thermalStorageTankInputReading_Autocalculate
/home/julien/Software/Others/EnergyPlus/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc:6856: Failure
Expected: WaterThermalTanks::getWaterTankStratifiedInput(*state, cStratifiedCWTankModuleObj) doesn't throw an exception.
Actual: it throws nlohmann::json_abi_v3_12_0::detail::type_error with description "[json.exception.type_error.302] type must be number, but is string".
/home/julien/Software/Others/EnergyPlus/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc:6862: Failure
Comment on lines
-3974
to
-3979
| auto const &SourceOutletHeight = fields.at("source_side_outlet_height"); | ||
| if (SourceOutletHeight == "AutoCalculate") { | ||
| Tank.SourceOutletHeight = Tank.Height; | ||
| } else { | ||
| Tank.SourceOutletHeight = SourceOutletHeight.get<Real64>(); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
That was the case sensitivity issue. getRealFieldValue is the right call now
| } | ||
|
|
||
| // ======= Get 'ThermalStorage:ChilledWater:Stratified' ======================================================= | ||
| // ======= Get 'ThermalStorage:HotWater:Stratified' ======================================================= |
Comment on lines
+4923
to
+4946
| auto const &Tank = state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum); | ||
|
|
||
| if (Tank.Sizing.DesignMode == SizingMode::Invalid) { | ||
| if (Tank.VolumeWasAutoSized) { | ||
| ShowSevereError(state, | ||
| format("{}='{}' has tank volume set to Autosize but it is missing associated WaterHeater:Sizing object", | ||
| DataPlant::PlantEquipTypeNames[static_cast<int>(Tank.WaterThermalTankType)], | ||
| Tank.Name)); | ||
| ErrorsFound = true; | ||
| } | ||
| if (Tank.MaxCapacityWasAutoSized) { | ||
| ShowSevereError(state, | ||
| format("{}='{}' has heater capacity set to Autosize but it is missing associated WaterHeater:Sizing object", | ||
| DataPlant::PlantEquipTypeNames[static_cast<int>(Tank.WaterThermalTankType)], | ||
| Tank.Name)); | ||
| ErrorsFound = true; | ||
| } | ||
| if (Tank.HeightWasAutoSized) { | ||
| ShowSevereError(state, | ||
| format("{}='{}' has tank height set to Autosize but it is missing associated WaterHeater:Sizing object", | ||
| DataPlant::PlantEquipTypeNames[static_cast<int>(Tank.WaterThermalTankType)], | ||
| Tank.Name)); | ||
| ErrorsFound = true; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Improve message to include type of object, space issue and change into severe since it then fatals
- ** Warning ** Water heater named CHILLED WATER STORAGE TANK 1has heater capacity set to AUTOSIZE but it is missing associated WaterHeater:Sizing object
+ ** Severe ** ThermalStorage:ChilledWater:Stratified='CHILLED WATER STORAGE TANK 1' has heater capacity set to Autosize but it is missing associated WaterHeater:Sizing object
Collaborator
There was a problem hiding this comment.
The CW storage tank has a "Nominal Cooling Capacity" input. The HW has Nominal Heating Capacity. I still don't see how the WaterHeater:Sizing object will be used to size the thermal storage tank, but then I didn't look at code.
mitchute
approved these changes
Oct 25, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull request overview
Description of the purpose of this PR
Pull Request Author
Reviewer