-
Notifications
You must be signed in to change notification settings - Fork 390
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
Unitary system now reports warning when cycling supply fan schedule is used with setpoint control type #8323
Conversation
…tary-clgcoil-cycling
…tary-clgcoil-cycling
…tary-clgcoil-cycling
src/EnergyPlus/UnitarySystem.cc
Outdated
DataHVACGlobals::OnOffFanPartLoadFraction = 1.0; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, this works but now this same code is in 2 places, here and in initLoadBasedControl. Shouldn't these get moved to initUnitarySystems inside the FirstHVACIteration test (line 1084) so that both control types execute this, it's only done once per time step and there is only 1 copy of these lines of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, I'll make this adjustment once the CI finishes. Thanks
…tary-clgcoil-cycling
@rraustad I moved the fix to initUnitarySystems as recommended to eliminate the duplicated check. If you could make sure I got it in the right spot, it's ready for another review. |
EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); | ||
// cooling coil air inlet node temp is greater than cooling coil air outlet node temp | ||
EXPECT_GT(DataLoopNode::Node(3).Temp, DataLoopNode::Node(2).Temp); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoot, this was ready to merge. Line feed needed at end of unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revision to code location so load based and set point based control use same logic. This looks good. Unit test still needs mod to last line.
src/EnergyPlus/UnitarySystem.cc
Outdated
@@ -991,6 +991,15 @@ namespace UnitarySystems { | |||
DataLoopNode::Node(this->m_HeatRecoveryInletNodeNum).MassFlowRate = mdotHR; | |||
} | |||
|
|||
if (this->m_FanOpModeSchedPtr > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I actually suggested this be moved to line 1006, or better yet 1010, below since it needs only be done once per time step. Might as well make that change while you correct the unit test.
Perfect, I think I'll run the defect file before merging this. Also, check off the pull request author items in the pull request description. Think about the PR title from the users perspective. |
Thanks @matthew-larson. You are done with this one unless something else unexpectedly pops up. I'll get to testing the defect file when I can. |
Sounds good, thanks for your help and walking me through the code, it was very valuable. I'll keep tabs on this to make sure everything comes back clean. |
@rraustad I updated the pull request for the new fix of making sure the correct error is caught when a cycling fan is used with Setpoint control. I also updated the unit test to check for the error. Let me know if you have any additional comments on this. |
DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available | ||
thisSys->getUnitarySystemInputData(state, compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above | ||
std::string const error_string = delimited_string({ | ||
" ** Severe ** AirLoopHVAC:UnitarySystem = UNITARY SYSTEM MODEL\n ** ~~~ ** For FAN:ONOFF = SUPPLY FAN 1\n ** ~~~ ** Fan operating mode must be continuous (fan operating mode schedule values > 0).\n ** ~~~ ** Error found in Supply Air Fan Operating Mode Schedule Name ALWAYSZERO\n ** ~~~ ** ...schedule values must be (>0., <=1.)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthew-larson are you clang formatting as you go? It seems this line would have wrapped. Not sure if it's worth another push if everything else is OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have clang formatting ON in CLion. I can double check that it's working right.
This seems correct now. The DOAS unit uses setpoint control and FanOpMode schedule value = 0
If value for FanOpMode schedule is changed to 1 or that input is left blank then there are no fan op mode schedule warnings and the coil turns on: The check of the FanOpMode schedule for both set point control and load or SZVAV control is not necessary so I'm glad that code was not ultimately moved as discussed. For set point control, we know the fan op mode must be constant so only checking once that the schedule value is > 0 is the only thing needed. |
Running unit tests locally multiple times to get a clean pass. Keeps stalling at LoggingSubStep4stepsPerHour. That unit test should not be related to this change. |
@rraustad, FWIW, that test usually takes a few minutes to complete on my machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple changes made to catch issues with fan operating mode schedule when set point control is used.
15 minutes... 😮 |
Pull request overview
NOTE: ENHANCEMENTS MUST FOLLOW A SUBMISSION PROCESS INCLUDING A FEATURE PROPOSAL AND DESIGN DOCUMENT PRIOR TO SUBMITTING CODE
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.