Skip to content
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

New Coil Sizing Reports #6454

Merged
merged 20 commits into from Feb 20, 2018
Merged

New Coil Sizing Reports #6454

merged 20 commits into from Feb 20, 2018

Conversation

mjwitte
Copy link
Contributor

@mjwitte mjwitte commented Jan 31, 2018

Pull request overview

Add two new table output reports:
Coil Sizing Details Report - Detailed coil sizing data table contributed by Trane. Report key is "CoilSizingDetails"
Coil Sizing Summary subtable in the HVAC Sizing SummaryReport. This is a subset of the Coil Sizing Details Report.

For complete code and documentation changes, see also #6500,

Work Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • At least one of the following appropriate labels must be added to this PR to be consumed into the changelog:
    • Defect: This pull request repairs a github defect issue. The github issue should be referenced in the PR description
    • Refactoring: This pull request includes code changes that don't change the functionality of the program, just perform refactoring
    • NewFeature: This pull request includes code to add a new feature to EnergyPlus
    • Performance: This pull request includes code changes that are directed at improving the runtime performance of EnergyPlus
    • DoNoPublish: This pull request includes changes that shouldn't be included in the changelog

Review Checklist

This will not be exhaustively relevant to every PR.

  • Code style (parentheses padding, variable names)
  • Functional code review (it has to work!)
  • If defect, results of running current develop vs this branch should exhibit the fix
  • CI status: all green or justified
  • Performance: CI Linux results include performance check -- verify this
  • Unit Test(s)
  • C++ checks:
    • Argument types
    • If any virtual classes, ensure virtual destructor included, other things
  • IDD changes:
    • Verify naming conventions and styles, memos and notes and defaults
    • Open windows IDF Editor with modified IDD to check for errors
    • If transition, add rules to spreadsheet
    • If transition, add transition source
    • If transition, update idfs
  • If new idf included, locally check the err file and other outputs
  • Documentation changes in place
  • Changed docs build successfully
  • ExpandObjects changes?
  • If output changes, including tabular output structure, add to output rules file for interfaces

EnergyArchmage and others added 2 commits January 25, 2018 12:13
Contribution from TRANE for comprehensive coil information table.
@mjwitte mjwitte added NewFeature Includes code to add a new feature to EnergyPlus IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) labels Jan 31, 2018
@mjwitte mjwitte added this to the EnergyPlus 8.9.0 milestone Jan 31, 2018
@nrel-bot-3
Copy link

@mjwitte @lgentile it has been 15 days since this pull request was last updated.

@Myoldmopar
Copy link
Member

Custom check is reporting that the license year is bad in the ReportCoilSelection.* files.

The signed integer warning is because vector.size() returns an "unsigned" integer value, but you declared your loop variable as an integer. Although this won't cause any problems for this particular case, the compiler still warns about comparing a signed versus unsigned integer. You can either make your loop variable a size_t, instead of a plain integer, or you can cast the result of the size() call to a regular int. Let me know if that is super muddy.

The reorder warning is because coilCapFTIdealPeak( 1.0 ) is defined before coilRatedTotCap in the class definition, but initialized after it in the list of constructor initializations. This won't cause a problem for a simple data type like this, but the compiler still warns. Just make sure the order in the constructor initialization list matches the order in the class and this will be good to go.

I'm building locally to find the problem with the integration tests.

@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 16, 2018

@Myoldmopar Thanks. I think I've addressed all of those. I'll wait to push until I hear if you've found anything on the watercoil test failures.

@Myoldmopar
Copy link
Member

As you expected, DesiccantDehumidifierWithAirToAirCoil.idf encounters a divide by zero on mass flow rate:

Program received signal SIGFPE, Arithmetic exception.
0x00007ffff4c2ed82 in EnergyPlus::DXCoils::CalcTotCapSHR (InletDryBulb=26.666699999999999, InletHumRat=0.011178906890772281, 
    InletEnthalpy=55307.703692498355, InletWetBulb=19.428230207360055, AirMassFlowRatio=1, AirMassFlow=0, TotCapNom=14286, CBF=0, 
    CCapFTemp=3, CCapFFlow=9, TotCap=@0x7fffffffa368: 4.635571359542523e-310, SHR=@0x7fffffffa370: 6.9533558066990486e-310, 
    CondInletTemp=35, Pressure=101217, TotCapModFac=@0x55555652d280: 0.99986245570042243)
    at /src/EnergyPlus/DXCoils.cc:10211
10211				hDelta = TotCapCalc / AirMassFlow;

@Myoldmopar
Copy link
Member

Tested two more of the failures, same divide by zero on that line.

@Myoldmopar
Copy link
Member

