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

Remove AirTerminal:SingleDuct:Uncontrolled #7448

Merged
merged 66 commits into from
Feb 13, 2020

Conversation

mjwitte
Copy link
Contributor

@mjwitte mjwitte commented Aug 8, 2019

Pull request overview

In v8.9.0 (March 2018), AirTerminal:SinglDuct:Uncontrolled was marked obsolete, to be replaced with AirTerminal:SingleDuct:ConstantVolume:NoReheat (which requires a ZoneHVAC:AirDistributionUnit object like all of the other air terminal units). This change removes AirTerminal:SinglDuct:Uncontrolled from the idd, removes all related source code, adds transition code to move to the new air terminal (and modify related objects) and eliminates this object from all example files.

Explanation of Diffs

_SmallOffice_Dulles is configured with no ZoneSplitter, so with the old direct air terminal unit, which only has a single node (acts as inlet and outlet), the zone inlet node is the same node as the AirloopHVAC Demand Side Inlet Node. So, the last time around the loop when the Demand Side Inlet Node gets updated from the Supply Side Outlet Node the zone inlet node got updated even if there wasn't another round of simulating the zone equipment. With the new terminal unit, this doesn't happen, because the terminal unit separates the air loop Demand Side Inlet from the zone inlet. I can reproduce this with the old terminal unit by adding a ZoneSplitter in the loop, then the diffs are tiny. The two charts below illustrate the diffs (reported at detailed frequency with ReportDuringWarmup, the same patterns persist after warmup). The summer design day with more humidity action and higher levels doesn't have this issue.

image

image

For _SmallOffice_Dulles , even though there are some significant timestep diffs, the annual site energy changes only slightly from 383811.80 to 383811.74 [kBtu].

The other files with big diffs are AirFlowNetwork files withDistribution. The additional node for the newer terminal unit requires an additional linkage element in the AFN, which introduces diffs.

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.

  • 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
  • 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 to input rules file for interfaces
    • If transition, add transition source
    • If transition, update idfs
  • If new idf included, locally check the err file and other outputs
  • Required documentation updates?
  • ExpandObjects changes?
  • If output changes, including tabular output structure, add to output rules file for interfaces

@mjwitte mjwitte added the Defect Includes code to repair a defect in EnergyPlus label Aug 8, 2019
@mjwitte
Copy link
Contributor Author

mjwitte commented Aug 9, 2019

Well, that's a disappointing set of diffs. There's at least one issue that needs to be corrected in the new(er) terminal unit based on these diffs in Sum of Air Terminal Heating Rates.

@mjwitte mjwitte added this to the EnergyPlus Future milestone Aug 12, 2019
@mjwitte mjwitte added the IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) label Aug 12, 2019
@nrel-bot
Copy link

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

1 similar comment
@nrel-bot-2
Copy link

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

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.

This is ready for review. Here's the developer walkthrough of changes.

  1. Significant doc changes across AuxiliaryPrograms, EMS guide, Engineering Ref, and I/O ref.
  2. Transitioned 100s of idfs (performance_tests and testfiles) from old to new - ran transition on the entire set (a few months ago).
  3. Removed all references to old terminal unit throughout the code.
  4. Other highlights noted as line comments.
  5. Given the merge of this transition with other transition code in develop, the reviewer should probably test some random 9.2 files to be sure it's all working correctly. At some point before release we should run a test on the entire testfiles folder for 9.2->9.3 and make sure there no failures. @Myoldmopar @mitchute

\key AirTerminal:DualDuct:ConstantVolume
\key AirTerminal:DualDuct:VAV
\key AirTerminal:SingleDuct:ConstantVolume:Reheat
\key AirTerminal:SingleDuct:ConstantVolume:NoReheat
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 was missing from RoomAir:Node:AirflowNetwork:HVACEquipment.

@@ -45649,49 +45648,6 @@ ZoneHVAC:VentilatedSlab:SlabGroup,

\group Zone HVAC Air Loop Terminal Units

AirTerminal:SingleDuct:Uncontrolled,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove this object from IDD and all references to it.

@@ -776,8 +776,8 @@
Zone2WTAHP, !- Zone Equipment 1 Name
1, !- Zone Equipment 1 Cooling Sequence
1, !- Zone Equipment 1 Heating or No-Load Sequence
, !- Zone Equipment 1 Sequential Cooling Load Fraction Schedule Name
; !- Zone Equipment 1 Sequential Heating Load Fraction Schedule Name
, !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running transition on all testfiles (a few months ago) introduced additional cleanups.

@@ -1894,6 +1894,7 @@ namespace MixedAir {
if (UtilityRoutines::SameString(ZoneEquipList(EquipListNum).EquipName(EquipNum),
AirDistUnit(ADUNum).Name)) {
if ((AirDistUnit(ADUNum).EquipType_Num(EquipNum) == SingleDuctVAVReheat) ||
(AirDistUnit(ADUNum).EquipType_Num(EquipNum) == SingleDuctConstVolNoReheat) ||
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 was missing.

@@ -2858,112 +2858,112 @@ namespace RoomAirModelManager {
}
}

if (TypeNum == 1) { // ZoneHVAC:TerminalUnit : VariableRefrigerantFlow
if (TypeNum == DataHVACGlobals::ZoneEquipTypeOf_VariableRefrigerantFlow) { // ZoneHVAC:TerminalUnit : VariableRefrigerantFlow
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cleaning this up to use the parameter variables.

@@ -610,6 +990,34 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile

! If your original object starts with H, insert the rules here

CASE("HEATPUMP:WATERTOWATER:EIR:HEATING")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just moving these up to their alphabetical location. Nit-picking.

ItemNum=ItemNum+1
IF (IDFRecords(ObjNum)%Alphas(1) == ObjName) EXIT
IF (SameString(IDFRecords(ObjNum)%Alphas(1), ObjName)) EXIT
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed these to avoid case-sensitivity problems encountered during this work. Hope that's ok. @mbadams5

Heating Coil Total Heating Rate,Heating Coil Heating Rate,
Heating Coil Total Heating Energy,Heating Coil Heating Energy,
Heating Coil Air Heating Rate,Heating Coil Heating Rate,
Heating Coil Air Heating Energy,Heating Coil Heating Energy,
old variable name,new variable name,-- add variable names (before this line) and leave off units -- <DELETE> to delete
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correcting this in old Report Variables csv file.

12,12,These numbers should be the number of report variables in the following list (including deletes). Two columns/numbers.
old variable name,new variable name,-- add variable names (before this line) and leave off units -- <DELETE> to delete
Water to Water Heat Pump Load Side Heat Transfer Rate,Heat Pump Load Side Heat Transfer Rate,
Water to Water Heat Pump Load Side Heat Transfer Energy,EIR Heat Pump Load Side Heat Transfer Energy,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note these were in the wrong place and this line had a stray "EIR". That's been fixed here in the PR. @mitchute

@@ -385,6 +387,218 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctCVNoReheat_Sim)
EXPECT_EQ(SysOutlet(SysNum).AirMassFlowRate, SysInlet(SysNum).AirMassFlowRate);
}

TEST_F(EnergyPlusFixture, AirTerminalSingleDuctCVNoReheat_OASpecification)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New unit test covers the OA specification on this terminal unit. Other unit tests updated as needed.

(Node(AirDistUnit(AirDistUnitNum).OutletNodeNum).Temp - Node(ZoneEquipConfig(ControlledZoneNum).ZoneNode).Temp);
// AirDistUnit( AirDistUnitNum ).HeatRate = max( 0.0, SysOutputProvided );
// AirDistUnit( AirDistUnitNum ).CoolRate = std::abs( min( 0.0, SysOutputProvided ));
if (AirDistUnit(AirDistUnitNum).EquipType_Num(1) == SingleDuctConstVolNoReheat) {
Copy link
Contributor Author

@mjwitte mjwitte Jan 29, 2020

Choose a reason for hiding this comment

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

Forgot to note here. The old direct air terminal unit used a different method to calculate sensible delivered. Duplicated that method here just for SingleDuctConstVolNoReheat to minimize diffs. #7728 posted to resolve late.

@mjwitte
Copy link
Contributor Author

mjwitte commented Jan 29, 2020

So, there's been a legitimate integration test failure for a while that I didn't notice, so not quite ready for review.

@mitchute
Copy link
Collaborator

@mjwitte I did a quick search of the repo for the old object and found a few stray references in IDF comment lines, and two in the IO-docs. I went ahead and made the changes. I also built the docs and they all look good. I'll wait for you to address the last integration test issue before reviewing it further.

@mitchute
Copy link
Collaborator

Oh, and it's also still referenced in HVAC-diagram...

@mjwitte
Copy link
Contributor Author

mjwitte commented Jan 29, 2020

@mitchute Thanks for the cleanup. HVAC-Diagram, hmmm, will check on that, too.

@mjwitte mjwitte mentioned this pull request Jan 30, 2020
20 tasks
old variable name,new variable name,-- add variable names (before this line) and leave off units -- <DELETE> to delete
9.2.0,9.3.0,Transition notes - some of these are EMS variable names
14,14,These numbers should be the number of report variables in the following list (including deletes). Two columns/numbers.
Water to Water Heat Pump Load Side Heat Transfer Rate,Heat Pump Load Side Heat Transfer Rate,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mitchute Not sure why github diff shows all of these lines have changed. Local diff does not. Only line 2 was change and lines 15 and 16 were added.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed, that's odd. Everything looks good #7730. Potentially different line endings or encoding, but both seem unlikely.

@mitchute mitchute mentioned this pull request Feb 7, 2020
20 tasks
@mitchute
Copy link
Collaborator

@mjwitte this is looking good. I don't have any issues from a coding perspective. There was one file that got missed in the transition process, so I went ahead and transitioned it up, tested it, and it worked without issue. All unit tests also pass locally. All changes are now pushed up and I think this should be ready as soon as CI takes another pass.

From an outside reviewer perspective, there are plenty of diffs here but they appear to justified.

Results for the winter and summer design days are plotted.

Var_2
Var_3
Var_18
Var_19
Var_20

Temperatures are consistent and the relative energy diffs are very minor. Given all that's been done, I consider this acceptable.

@Myoldmopar any final thoughts? If not, I think we can merge this in once CI comes back.

@Myoldmopar
Copy link
Member

I have no final thoughts, this looks good, and thanks for the analysis of the diffs there, @mitchute.

@mitchute
Copy link
Collaborator

CI is done and there are addional changes to examine. Merging.

@mitchute mitchute merged commit 0eb2edf into develop Feb 13, 2020
@mitchute mitchute deleted the removeAirTermSDUncontrolled branch February 13, 2020 19:39
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 IDDChange Code changes impact the IDD file (cannot be merged after IO freeze)
Projects
None yet
10 participants