Skip to content

Conversation

@jmarrec
Copy link
Contributor

@jmarrec jmarrec commented Oct 22, 2025

Pull request overview

Description of the purpose of this PR

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

```
[ 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.
@jmarrec jmarrec self-assigned this Oct 22, 2025
@jmarrec jmarrec added Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze) labels Oct 22, 2025
Comment on lines -455 to -464
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;
}
Copy link
Contributor Author

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.

Comment on lines +479 to +488
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;
}
Copy link
Contributor Author

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

Comment on lines +871 to +873
if (thisEFC.LowSpeedUserSpecifiedDesignCapacity == Constant::AutoCalculate) {
thisEFC.LowSpeedUserSpecifiedDesignCapacity = thisEFC.HighSpeedUserSpecifiedDesignCapacity * NumArray(18);
}
Copy link
Contributor Author

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"

Copy link
Contributor

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

Copy link
Contributor Author

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

Comment on lines +1365 to +1366
if (this->DesignEnteringWaterTempWasAutoSized && this->PerformanceInputMethod_Num == PIM::UserSpecifiedDesignCapacity) {
if (PltSizCondNum > 0) {
Copy link
Contributor Author

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

Comment on lines 1365 to 1383
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.");
}
Copy link
Contributor Author

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

Comment on lines +465 to +475

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"));
Copy link
Contributor Author

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)
Copy link
Contributor Author

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)
Copy link
Contributor Author

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

Comment on lines +639 to +640
EXPECT_NO_THROW(EvapFluidCoolerSpecs::factory(*state, DataPlant::PlantEquipmentType::EvapFluidCooler_TwoSpd, "BIG EVAPORATIVEFLUIDCOOLER"));
compare_err_stream("");
Copy link
Contributor Author

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".

Comment on lines +645 to +646
EXPECT_EQ(87921.0, ptr->HighSpeedUserSpecifiedDesignCapacity);
EXPECT_EQ(87921.0 * 0.25, ptr->LowSpeedUserSpecifiedDesignCapacity);
Copy link
Contributor Author

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

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit 2be6542

Regression Summary
  • Table String Diffs: 2

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 2be6542

Regression Summary
  • Table String Diffs: 2

… and PltSizCondNum is given to avoid diffs in Reporting Range
@jmarrec jmarrec requested review from mitchute and mjwitte October 22, 2025 23:26
Copy link
Contributor

@rraustad rraustad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good.

@mitchute mitchute merged commit f75a9a5 into develop Oct 23, 2025
8 checks passed
@mitchute mitchute deleted the 11283_EvaporativeFluidCoolers_AutosizedEWT branch October 23, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaporative Fluid Coolers cannot have an Autosized Design Entering Water Temperature

4 participants