Skip to content

Fix various HVACTemplate issues#9019

Merged
Myoldmopar merged 3 commits intodevelopfrom
HVACTemplateIssues2
Sep 8, 2021
Merged

Fix various HVACTemplate issues#9019
Myoldmopar merged 3 commits intodevelopfrom
HVACTemplateIssues2

Conversation

@mjwitte
Copy link
Contributor

@mjwitte mjwitte commented Aug 28, 2021

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

@mjwitte mjwitte added the Defect Includes code to repair a defect in EnergyPlus label Aug 28, 2021
@mjwitte mjwitte added this to the EnergyPlus 9.6 Release milestone Aug 28, 2021
@mjwitte mjwitte changed the title Hvac template issues2 Fix various HVACTemplate issues Aug 28, 2021
@rraustad

This comment has been minimized.

@rraustad

This comment has been minimized.

@mjwitte
Copy link
Contributor Author

mjwitte commented Sep 3, 2021

Closing this for now. Will open a new PR when this is complete.

@mjwitte mjwitte closed this Sep 3, 2021
@mjwitte mjwitte deleted the HVACTemplateIssues2 branch September 3, 2021 15:01
@mjwitte mjwitte restored the HVACTemplateIssues2 branch September 7, 2021 21:22
@mjwitte mjwitte reopened this Sep 7, 2021
@mjwitte mjwitte marked this pull request as ready for review September 7, 2021 21:24
@mjwitte
Copy link
Contributor Author

mjwitte commented Sep 7, 2021

This fixes a collection of HVACTemplate issues. It's ready for review.

CALL SetIfBlank(fldValStart + vsMinOutsideFlowOff, 'autosize')
CALL SetIfBlank(fldValStart + vsMinOutsideControlOff, 'ProportionalMinimum')
CALL SetIfBlank(fldValStart + vsEconomizerKindOff, 'None')
CALL SetIfBlank(fldValStart + vsEconomizerKindOff, 'NoEconomizer')
Copy link
Member

Choose a reason for hiding this comment

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

I can understand some of the changes here, but I don't have a feel for the full context of each change, or the impact/side effects. Perhaps you could comment on some of them, but I also understand that these have stemmed from the vastly improved testing structure set up for the new Python expand objects tool. So I am fine accepting them if you feel these are satisfying the issues identified over there.

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 There are more details in #9018 . Here the default wasn't even a valid choice for this object.

CALL AddToObjFld('Name', base + usAirHandlerNameOff,' Economizer Supply Air Temp Manager')
CALL AddToObjStr('Control Variable','Temperature')
CALL AddToObjStr('minimum supply air temperature {C}','13')
CALL AddToObjFld('minimum supply air temperature {C}',base + usCoolDesignSupplyTempOff,'')
Copy link
Member

Choose a reason for hiding this comment

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

So the magic "13" is gone in this line, what about the magic "45" in the following line?

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.

@Myoldmopar Walkthru.

CALL SetIfBlank(fldValStart + vsMinOutsideFlowOff, 'autosize')
CALL SetIfBlank(fldValStart + vsMinOutsideControlOff, 'ProportionalMinimum')
CALL SetIfBlank(fldValStart + vsEconomizerKindOff, 'None')
CALL SetIfBlank(fldValStart + vsEconomizerKindOff, 'NoEconomizer')
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 There are more details in #9018 . Here the default wasn't even a valid choice for this object.

CALL SetIfBlank(fldValStart + cvsCoolSetPtAtODBHiOff, '12.8')
CALL SetIfBlank(fldValStart + cvsCoolResetODBHiOff, '23.3')
CALL SetIfBlank(fldValStart + cvsHeatCoilKindOff, 'None')
CALL SetIfBlank(fldValStart + cvsHeatCoilKindOff, 'HotWater')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Incorrect default fixed here.

! check if there is no heating coil and heating design setpoint is > preheat design setpoint
IF (heatCoilType == ctNone) THEN
IF(StringToReal(FldVal(base + vsHeatSetPtDesignOff)) .GT. StringToReal(FldVal(base + vsPreheatSetPtConstantOff))) THEN
IF((preHeatCoilType .NE. ctNone) .AND. (StringToReal(FldVal(base + vsHeatSetPtDesignOff)) .GT. StringToReal(FldVal(base + vsPreheatSetPtConstantOff)))) THEN
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 warning is only useful it there is a preheat coil.

!AIR LOOP EQUIPMENT LIST ~ line 552
CALL CreateNewObj('AirLoopHVAC:OutdoorAirSystem:EquipmentList')
CALL AddToObjFld('Name', base + vsAirHandlerNameOff,' OA System Equipment')
IF (heatRecovery .EQ. htrecSens) THEN
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix the order of components to match node connections.

IF (isCoolStPtSchedBlank .AND. (coolSetPtReset == csprNone)) THEN
IF ((heatCoilType .NE. ctNone) .AND. isHeatStPtSchedBlank .AND. (heatSetPtReset == hsprNone)) THEN
IF (FldVal(base + pvavsHeatSetPtDesignOff) .GT. FldVal(base + pvavsCoolSetPtDesignOff)) THEN
IF (StringToReal(FldVal(base + pvavsHeatSetPtDesignOff)) .GT. StringToReal(FldVal(base + pvavsCoolSetPtDesignOff))) THEN
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix GT to be on numbers, not strings - duh.

ELSE
IF (.NOT. isDehumidifyNone) THEN
! Dehumidification humidistat
IF (.NOT. isHumidifierNone .OR. .NOT. isDehumidifyNone) THEN
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix logic for adding humidistat(s) - only if needed.

CALL AddToObjStr('Control Variable','Temperature')
CALL AddToObjStr('minimum supply air temperature {C}','13')
CALL AddToObjFld('minimum supply air temperature {C}',base + usCoolDesignSupplyTempOff,'')
CALL AddToObjStr('maximum supply air temperature {C}','45')
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 is the cooling setpoint manager, so keep the fixed upper limit. Basically, this allows the cooling setpoint to go high enough to turn off the cooling coil if there's not cooling load.

ELSE
CALL AddToObjStr('Economizer Maximum Limit Dewpoint Temperature (C)',' ')
ENDIF
CALL AddToObjFld('Economizer Maximum Limit Dewpoint Temperature (C)',base + usEconoUpDewLimitOff, ' ')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dew point limit should always be used if input, regardless of economizer type (per documentation).

Comment on lines -15003 to +15001
CALL AddToObjFld('Rated Air Flow Rate {m3/s}', base + uhpsSupplyHeatFlowRateOff,'')
CALL AddToObjStr('Rated Air Flow Rate {m3/s}', 'autosize')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Component flow rates/capacities should always be 'autosize'. User values flow into the sizing objects.

!AIR LOOP EQUIPMENT LIST ~ line 552
CALL CreateNewObj('AirLoopHVAC:OutdoorAirSystem:EquipmentList')
CALL AddToObjFld('Name', base + ddsAirHandlerNameOff,' OA System Equipment')
IF (heatRecovery .EQ. htrecSens) THEN
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again - fix order of OA components to match node flow order.

@Myoldmopar
Copy link
Member

Thanks for the walkthrough, it all makes sense. This is a highly valuable set of changes, and again, I am really excited about the robustness improvements to ExpandObjects as an unexpected outcome from the Python conversion. I'm going to merge this in.

@Myoldmopar Myoldmopar merged commit f148fcd into develop Sep 8, 2021
@Myoldmopar Myoldmopar deleted the HVACTemplateIssues2 branch September 8, 2021 17:51
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HVACTemplate errors

8 participants