Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixes AirTerminal Mixer used with FanCoilUnit does not respond to fan availability schedule #8115

Merged
merged 5 commits into from
Jun 30, 2020

Conversation

Nigusse
Copy link
Contributor

@Nigusse Nigusse commented Jun 26, 2020

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

@Nigusse Nigusse added the Defect Includes code to repair a defect in EnergyPlus label Jun 26, 2020
@Nigusse
Copy link
Contributor Author

Nigusse commented Jun 26, 2020

These two plots show the defect and the fix. The fix shows that the fancoilunit cycles consistently with the status of the nighcycle availability manager.

ATMixerFlow_CyclingStatus_befreandAfter

@rraustad
Copy link
Contributor

This looks correct now and is the same result back when this was fixed in Trane work last year.

@@ -1308,7 +1315,7 @@ namespace FanCoilUnits {
}
}
// Set the inlet node mass flow rate
if ((GetCurrentScheduleValue(FanCoil(FanCoilNum).SchedPtr) > 0.0 || DataHVACGlobals::ZoneCompTurnFansOn) &&
if (((GetCurrentScheduleValue(FanCoil(FanCoilNum).SchedPtr) > 0.0 && GetCurrentScheduleValue(FanCoil(FanCoilNum).fanAvailSchIndex) > 0.0) || DataHVACGlobals::ZoneCompTurnFansOn) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

This line seems long, was this formatted by Clang?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not try to change the format, it must be auto-formated by Clang.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you select/highlight this line and then on the Edit tab choose Advanced and select "Format Selection" clang should format the line. Do the same for line 3548.

@@ -3538,7 +3545,7 @@ namespace FanCoilUnits {

// Assume the unit is able to vary the flow. A cycling unit is treated as
// if it were variable flow, with the flow being the averaqe flow over the time step
if ((GetCurrentScheduleValue(FanCoil(FanCoilNum).SchedPtr) > 0.0 || DataHVACGlobals::ZoneCompTurnFansOn) &&
if (((GetCurrentScheduleValue(FanCoil(FanCoilNum).SchedPtr) > 0.0 && GetCurrentScheduleValue(FanCoil(FanCoilNum).fanAvailSchIndex) > 0.0) || DataHVACGlobals::ZoneCompTurnFansOn) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Clang formatted?

QLatOut = 0.0;
InitFanCoilUnits(state, FanCoilNum, ZoneNum, ZoneNum);
Sim4PipeFanCoil(state, FanCoilNum, ZoneNum, ZoneNum, FirstHVACIteration, QUnitOut, QLatOut);
// check results when the fna coil unit is not available
Copy link
Contributor

Choose a reason for hiding this comment

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

fna -> fan

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let the CI machine run complete and I will do formatting and cleanup.

Copy link
Contributor

@rraustad rraustad left a comment

Choose a reason for hiding this comment

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

These changes are correct.

@Nigusse
Copy link
Contributor Author

Nigusse commented Jun 26, 2020

Ok. I applied Clang formatting to the two locations and corrected the typo.

@Nigusse
Copy link
Contributor Author

Nigusse commented Jun 28, 2020

I see unrelated diffs and this diffs popped when I removed unused variable. May be it is lagging develop, so I will merge in develop and push.

@Myoldmopar
Copy link
Member

Results look perfect and CI is happy. I believe this is ready to go. @rraustad merge away if you don't have anything further.

@rraustad
Copy link
Contributor

Agreed. I didn't expect any diff's and the plots provided show expected behavior.

@rraustad rraustad merged commit 6c58804 into develop Jun 30, 2020
@rraustad rraustad deleted the 173517788_Issue8107 branch June 30, 2020 16:25
# for free to join this conversation on GitHub. Already have an account? # 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.

Inlet AT Mixer used with Fan Coil does not respond to fan availability schedule
7 participants