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

ZoneHVAC:PackagedTerminalAirConditioner transition to UnitarySystem #9273

Merged
merged 90 commits into from
Aug 5, 2022

Conversation

mjwitte
Copy link
Contributor

@mjwitte mjwitte commented Feb 15, 2022

This replaces #9052 (hopefully).

Pull request overview

Pull Request Author

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)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@rraustad
Copy link
Contributor

Biggest diff I see in GSHP-GLHE-CalcGFunctions. Of course this does not mean there are not larger diffs in output reports that are not present in this file.

image

@rraustad
Copy link
Contributor

PackagedTerminalAirConditoner shows the diff on compressor part load ratio (upper left plot, electric heating coil should show 0 compressor PLR as it does in this branch [and there is cooling in the middle of the heating design day which should show compressor PLR > 0]) but other plots show results are very close.

image

@Myoldmopar
Copy link
Member

Windows build warning is a false positive, carry on CI...

@rraustad
Copy link
Contributor

ZoneSysAvailManager shows very similar results.

image

@rraustad
Copy link
Contributor

rraustad commented Jul 29, 2022

RoomAirflowNetwork shows a change in ventilation but zone conditions are nearly identical. Not sure what would cause that.

image

@rraustad
Copy link
Contributor

I see big table diffs in DOAToPTAC but it turns out to be a row order change not a mangnitude difference. Electricity:Building moved down 3 rows. You can see Electricity:Facility changed by 0.1W.

image

image

@rraustad
Copy link
Contributor

@Myoldmopar @mjwitte I think I have found all causes of big diffs and either corrected them or opened an issue to explain them. #8750, #8756, #9072, #9093, #9095, #9105, #9291, #9421, #9422, #9423, #9430, #9497, #9496, #9512, #9549. Where do we go from here?

@rraustad
Copy link
Contributor

rraustad commented Jul 31, 2022

Local annual runs using regression tool.

image

DOAToPTAC_DrawReturnAir and MicroCogeneration have the largest difference at 1.53 GJ or 1.65 MJ/m2 and 0.53 GJ or 5.2 MJ/m2

image

@rraustad
Copy link
Contributor

rraustad commented Jul 31, 2022

Generator:FuelSupply,
  NATURALGAS,              !- Name
  TemperatureFromAirNode,  !- Fuel Temperature Modeling Mode
  MicroCoGen1 air inlet node,  !- Fuel Temperature Reference Node Name

NodeList,
  ZN_1_FLR_1_SEC_1 Exhaust Nodes,  !- Name
  ZN_1_FLR_1_SEC_1 Exhaust Node,  !- Node 1 Name
  MicroCoGen1 air inlet node;  !- Node 2 Name

Zone temps are roughly the same. ZN_1_FLR_1_SEC_1 appears to hold zone temp nearer to set point (diffs hold a small negative value across the year). See how ZN_FLR_1_SEC_5 now holds zone temp right at set point = 24C (top right).

image

Generator heat recovery is reduced. I don't know this model.

image

@rraustad
Copy link
Contributor

MicroCogenration is the largest deviation from develop. It looks like it improved but I can't really tell since I don't know this model. All-in-all things are about where they were.

@rraustad
Copy link
Contributor

rraustad commented Aug 1, 2022

DOAToPTAC_DrawReturnAir

image

image

@mjwitte
Copy link
Contributor Author

mjwitte commented Aug 1, 2022

@Myoldmopar @rraustad The source of the case differences in the Coil Sizing table outputs is here in PTAC:

            state.dataPTHP->PTUnit(PTUnitNum).DXCoolCoilType = Alphas(11);

So this is UPPERcase and PTUnit(PTUnitNum).DXCoolCoilType is used for all calls to the setCoil... functions.

Unitary doesn't save the string for cooling coil type (but it does for heating coil type?) and uses DataHVACGlobals::cAllCoilTypes(this->m_CoolingCoilType_Num) for all calls to setCoil... for cooling coils. (For other coil types, it does have some type strings still in the data structure).

It gets a little bit more tangled. DXCoil.cc uses DXCoil(DXCoilNum).DXCoilType when it calls setCoil... and that is DXCoil(DXCoilNum).DXCoilType = CurrentModuleObject which is always CamelCase for any dx coil type.

So, in this instance, PTAC is the odd man out with the all UPPERcase coil type string. Ultimately, all of these coil type strings will become enums and use a consistent lookup when writing the coil sizing reports (which hopefully will all be CamelCase).

(sorry, I went 20 minutes over my 30 minute time limit)

And if you look at other random files, we already have a mix of UPPER and Camel Case in the coil sizing reports.

@Myoldmopar
Copy link
Member

@rraustad this conflicted with the latent sizing merge. I have not looked at the extent of the conflicts. If you want to take a look, that would obviously be ideal, but I am also happy to do it later this morning too. I assume this one could be in line to merge though, once unconflicted.

@Myoldmopar
Copy link
Member

OK, it's time to put this out of its misery. @rraustad this is a fantastic change to the codebase. The work you've put in here will make it easier to continue to bring more parent objects into the unitary system codebase, reducing our maintenance burden, and eliminating capability differences between models and controls. Merging this now. Thanks to everyone who reviewed as well.

@Myoldmopar Myoldmopar merged commit c06ad5d into develop Aug 5, 2022
@Myoldmopar Myoldmopar deleted the PTUnit-to-UnitarySystem2 branch August 5, 2022 13:20
Comment on lines +35836 to +35842
\key Coil:Cooling:DX
\key Coil:Cooling:DX:SingleSpeed
\key Coil:Cooling:DX:VariableSpeed
\key CoilSystem:Cooling:DX:HeatExchangerAssisted
\note Select the type of Cooling Coil.
\note Only works with Coil:Cooling:DX:SingleSpeed or
\note Only works with Coil:Cooling:DX or
\note Coil:Cooling:DX:SingleSpeed or
Copy link
Contributor

Choose a reason for hiding this comment

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

Disclaimer: I know none of this is really enforced on E+ side, and is merely used for IDF Editor, and that we care about it a lot more on the OpenStudio's side.

The 'Cooling Coil Name' field is missing \object-list CoilCoolingDX so that it also matches the Coil:Cooling:DX

   A11, \field Cooling Coil Object Type
        \required-field
        \type choice
        \key Coil:Cooling:DX
        \key Coil:Cooling:DX:SingleSpeed
        \key Coil:Cooling:DX:VariableSpeed
        \key CoilSystem:Cooling:DX:HeatExchangerAssisted
        \note Select the type of Cooling Coil.
        \note Only works with Coil:Cooling:DX or
        \note Coil:Cooling:DX:SingleSpeed or
        \note CoilSystem:Cooling:DX:HeatExchangerAssisted or
        \note Coil:Cooling:DX:VariableSpeed.
   A12, \field Cooling Coil Name
        \required-field
        \type object-list
        \object-list CoolingCoilsDXSingleSpeed
        \object-list CoolingCoilsDXVariableSpeed
+       \object-list CoilCoolingDX
        \note Needs to match a DX cooling coil object.

(and technically CoolingCoilsDXSingleSpeed matches the Coil:Cooling:DX:SingleSpeed and the CoilSystem:Cooling:DX:HeatExchangerAssisted but also the Coil:Cooling:DX:SingleSpeed:ThermalStorage)

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 Refactoring Includes code changes that don't change the functionality of the program, just perform refactoring
Projects
None yet
10 participants