-
Notifications
You must be signed in to change notification settings - Fork 460
Fix #11050 - Schedule initialization error in HighTempRadiantSystem #11053
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
Conversation
| } | ||
|
|
||
| if (state.dataIPShortCut->lAlphaFieldBlanks(7)) { | ||
| highTempRadSys.setptSched = Sched::GetScheduleAlwaysOff(state); |
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.
Empty field means "AlwaysOff" schedule, so initialize with pointer to "AlwaysOff" schedule object. Not sure how "AlwaysOff" is a setpoint exactly, but that was the previous behavior. There could be a few more of these stragglers and this is the fix for all of them.
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.
Seems like it's dependent on the "Temperature control type" field.
MeanAirTemperature
MeanRadiantTemperature
OperativeTemperature
MeanAirTemperatureSetpoint
MeanRadiantTemperatureSetpoint
OperativeTemperatureSetpoint
One could argue that it should probably fatal out if the ControlType is a Setpoint one and the schedule is missing, but I think it just makes the HighTempRadiant to never do anything,
| if (ZoneTemp < (SetPtTemp - TempConvToler)) { |
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.
If one can argue that it should fatal out than I will make it fatal out. If one can argue that this should be a warning that the system will be disabled then I will do that. I would like to handle this the "right" way. Silently disabling this system if the schedule is empty does not seem like the "right" way.
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.
If one can argue that it should fatal out than I will make it fatal out. If one can argue that this should be a warning that the system will be disabled then I will do that. I would like to handle this the "right" way. Silently disabling this system if the schedule is empty does not seem like the "right" way.
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.
One could start by checking what's really happening if this is blank. https://github.com/NREL/EnergyPlusDevSupport/commit/a18bcf32f0b43ff92a9ebc39169c4e3c30afd854
One could perhaps start by creating four MCVEs:
- TEMP_CTRL_TYPES = ['Operative', 'OperativeSetpoint']
- HAS_SCH = [True, False]
Then run them, then parse the end use by fuel table.
Something like this: https://github.com/NREL/EnergyPlusDevSupport/blob/a18bcf32f0b43ff92a9ebc39169c4e3c30afd854/DefectFiles/11000s/11050/One_could_start_by_checking_what_is_happening_now.ipynb
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.
The schedule is also used if it's not a SetpointControl temperature control type.
I/O Ref states this:
Field: Heating Setpoint Temperature Schedule Name[LINK]
This field specifies the heating setpoint or control temperature for the radiant system in degrees Celsius.
| Real64 SetPtTemp = thisHTR.setptSched->getCurrentVal(); |
One could draw the conclusion that the E+ IDD should probably just make this schedule \required-field.
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 just noticed this too when trying to change the error condition. An empty schedule essentially disables the whole system silently. That's not the right thing to do.
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.
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.
TemperatureControlType (A6) is also not a required field. And when it is left empty, there are is no error message but there are asserts.
| } | ||
|
|
||
| if (state.dataIPShortCut->lAlphaFieldBlanks(7)) { | ||
| highTempRadSys.setptSched = Sched::GetScheduleAlwaysOff(state); |
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.
Seems like it's dependent on the "Temperature control type" field.
MeanAirTemperature
MeanRadiantTemperature
OperativeTemperature
MeanAirTemperatureSetpoint
MeanRadiantTemperatureSetpoint
OperativeTemperatureSetpoint
One could argue that it should probably fatal out if the ControlType is a Setpoint one and the schedule is missing, but I think it just makes the HighTempRadiant to never do anything,
| if (ZoneTemp < (SetPtTemp - TempConvToler)) { |
|
Sorry, all, that I have not been able to keep up on this thread. I'm not sure why the code is currently the way that it is. It's been around for a while (I think this was implemented in the early 2000s), and I honestly can't remember why I would have done it this way. If there is not temperature control type, this is a pointless system that won't do anything. Same goes for the lack of a control temperature schedule. The only reason I can think of to allow the user to do this would be if someone is doing a bunch of iterations and wants an easy way to lock out this system without having to delete the whole thing. I'm not sure that's a good enough reason to allow this unless @mjwitte thinks there is merit to that. I think I would vote for requiring both the control type and the schedule with a severe followed by a fatal error if one or both are missing. |
|
Temperature control type has a default, so that's covered. But the Heating Setpoint Temperature Schedule should be required. One could argue that this should have a transition rule, but it's a pointless simulation without one. So, we could emit a transition warning about it or just let it fly by. BTW this idd note is wrong: Should be? |
…hange input processing and error handling to match
|
I'll get the branch fixed up and pushed. @mjwitte are you satisfied with this change now? |
| highTempRadSys.ControlType = static_cast<RadControlType>(getEnumValue(radControlTypeNamesUC, state.dataIPShortCut->cAlphaArgs(6))); | ||
| if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { | ||
| ShowWarningEmptyField(state, eoh, state.dataIPShortCut->cAlphaFieldNames(6), "OperativeTemperature"); | ||
| highTempRadSys.ControlType = RadControlType::OperativeControl; |
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.
A6 will never be blank since it has a default. Old line 443 is all that is needed.
A6 , \field Temperature Control Type
\note Temperature type used to control unit
\type choice
\key MeanAirTemperature
\key MeanRadiantTemperature
\key OperativeTemperature
\key MeanAirTemperatureSetpoint
\key MeanRadiantTemperatureSetpoint
\key OperativeTemperatureSetpoint
\default OperativeTemperature
| ErrorsFound = true; | ||
| } else if ((highTempRadSys.setptSched = Sched::GetSchedule(state, state.dataIPShortCut->cAlphaArgs(7))) == nullptr) { | ||
| ShowSevereItemNotFound(state, eoh, state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7)); | ||
| ErrorsFound = true; |
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.
A7 is now a required field so it can't be blank (I think) but it can have an invalid name, so 467 should be the only conditional?
|
OK, this was blessed as-is, with an understanding that maybe we can clean up some unnecessary error checking later. @rraustad suggested checking the unit/integration test coverage to find get-input lines that aren't covered by any test, and use that as a starting point for detecting unnecessary checks. Seems like as reasonable a jumping off point as any. Merging this, thanks @amirroth and reviewers. |



Pull request overview
One line fix. Should be self-explanatory.