-
Notifications
You must be signed in to change notification settings - Fork 460
Fix #11158 - Add Cooling Coil Condenser Volume (Flow Rate) variables for Coil:Cooling:DX:TwoSpeed #11176
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
| 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); | ||
| } |
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.
simple fix.
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.
SIMPLE!
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
| ASSERT_EQ(-25.0, state->dataDXCoils->DXCoil(1).MinOATCompressor); // use default value at -25C | ||
| } | ||
|
|
||
| TEST_F(EnergyPlusFixture, CoilCoolingDXTwoSpeed_CondensateVariables) |
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.
New test
| " 0.0, !- Minimum Value of x", | ||
| " 1.0; !- Maximum Value of x", | ||
|
|
||
| "Coil:Cooling:DX:TwoSpeed,", |
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.
TwoSpeed coil
| " 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", |
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.
With a Condensate Collection Water Storage
| 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); |
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.
Get the coil. SetupOutputVariable is inside GetDXCoils, so can't do it manually.
Ensure CondensateCollectMode is ok
| 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; | ||
| } |
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.
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
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.
Great test here.
| 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; | ||
| } |
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.
Great test here.
|
Guess what? This SIMPLE fix passes happily with develop pulled in right now. Merging this! Thanks @jmarrec |
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