@mjwitte OK, with commit 41ab0aa, I believe I have all the unit test segfaults fixed and the integration failures addressed. But you'll want to look close at that commit to make sure my changes make sense.

  • In the cc file, there was a divide by zero that I mentioned earlier, and I tried to protect against that by leaving that function early. However, I'm not sure if my TotCap and SHR set to zero fix is complete enough, or even correct. So please verify that.
  • Second, the code was segfaulting because the coilSelectionReportObj variable was being used uninitialized. I inspected the code and found it really just needed a call to the createCoilSelectionReportObj() function. Adding that to each of the unit tests before each call to SizeWaterCoil made the unit tests pass successfully, so that seems OK.

Maybe that's all that's needed here. CI will tell us. And you can tell me if my changes make sense to you as well.

@Myoldmopar
Copy link
Member

OK, this is looking way better. @mjwitte please confirm my changes as per the comment above, and make any changes needed on there. Once you then push up your changes to clean up the build warnings, this should be ready to go in.

@Myoldmopar
Copy link
Member

Thanks for pushing that @EnergyArchmage. I was hesitant to do it because @mjwitte mentioned he had addressed them locally but just hadn't pushed yet, so I didn't want to stomp on his work. But he ran out of time didn't he! 😆

Copy link
Contributor Author

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

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

Thanks @Myoldmopar and @EnergyArchmage for the cleanups. This still needs the IDD changes for the two new report names. Plus it needs the code to produce the smaller version of this report. Soon.

@@ -216,6 +217,7 @@ TEST_F( WaterCoilsTest, WaterCoolingCoilSizing )
DataWaterLoopNum = 1;
NumOfGlycols = 1;

createCoilSelectionReportObj();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar Thanks. I had added this to energyplusfixture but I forgot that these tests use their own fixture.

