-
Notifications
You must be signed in to change notification settings - Fork 377
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
Correct logic in supplemental water coil used in UnitarySystem #10479
Conversation
src/EnergyPlus/UnitarySystem.cc
Outdated
this->m_SuppHeatCoilIndex, | ||
QActual, | ||
this->m_FanOpMode, | ||
this->m_SuppHeatPartLoadFrac); |
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.
Not sure how this coil wound up not calling the coil model when there was no supplemental heating load. I also wonder if this is the only coil model doing that?
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 see, lines 12181 was changed to 12182. So these changes probably need to be revised in case the coil is not present or is off for this time step.
// if (present(SuppCoilLoad)) {
if (SuppHeatCoilLoad > 0.0) {
src/EnergyPlus/UnitarySystem.cc
Outdated
@@ -1050,6 +1057,7 @@ namespace UnitarySystems { | |||
} else { | |||
this->m_DesignSuppHeatingCapacity = 0.0; | |||
} | |||
state.dataLoopNodes->Node(this->m_SuppCoilAirInletNode).MassFlowRate = saveCoilAirflow; |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
…78-poor-HW-supp-heat-control
src/EnergyPlus/UnitarySystem.cc
Outdated
if (SuppHeatCoilLoad > 0.0) { | ||
// see if HW coil has enough capacity to meet the load | ||
mdot = min(state.dataLoopNodes->Node(this->m_SuppCoilFluidOutletNodeNum).MassFlowRateMaxAvail, this->m_MaxSuppCoilFluidFlow); |
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 are 2 parts to this simple change. The first is if there is a supplemental heating load set the water mass flow rate to max, else set it to 0.
src/EnergyPlus/UnitarySystem.cc
Outdated
General::SolveRoot(state, Acc, MaxIte, SolFla, PartLoadFrac, f, 0.0, 1.0); | ||
this->m_SuppHeatPartLoadFrac = PartLoadFrac; | ||
} else { | ||
this->m_SuppHeatPartLoadFrac = (SuppHeatCoilLoad > 0.0) ? 1.0 : 0.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.
And second is if QActual > SuppHeatCoilLoad (12188) then SolveRoot on the result (that part I did not change), else (12201 - this part I did change) set supp heater PLR to 1, unless supp heater load is 0 in which case set PLR to 0. This code now executes whether or not the coil is on so need to account now for when it's off. If mdot water = 0 then QActual should return as 0, so, hopefully, QActaul > SuppHeatCoilLoad should be false in that case. So at the else here, either the load is greater than what the coil can provide or the coil is off because there is no load. I guess I could have also used (mdot > 0)
here. There is no change to the other section of this code, it just looks that way since I added the else for mdot = 0 (12176 and 12177).
Pretty minimal set of changes here @rraustad, and yet they conflicted. :) I'm wondering if it's just the HVAC namespace change. If this is ready for review, could you go ahead and resolve the conflict, and is there a test to be added to cover this fix? |
@Myoldmopar will do. |
It was just the one line |
…78-poor-HW-supp-heat-control
…-HW-supp-heat-control
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.
@rraustad Fix looks proper. Unit tests pass. Thanks for the extensive charts to compare before and after. Will let CI run with updated branch and then merge.
CI is all clean and green. Mergine. Thanks @rraustad |
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.