Fix #11158 - Add Cooling Coil Condenser Volume (Flow Rate) variables for Coil:Cooling:DX:TwoSpeed#11176
Merged
Myoldmopar merged 2 commits intodevelopfrom Sep 4, 2025
Merged
Conversation
jmarrec
commented
Aug 27, 2025
Comment on lines
+5846
to
+5864
| if (thisDXCoil.CondensateCollectMode == CondensateCollectAction::ToTank) { | ||
| SetupOutputVariable(state, | ||
| "Cooling Coil Condensate Volume Flow Rate", | ||
| Constant::Units::m3_s, | ||
| thisDXCoil.CondensateVdot, | ||
| OutputProcessor::TimeStepType::System, | ||
| OutputProcessor::StoreType::Average, | ||
| thisDXCoil.Name); | ||
| SetupOutputVariable(state, | ||
| "Cooling Coil Condensate Volume", | ||
| Constant::Units::m3, | ||
| thisDXCoil.CondensateVol, | ||
| OutputProcessor::TimeStepType::System, | ||
| OutputProcessor::StoreType::Sum, | ||
| thisDXCoil.Name, | ||
| Constant::eResource::OnSiteWater, | ||
| OutputProcessor::Group::HVAC, | ||
| OutputProcessor::EndUseCat::Condensate); | ||
| } |
77bcf22 to
5e978a8
Compare
``` /home/julien/Software/Others/EnergyPlus/tst/EnergyPlus/unit/DXCoils.unit.cc:3455: Failure Expected: (std::find(outVarNames.begin(), outVarNames.end(), varName)) != (outVarNames.end()), actual: 8-byte object <90-94 00-63 C1-56 00-00> vs 8-byte object <90-94 00-63 C1-56 00-00> Did not find expected output variable: Cooling Coil Condensate Volume Flow Rate /home/julien/Software/Others/EnergyPlus/tst/EnergyPlus/unit/DXCoils.unit.cc:3455: Failure Expected: (std::find(outVarNames.begin(), outVarNames.end(), varName)) != (outVarNames.end()), actual: 8-byte object <90-94 00-63 C1-56 00-00> vs 8-byte object <90-94 00-63 C1-56 00-00> Did not find expected output variable: Cooling Coil Condensate Volume ```
…for Coil:Cooling:DX:TwoSpeed
5e978a8 to
72805b9
Compare
jmarrec
commented
Aug 27, 2025
| ASSERT_EQ(-25.0, state->dataDXCoils->DXCoil(1).MinOATCompressor); // use default value at -25C | ||
| } | ||
|
|
||
| TEST_F(EnergyPlusFixture, CoilCoolingDXTwoSpeed_CondensateVariables) |
| " 0.0, !- Minimum Value of x", | ||
| " 1.0; !- Maximum Value of x", | ||
|
|
||
| "Coil:Cooling:DX:TwoSpeed,", |
| " autosize, !- Low Speed Evaporative Condenser Air Flow Rate {m3/s}", | ||
| " autosize, !- Low Speed Evaporative Condenser Pump Rated Power Consumption {W}", | ||
| " , !- Supply Water Storage Tank Name", | ||
| " condensate_storage, !- Condensate Collection Water Storage Tank Name", |
Contributor
Author
There was a problem hiding this comment.
With a Condensate Collection Water Storage
Comment on lines
+3425
to
+3431
| EXPECT_NO_THROW(GetDXCoils(*state)); | ||
| compare_err_stream(""); | ||
|
|
||
| auto &dxCoil = state->dataDXCoils->DXCoil(1); | ||
|
|
||
| ASSERT_EQ("MAIN COOLING COIL 1", dxCoil.Name); // Cooling Coil Two Speed | ||
| EXPECT_ENUM_EQ(CondensateCollectAction::ToTank, dxCoil.CondensateCollectMode); |
Contributor
Author
There was a problem hiding this comment.
Get the coil. SetupOutputVariable is inside GetDXCoils, so can't do it manually.
Ensure CondensateCollectMode is ok
Comment on lines
+3433
to
+3455
| std::vector<std::string> outVarNames; | ||
| outVarNames.reserve(state->dataOutputProcessor->ddOutVars.size()); | ||
| std::transform(state->dataOutputProcessor->ddOutVars.begin(), | ||
| state->dataOutputProcessor->ddOutVars.end(), | ||
| std::back_inserter(outVarNames), | ||
| [](auto const *var) { return var->name; }); | ||
| std::vector<std::string> expectedVarNames = { | ||
| "Cooling Coil Total Cooling Rate", | ||
| "Cooling Coil Total Cooling Energy", | ||
| "Cooling Coil Sensible Cooling Rate", | ||
| "Cooling Coil Sensible Cooling Energy", | ||
| "Cooling Coil Latent Cooling Rate", | ||
| "Cooling Coil Latent Cooling Energy", | ||
| "Cooling Coil Electricity Rate", | ||
| "Cooling Coil Electricity Energy", | ||
| "Cooling Coil Runtime Fraction", | ||
| "Cooling Coil Condensate Volume Flow Rate", | ||
| "Cooling Coil Condensate Volume", | ||
| }; | ||
| for (auto const &varName : expectedVarNames) { | ||
| EXPECT_NE(std::find(outVarNames.begin(), outVarNames.end(), varName), outVarNames.end()) | ||
| << "Did not find expected output variable: " << varName; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Ensure we find the variables we expect.
Before fix, the Last two are missing
/home/julien/Software/Others/EnergyPlus/tst/EnergyPlus/unit/DXCoils.unit.cc:3455: Failure
Expected: (std::find(outVarNames.begin(), outVarNames.end(), varName)) != (outVarNames.end()), actual: 8-byte object <90-94 00-63 C1-56 00-00> vs 8-byte object <90-94 00-63 C1-56 00-00>
Did not find expected output variable: Cooling Coil Condensate Volume Flow Rate
/home/julien/Software/Others/EnergyPlus/tst/EnergyPlus/unit/DXCoils.unit.cc:3455: Failure
Expected: (std::find(outVarNames.begin(), outVarNames.end(), varName)) != (outVarNames.end()), actual: 8-byte object <90-94 00-63 C1-56 00-00> vs 8-byte object <90-94 00-63 C1-56 00-00>
Did not find expected output variable: Cooling Coil Condensate Volume
Myoldmopar
approved these changes
Sep 4, 2025
Comment on lines
+3433
to
+3455
| std::vector<std::string> outVarNames; | ||
| outVarNames.reserve(state->dataOutputProcessor->ddOutVars.size()); | ||
| std::transform(state->dataOutputProcessor->ddOutVars.begin(), | ||
| state->dataOutputProcessor->ddOutVars.end(), | ||
| std::back_inserter(outVarNames), | ||
| [](auto const *var) { return var->name; }); | ||
| std::vector<std::string> expectedVarNames = { | ||
| "Cooling Coil Total Cooling Rate", | ||
| "Cooling Coil Total Cooling Energy", | ||
| "Cooling Coil Sensible Cooling Rate", | ||
| "Cooling Coil Sensible Cooling Energy", | ||
| "Cooling Coil Latent Cooling Rate", | ||
| "Cooling Coil Latent Cooling Energy", | ||
| "Cooling Coil Electricity Rate", | ||
| "Cooling Coil Electricity Energy", | ||
| "Cooling Coil Runtime Fraction", | ||
| "Cooling Coil Condensate Volume Flow Rate", | ||
| "Cooling Coil Condensate Volume", | ||
| }; | ||
| for (auto const &varName : expectedVarNames) { | ||
| EXPECT_NE(std::find(outVarNames.begin(), outVarNames.end(), varName), outVarNames.end()) | ||
| << "Did not find expected output variable: " << varName; | ||
| } |
Member
|
Guess what? This SIMPLE fix passes happily with develop pulled in right now. Merging this! Thanks @jmarrec |
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
Verified that the defect file (User supplied, transitionned to 25.1.0 and saved on DevSupport) now includes the correct variables
Pull Request Author
Reviewer