-
Notifications
You must be signed in to change notification settings - Fork 398
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 Use of Incorrect Index for VRF Cooling #10679
Conversation
Corrects a problem noted during code review--CoolingDesignCapacity should have been used, not HeatingDesignCapacity.
Reorganized some of the sizing routine into a new subroutine that covers both heating and cooling. Also made two minor typo corrections in existing input files and made mods to one so that the code in question actually gets used (added design sizing specifications). Only diffs would likely be in the file that has design specifications added since that was the source of the defect.
Addition of a unit test for the new subroutine that was added as part of the defect fix.
EqSizing.DesHeatingLoad, | ||
state.dataSize->DataScalableCapSizingON, | ||
state.dataSize->DataFracOfAutosizedHeatingCapacity); | ||
|
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.
This will certainly avoid the cut-n-paste errors that caused this issue. Is there a chance that the other 12 parent objects will get this change (I searched for FractionOfAutosizedCoolingCapacity)? Or at the very least a new issue opened?
The remaining discussion is for future use.
Now to think outside the box even further... What is really needed is for this "scaling" code to be moved to the sizer class so it's in 1 place. So that each parent does not need this overhead. All the sizer code would need to know is state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HVACSizingIndex. That is, of course, for another day. That said, maybe the arguments could be shortened to pass only the HVACSizingIndex? and a key?
initSizingVars(state, sizingMethod, HVACSizingIndex)
where sizingMethod = CoolingAirFlowSizing, HeatingAirFlowSizing, CoolingCapacitySizing, or HeatingCapacitySizing (did I miss anything?). Maybe that's too much to ask for this issue but it's good to be thinking in that direction (for the sake of moving this to the sizing routines). In this future code I still want to be able to call the sizing like this (maybe with an HVACSizingIndex argument?)
sizingCoolingAirFlow.size(state, TempSize, errorsFound)
but let the sizer handle the scaling. If I were calling CoolingAirFlowSizing I could look up the "cooling air flow" methods on the HVACSizing object because I already know I am sizing cooling air flow. Or set up all scalable sizing in the base class and each sizer uses what is relevant. This was considered when the sizer method was first developed but I decided to punt. Here's a hook, and then see the bottom of initializeWithinEP where this was initially started and then abandoned:
void BaseSizerWithScalableInputs::setHVACSizingIndexData(int const index)
{
this->zoneHVACSizingIndex = index;
}
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 I like your line of thinking here. It would be really nice if this could be standardized across the various models that do this and your thoughts and expertise here are clearly very valuable.
I took a quick look at the various other occurrences in the code using a search for FractionOfAutosizedCoolingCapacity like you did. It seems like there are maybe a couple of cases where the code at first glance at least looks fairly similar to what existed here before the fix was implemented. However, there are other cases where additional steps are being taken. The question is then: how do we accommodate that and still get something that avoids the duplication of code across numerous instances. I really would like to see that happen, but I'm also not sure how that would work at this time. I wonder if that is why you "punted" as you said in your comment?
From my perspective, I am glad that my "value add" to the code here got this conversation started (or restarted?) and might yield other improvements to the code. It would have been easy to just change the one line and move on, but I thought it made more sense to also come up with something that avoids the problem. However, given my relatively low level of experience with the VRF and sizing code, I'm not sure that I'd be the most efficient person to handle anything beyond this. So, I think my vote would be to not attempt to bump the complexity of this up and do more changes here but to definitely open up a new issue that includes your comments here.
Thoughts? Any of the other flagged reviewers want to offer their opinions here?
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.
@RKStrand I'm fine with leaving this as-is. I punted because the sizing functions were enough work on their own without adding in the rewriting and associated testing of scalable sizing in the zone equipment. I did leave the hook in as a starting place for this "sizable" refactor.
That has got a conflict now, but it must not be too intense. I can give resolving it a try if this is worth getting into 24.2. I'm hoping to start RCs later this week, so I'm just wanting to identify which things to work on and which things to skip. |
@Myoldmopar Well, I'd like to get it done for V24.2 since it's part of my deliverables and it would be nice to get that all taken care of to end the FY cleanly. I'll try to take a quick look at the conflict and figure out what the issue is. Hopefully it's not a big deal. |
@Myoldmopar I'm not sure why this created a conflict except that maybe my changes were "staged" in multiple steps. Basically, my code in this branch replaces the develop code. All of the "old" develop code that it is showing as a "conflict" was removed here and moved to the new subroutine that is now being called. It's kinda of a non-issue in my opinion but maybe it got confused because other changes were made in this file. I'm not sure how I resolve it locally and I am not sure what steps are involved in resolving the conflict via a browser. In any case, this is very easy to fix--just get rid of the develop lines that were flagged and leave the new code intact. That should resolve the conflict and implement the fix. |
So, yes, if we can get this resolved and merged for V24.2 that would be helpful and should take very little effort. |
@Myoldmopar Ok, I didn't realize that I could do this directly on the GitHub site. Apparently, I can! So, I went ahead and resolved this. Hopefully, things still come back green and this will be ready to merge. |
|
Editing on GitHub introduced a format issue. Sigh.
|
Diffs as expected, and otherwise clean. Merging this. Thanks @RKStrand |
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.