if ( AirMassFlow <= 0.00001 ) {
TotCap = 0.0;
SHR = 0.0;
return;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar Thanks. This looks ok. Wondering why we're getting here with zero airflow, but that can be a followup investigation.

@EnergyArchmage
Copy link
Contributor

It could be that the cooling capacity changes are causing diffs in three files are because of some subtle bug fixes that got in here. The calls to RequestSizing need to set the temporary working variable to AutoSize prior to the call -- but this isn't always being done properly. If the value passed in is not autosize value then the central sizing methods don't execute as expected. This set of code changes includes this subtle fix in WaterCoils.cc in the following locations.

https://github.com/NREL/EnergyPlus/blob/CoilSizingReport/src/EnergyPlus/WaterCoils.cc#L1928
https://github.com/NREL/EnergyPlus/blob/CoilSizingReport/src/EnergyPlus/WaterCoils.cc#L1944
https://github.com/NREL/EnergyPlus/blob/CoilSizingReport/src/EnergyPlus/WaterCoils.cc#L2208
https://github.com/NREL/EnergyPlus/blob/CoilSizingReport/src/EnergyPlus/WaterCoils.cc#L2221

@rraustad might be able to confirm, but I would guess that the diffs in 3 regression files are because of real changes in cooling coil capacity that are caused by this correction. (not otherwise document in a CR I think)

coil sizing report store design vol flow build warngin.
@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 18, 2018

@EnergyArchmage We should pull those changes out of here and make that a separate PR. I can do that along with the other changes I need to do.

@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 19, 2018

Currently this code adds the full detailed coil selection data as a "Coil Sizing Summary Report" subtable in "Report: HVAC Sizing Summary" (HVACSizingSummary). I think this is a good spot for an abbreviated coil sizing table with about a dozen columns. Then I propose adding a new "CoilSizingDetails" report that produces the full coil selection table as a separate report. The detailed report would be included as part of "AllSummary" reports.

@EnergyArchmage @rraustad @Myoldmopar Sound OK?

An example of the current full report inside HVAC Sizing Summary is in the attached zip file.
5ZoneAirCooledConvCoefTable.zip

@EnergyArchmage
Copy link
Contributor

@mjwitte yes that sounds good. I originally intended to do as a separate report request but the extra effort seemed considerable compared to adding under HVACSizingSummary.

@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 19, 2018

@EnergyArchmage For standard format reports it's not too bad. newPreDefReport automates most of it. This branch now has the new CoilSizingDetails report (in full glory) and an abbreviated Coil Sizing Summary Report subtable in the HVAC Sizing Summary. There's probably too many columns yet in the smaller version.

@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 19, 2018

Forgot to revert the water coil diff-causers. There now.

@Myoldmopar Myoldmopar modified the milestones: EnergyPlus 8.9.0, EnergyPlus Next Feb 20, 2018
@@ -619,7 +623,11 @@ namespace HVACDXSystem {
// considered as as 100% DOAS DX cooling coil
if ( DXCoolingSystem( DXCoolSysNum ).ISHundredPercentDOASDXCoil ) {
// set the system DX Coil application type to the child DX coil
SetDXCoilTypeData( DXCoolingSystem( DXCoolSysNum ).CoolingCoilName );
if ( ! ( DXCoolingSystem( DXCoolSysNum ).CoolingCoilType_Num == Coil_CoolingAirToAirVariableSpeed ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

interesting syntax

@@ -1783,6 +1878,8 @@ namespace WaterCoils {
SizingString = WaterCoilNumericFields( CoilNum ).FieldNames( FieldNum ) + " [C]";
DataFlowUsedForSizing = DataAirFlowUsedForSizing; // used by air loop coils
TempSize = WaterCoil( CoilNum ).DesInletAirTemp;
TempSize = AutoSize;
Copy link
Contributor

Choose a reason for hiding this comment

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

This erases the user input for design inlet air temp. 2 files shows diff's in eio because of this.

5ZoneAirCooled_ZoneAirMassFlowBalance:

Component Sizing Information, Coil:Cooling:Water, MAIN COOLING COIL 1, Design Size Design Inlet Air Temperature [C], 21.00753 
- Component Sizing Information, Coil:Cooling:Water, MAIN COOLING COIL 1, User-Specified Design Inlet Air Temperature [C], 21.60000 
Component Sizing Information, Coil:Cooling:Water, MAIN COOLING COIL 1, Design Size Design Inlet Water Temperature [C], 7.00000 
- Component Sizing Information, Coil:Cooling:Water, MAIN COOLING COIL 1, User-Specified Design Inlet Water Temperature [C], 7.00000

Coil:Cooling:Water,
  Main Cooling Coil 1,     !- Name
  CoolingCoilAvailSched,   !- Availability Schedule Name
  autosize,                !- Design Water Flow Rate {m3/s}
  autosize,                !- Design Air Flow Rate {m3/s}
  7.0,                     !- Design Inlet Water Temperature {C}
  21.6,                    !- Design Inlet Air Temperature {C}

I suggest a followup issue to correct any last minute findings.

@rraustad
Copy link
Contributor

Wow! Lot's of new information now. There are some things we could probably improve, like identifying zone name for TU heating coils or finding the sensible capacity and UA for water cooling coils that don't currently have that available (Coil Sizing Details). This should merge and we can iron out the issues.

@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 20, 2018

@rraustad There's 3 files with big eso diffs - maybe you can track those down?

@rraustad
Copy link
Contributor

I think I just did. Sizing is ignoring the user inputs for the cooling water coil and resulting in a different size. All 3 have different cooling coil size. At least that is where I would start looking.

How do you guys want to handle these last IDD change PR's. Split them up and work towards finalizing? Or just merge ones that are likely and follow up issue those that need some correcting after IDD freeze?

@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 20, 2018

@rraustad If you have a fix for this, please point me to it, and I'll include that along with a section in output rules and a merge up to current develop. Trying to minimize pushes.

@rraustad
Copy link
Contributor

WaterCoils.cc line 1881. bPRINT = true here if coil type is water simple. So using TempSize = AutoSize will neglect the user input for design inlet water temp. Why was this line added? I assume to be able to report sizing at actual vs design conditions.

@rraustad
Copy link
Contributor

and line 1897. I see where you reverted these out but must have missed these. Why do this anyway?

@EnergyArchmage
Copy link
Contributor

I had added several of those TempSize = AutoSize statements to get more of the code to execute inside the sizing routine. I don't recall the details.

@mjwitte mjwitte modified the milestones: EnergyPlus Next, EnergyPlus 8.9.0 Feb 20, 2018
@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 20, 2018

@Myoldmopar This is ready for merge (with followups noted in #6481) once CI reports back, if you agree.

@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 20, 2018

@Myoldmopar Note that we expect a few diffs, similar to a few days ago.
619 tests had: AUD diffs.
3 tests had: EIO diffs.
3 tests had: ESO big diffs.
3 tests had: Table big diffs.
101 tests had: ERR diffs.
1 test had: Table small diffs.
1 test had: MTR big diffs.
Failures:

regression Test Summary

Passed: 616
Failed: 3

The err warnings are in a lot of files - sorry.

@mjwitte
Copy link
Contributor Author

mjwitte commented Feb 20, 2018

The units warnings should be gone now. Sorry to kick off another cycle.

@Myoldmopar
Copy link
Member

@mjwitte this is going in. We have to get the JSON finalized, and this needs to go first. If you still see a problem with these results, please add it to the follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) NewFeature Includes code to add a new feature to EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants