-
Notifications
You must be signed in to change notification settings - Fork 389
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
Fix coil speed number equal to zero #10633
Conversation
@rraustad, this PR currently exposes 19 integration tests and 9 regression tests that operate with a coil speed = 0. Is there any chance you could help us isolate whether a zero-speed is intentional or not? |
@@ -665,6 +665,8 @@ void CoilCoolingDX::simulate(EnergyPlusData &state, | |||
bool const singleMode, | |||
Real64 LoadSHR) | |||
{ | |||
assert(speedNum != 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.
If the parent object has no load, or if set point control does not need to turn on, what is the speed set to? I would think it would be 0. But maybe not, it may be speed=1 and speedRatio = 0 (but that doesn't seem intuitive). The point is to allow a call to this sim function with the coil off so that the inlet condition can be passed to the outlet, even if the inlet mass flow = 0 or constant fan is active and the inlet mass flow > 0. If you pass inlet to outlet for a parent that is off, you also have to pass inlet to outlet for all the children. When a user looks at the cooling coil speed report and they know that the coil is off (e.g., winter) and see speed = 1 they would likely think the coil is on. If speed = 1 and speedRatio = 0 means the coil is off then this change is fine. I just think that if the coil is off then speed = 0, cyclingRatio = 0 and speedRatio = 0. One or more of those variables are only non-zero if the coil is on.
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 believe that we've established that there are no use cases where speed=0 is used intentionally except as you outlined (below). The very few regression failures that are left are happening because a handful of simulation paths go through branches where coil speed in a multispeed coil is just not set, which would be a separate issue to log. Could we address this PR with this in mind?
If the parent object has no load, or if set point control does not need to turn on, what is the speed set to? I would think it would be 0. But maybe not, it may be speed=1 and speedRatio = 0 (but that doesn't seem intuitive). The point is to allow a call to this sim function with the coil off so that the inlet condition can be passed to the outlet, even if the inlet mass flow = 0 or constant fan is active and the inlet mass flow > 0. If you pass inlet to outlet for a parent that is off, you also have to pass inlet to outlet for all the children. When a user looks at the cooling coil speed report and they know that the coil is off (e.g., winter) and see speed = 1 they would likely think the coil is on. If speed = 1 and speedRatio = 0 means the coil is off then this change is fine. I just think that if the coil is off then speed = 0, cyclingRatio = 0 and speedRatio = 0. One or more of those variables are only non-zero if the coil is on.
Regarding sensible vs latent control there is an input to select which type of load to activate the system. And even if you pick to operate on either, there may not be a sensible load to meet while there is a latent load to meet.
The very first check in ControlUnitarySystemOutout is the availability schedule. At this point I would think speed = 0, speedRatio = 0, and cyclingRatio = 0. I would also think the child components would also get called with these inputs. Set your test file using an always off availability schedule and step through until the coils/fan gets called and see what happens.
|
Is this actually ready to go? It's kinda hard to tell based on the comments. If it is, let's get some fresh CI results with develop merged in and then I'll dig in. I know the code change is tiny, but if there are side effects, I'd hate to just drop it in last minute. |
@Myoldmopar we believe it's ready. From what we've discovered, we believe there are never instances where the speed is intentionally passed into the function with a value of zero. There appear to be cases in a few example files where the speed is initialized to zero, but never set to a non-zero speed for simulation. It would be good to get @rraustad input on these cases though (either now or on a new branch and a separate PR). |
I don't have a problem with this. The code change catches a possible developer error (what does SpeedNum == 0 mean?) which can be fixed at a later point. |
OK, that's fantastic to hear! Alright, I'll do a test here on this as well. |
Looks like there were a few small diffs last time this ran, so I'll do regressions here as well. |
Diffs locally look similar. The only big diffs were in the two EMS MultiSpeed files, which tracks enough. Let's get this merged. Thanks @tanaya-mankad and @rraustad |
Pull request overview
While integrating a new multispeed coil type, we discovered that many existing coil simulation cases do in fact allow coil operation at speed = 0, and outlet node conditions can change even when the coil should not be running.
We added a check for zero speed (to the existing check that cycling ratio is zero at the lowest speed) and in those cases we exit the calculation by setting output nodes equal to input nodes.
Reviewer
This will not be exhaustively relevant to every PR.