Followup on the assertion failure solving Te at low load condition in VRFFluidTCtrl model#10994
Followup on the assertion failure solving Te at low load condition in VRFFluidTCtrl model#10994Myoldmopar merged 3 commits intodevelopfrom
Conversation
|
|
rraustad
left a comment
There was a problem hiding this comment.
From the CI results it looks like this worked as expected. Fix up the unit test that failed and this should work. This is approved but will require a small change to the unit test before merging.
Just fixed the unit test. Thanks @rraustad |
|
|
OK, looks good now. I'll merge shortly unless there's any remaining issues. |
|
OK, going in. Thanks for these last minute things @yujiex |
|
@yujiex this new warning, which is a little cryptic (i.e., the user won't know what to do to fix it), is saying why SolveRoot failed with -2. At Te = MinOutdoorUnitTe the capacity is greater than the condenser heat, and at Te = T_suction capacity is also greater than condenser heat. The solution is trying to find Te that will match condenser heat with capacity at speed 1. That seems a little strange since how could that ever happen? I think the model is trying to find Te (SmallLoadTe) that will meet the load at comp speed = 1, without cycling the compressor. In this case that was not possible because the load was smaller than the model allowed at minimum speed/inputs. So if this system could not converge on the small load, and the SolveRoot result was -2, then shouldn't the model operate the system at MinOutdoorUnitTe and then cycle the compressor? Also, this will likely always happen with a VRF system so these warnings will always show up (maybe why they weren't reported in the first place) and an effort should be made to try to eliminate them (i.e., the warnings are only there to point developers to a problem and to inform users of a way to fix the problem if possible). What is also interesting is the warning message tells you this would happen (i.e., f(5) is negative and f(x) is negative). So if the model were to check that first, and only iterate if one of these were positive and the other negative, then the model would never result in SolFla = -2. There is no reason to call SolveRoot if at the bounds (MinOutdoorUnitTe and T_suction) both results are either negative or positive. The issue, if this were to be fixed, would be what Te to operate at when SolFla = -2 and both results were negative (I think MinOutdoorUnitTe) or both results were positive (I think T_suction or higher than T_suction). I can't tell if the model is trying to converge on compressor speed =1 or on the minimum compressor speed. |
|
@rraustad It does seem to attempt to adjust Te to meet the load at the minimum compressor speed level (maybe not speed = 1, but the speed corresponding to the smallest capacity). I guess the current situation seem to have very narrow range for Te (a lot of cases are like Te ranging from 6 to 6.5). So in many situation the solver can't find a solution. The model does try to calculate cycling ratio after the Te adjustment (likely to just set to MinOutdoorUnitTe). I will try to add a check of f(xmin)*f(xmax) < 0 before calling the solver. So the SolFla = -2 warning might not be needed.
|
|
@yujiex you probably want to split this up to capture what side of the solution your at: |
|
I see. Make sense. For the |
I've thought about doing that in the past. And in that case it would be T_suction, I think. My question is, could T_suction be higher than what is used for this iteration (i.e., all that is known are the bounds MinOutdoorUnitTe and T_suction, but could the answer be higher than T_suction) ? So I really don't know the answer to your question. |
|
I feel in the original code, it was assumed that when it's ended up in the low load calculation branch, this But later on, this condition might have changed during the label13 part of the code The following are debug prints: At the beginning, low load condition of For the direction, sometimes it needs larger, sometimes needs smaller to have a solution |
|
OK, you can give that a try. The warnings in SolFla = -1 and SolFla = -2 will show what the model is doing (make sure they each have descriptive messages). No warnings means the model is converging. Warnings in either SolFla block will show where further action is required. |
|
I added some more error message to separate the three cases I tried taking the x such that f(x) is closer to 0 when xmin and xmax is both positive. It seems T_suction is always taken in that case. |
|
Why is the min and max always -2 in all these example files? and why doesn't T_suction float around so that -2 is not always the result? Ahh, this should not be reporting SolFla, it should report SmallLoadTe: If T_suction is always used it makes me think that the bounds are wrong here (that's just a guess, I have no idea what this model is trying to accomplish here looking for SmallLoadTe). Maybe use MinOutdoorUnitTe as the lower bound and something like T_suction + 6 as the upper bound, so that the SolveRoot function can find a solution near "T_suction". Maybe you'll get more information once the warning min/max data are corrected. |
|
Let me change it to report SmallLoadTe in the error message. Also will try to widen the range in SolveRoot by adding some constant to the upper end point T_suction |
|
@rraustad the following are the error ouputs after changing the SolveRoot x range to MinOutdoorUnitTe to T_suction + 6. This eliminated or reduced the error counts with xmin > 0 && xmax > 0. |
|
@yujiex, now you can see what is happening. These warnings will always occur during normal operation so you don't really need the warnings if you can figure out what to do when you know SolveRoot will fail. You could eliminate most of these warnings by using this type of logic. Then that would leave just figuring out what to do when For these warnings, is T_suction being reported, or T_suction + 6? And for the warnings that were eliminated when xmin > 0 && xmax > 0, was SmallLoadTe higher than T_suction? I suspect that is true (which means I'm not sure how to solve this). The other thing that I was wondering about was whether these warnings are reported once per time step, or if there were multiple warnings reported during each time step. It's misleading to report multiple warnings during each time step while the solution is trying to converge. And if the solution did converge on a given time step then you wouldn't want any warnings for that time step. |
|
@rraustad I changed to use this logic. Please see this PR: #11000 For the warnings produced in the previous round, the reported value in the warning is |
Pull request overview
Description of the purpose of this PR
Pull Request Author
Reviewer