Change remaining Coil:Heating:Gas to Fuel plus cleanups on new coil sizing reports#6500
Change remaining Coil:Heating:Gas to Fuel plus cleanups on new coil sizing reports#6500Myoldmopar merged 21 commits intodevelopfrom
Conversation
Myoldmopar
left a comment
There was a problem hiding this comment.
This looks really good. I had a question about the unit tests. Let me know what you think there and we'll get it approved.
| ) | ||
| { | ||
| int index = getIndexForOrCreateDataObjFromCoilName( coilName,coilType ); | ||
| auto & c( coilSelectionDataObjs[ index ] ); |
| if ( c->waterLoopNum > 0 && c->pltSizNum > 0 ) { | ||
| c->plantLoopName = DataPlant::PlantLoop( c->waterLoopNum ).Name; | ||
| if ( DataSizing::PlantSizData( c->pltSizNum ).LoopType != DataSizing::SteamLoop ) { | ||
| c->rhoFluid = FluidProperties::GetDensityGlycol( DataPlant::PlantLoop( c->waterLoopNum ).FluidName, DataGlobals::InitConvTemp, DataPlant::PlantLoop( c->waterLoopNum ).FluidIndex, "ReportCoilSelection::setCoilWaterFlow" ); |
There was a problem hiding this comment.
Thanks for being explicit on the scope of these functions and not using using statements!
| if ( isAutoSized ) { | ||
| c->coilWaterFlowAutoMsg = "Yes" ; | ||
| } else { | ||
| c->coilWaterFlowAutoMsg = "No" ; |
There was a problem hiding this comment.
So easy to read all this with the c reference variable.
| Real64 const totalHeatingCap, // {W} coil Heating capacity | ||
| bool const isAutoSize, // true if value was autosized | ||
| int const dataPltSizNum, // plant sizing structure index | ||
| int const DataPltSizNum, // plant sizing structure index |
There was a problem hiding this comment.
Was there a reason for capitalizing this?
There was a problem hiding this comment.
Hmm, don't remember changing that.
| Real64 airVdot ( 0.052 ); // air flow rate in m3/s | ||
| bool isAutoSized ( false ); // true if air flow was autosized | ||
|
|
||
| coilSelectionReportObj->setCoilAirFlow( coilName, coilType, airVdot, isAutoSized ); |
There was a problem hiding this comment.
So concise. Are you adding more unit tests or is this the extent of your testing?
There was a problem hiding this comment.
From the coverage results it looks like the code that isn't covered by this test is mostly the erroneous code paths and the steam loop calculations. However there is a section in the setCoilWaterFlowNodeNums function where c->waterLoopNum > 0 && c->pltSizNum > 0 and that block doesn't get hit. What do you think about adding some coverage there?
There was a problem hiding this comment.
This is only half-baked. Will add more. The functions themselves are all from @EnergyArchmage so I can't take credit for how they're written. I just made copies of them to make two flavors for some.
|
|
||
|
|
||
| private: // data | ||
| public: // data |
There was a problem hiding this comment.
@Myoldmopar @EnergyArchmage I couldn't get the unit tests to work without making this public. Is there a better way?
There was a problem hiding this comment.
I think make it public. Or better yet make your class a struct and just make things private that are definitely not needed anywhere else even in unit tests.
…Followup # Conflicts: # src/EnergyPlus/WaterCoils.cc
| coilSelectionReportObj->setCoilAirFlow( coil1Name, coil1Type, airVdot, isAutoSized ); | ||
| auto & c1 ( coilSelectionReportObj->coilSelectionDataObjs[ 0 ] ); | ||
| EXPECT_EQ( coil1Name, c1->coilName_ ); | ||
| EXPECT_EQ( coil1Type, c1->coilObjName ); |
There was a problem hiding this comment.
@Myoldmopar This works here and I can query c1 and see that's filled where it should be. But later on after coil 2 is created, c1 becomes undefined. What needs to be different here when declaring c1 to make it stick later?
| // First with no plant sizing objects defined | ||
| isAutoSized = false; // true if autosized | ||
| coilSelectionReportObj->setCoilWaterFlowNodeNums( coil1Name, coil1Type, waterVdot, isAutoSized, chWInletNodeNum, chWOutletNodeNum, loopNum ); | ||
| EXPECT_EQ( -999, c1->pltSizNum ); |
There was a problem hiding this comment.
c1 is still ok here.
| std::string coil2Type ( "Coil:Cooling:Water" ); // idf input object class name of coil | ||
| int pltSizNum = -999; | ||
| coilSelectionReportObj->setCoilWaterFlowPltSizNum( coil2Name, coil2Type, waterVdot, isAutoSized, pltSizNum, loopNum ); | ||
| auto & c2 ( coilSelectionReportObj->coilSelectionDataObjs[ 1 ] ); |
There was a problem hiding this comment.
But here after a second coilSelectionDataObjs is created, c1 is undefined.
| DataSizing::PlantSizData( 1 ).PlantLoopName = "Chilled Water Loop"; | ||
| isAutoSized = true; // true if autosized | ||
| coilSelectionReportObj->setCoilWaterFlowNodeNums( coil1Name, coil1Type, waterVdot, isAutoSized, chWInletNodeNum, chWOutletNodeNum, loopNum ); | ||
| auto & c1b ( coilSelectionReportObj->coilSelectionDataObjs[ 0 ] ); |
There was a problem hiding this comment.
So, here for now, creating a new c1b to point to the first coil.
change zone weighting to supply-air-flow-rate from zone volume, traps to not overwrite values set directly
|
This looks really good. I am happy to see the plant index errors gone. Looking at the diffs, they seem to be only in the table, and spot checking those I see differences in coil sizes that are relatively small, but numerically significant for throwing diffs. I have no issue with this. Were you planning on doing anything else on here? If not I'll merge. |
|
@Myoldmopar Just about finished with expanded unit tests and still want to clean up some units in the table headers. Should be up within the hour. |
|
👍 |
|
@Myoldmopar Note change in labels, title and new items in overview. |
|
Thanks for covering this so well @mjwitte. I'm going to avoid merging for a little while and let CI have a few hours to check on diffs in this and a couple others that are basically ready to go. If this is clean it'll go in. |
|
@Myoldmopar Arrrgh. Tablediff is failing now. |
| //results from regular zone and system sizing calcs, "At Ideal Loads Peak" | ||
| pdch2CoilDDnameSensIdealPeak = newPreDefColumn( pdst2CoilSummaryCoilSelection, "Design Day Name at Sensible Ideal Loads Peak" ); | ||
| pdch2CoilDateTimeSensIdealPeak = newPreDefColumn( pdst2CoilSummaryCoilSelection, "Date/Time at Sensible Ideal Loads Peak" ); | ||
| pdch2CoilDateTimeSensIdealPeak = newPreDefColumn( pdst2CoilSummaryCoilSelection, "Date/Time at Sensible Ideal Loads Peak {TIMESTAMP}" ); |
There was a problem hiding this comment.
@JasonGlazer So, adding {TIMESTAMP} here is causing TableDiff to crash. Can you see anything wrong here?
There was a problem hiding this comment.
Nothing jumps out as to why this would cause a problem.
|
|
||
| Real64 zoneHeatingLatentLoad = 4321.0; | ||
| coilSelectionReportObj->setZoneLatentLoadHeatingIdealPeak( zoneNum, zoneHeatingLatentLoad ); | ||
| // Expect zero because doZoneEqSetup isn't currently executed |
There was a problem hiding this comment.
@EnergyArchmage I noticed that all calls to coilSelectionReportObj->doZoneEqSetup are currently commented out. Is that your intent at this point?
|
Hmm....looks like it's still failing with TableDiff? |
|
@JasonGlazer What the . . . can TableDiff no handle any change in a column heading? |
|
One more time . . . hope TableDiff is happy now. |
|
Back to tablediffs, not tablediff failures! Ready to go once CI continues a bit more? |
|
Pulled in the latest develop; letting CI run overnight and we'll merge in the morning. |
|
Clang was not pleased with this last commit, but it could be a fluke. I just deleted those results and we'll see if Marvin is happier on another try. |
|
I merged in a couple more PRs so I went ahead and pulled develop in and pushed it back up. With the drastically reduced number of branches CI is watching, it should get done with a full set of diffs relatively soon this morning. |
|
This looks to be good to go but I'm going to hold off from merging so the diffs don't get intermingled over on #6498. I'll merge this once the base Linux CI over there is done. Then we'll be nearly done... |
Pull request overview
Part 2 of new coil sizing reports, completing #6454.
Also . . .
Work Checklist
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Review Checklist
This will not be exhaustively relevant to every PR.