-
Notifications
You must be signed in to change notification settings - Fork 422
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
FixHVACUnitarySystem SetOnOffMassFlowRate NAN problem #4761
Conversation
… assignments for MSHPMassFlowRateLow and MSHPMassFlowRateHigh to prevent divide by zero in CalcMultiSpeedDXCoilCooling/Heating.
…ixNANProblems-Issue4557
@rraustad This is ready for your review. The BadAxe-Base_141019_4spd-MJW defect file runs now, with dx coil airflow per capacity warnings. Not sure if those warnings are expected or if that indicates a problem with the fix. Also, the fix does not really address how a multispeed coil should be controlled when using a unitary system with setpoint control. This just addresses avoiding a divide by zero. |
…d revised logic in SetOnOffMassFlowRate subroutine to always set multi-speed coil mass flow rate globals.
…rected missed setting of variables).
@rraustad Thanks for the second pass on this. I see one unit test is failing. I'll wait for the CI backlog on new features to settle down then merge develop back in here and fix that. |
At this point I don't mind if you load up the robots. Thanks for the
patience.
|
All unit tests passed here. I expanded on the unit test you created and pushed that up. If it's failing now you didn't get the latest version of unit tests? |
@rraustad The CI reports showed a failure. I'll reconfirm when I merge in develop (and resolve conflicts ). |
HVACTemplate-5ZoneUnitarySystem has audit, rdd, and err (less max iters) diff's. Also convergence diff's in the eio. I typically don't believe those results since it's a moving target. |
I went through the Win64-Windows-7-VisualStudio-12 failures and all I see are aud, err, rdd, and eio (convergence) diff's for HVACTemplate-5ZoneUnitarySystem and aud, rdd, and eio (convergence) for UnitarySystem_*. Where do I see csv diff's? |
They aren't showing up. However, the CSV and eio numeric diffs have been
tightly aligned in testing I've done. If I see eio diffs I usually run the
regressions locally.
|
…ixNANProblems-Issue4557 Conflicts: tst/EnergyPlus/unit/CMakeLists.txt
@Myoldmopar @rraustad Brought this branch up to date, resolved the conflict, added deallocates to a bunch of unit tests (trying not to conflict withe @jasondegraw changes on the fluid cooler branch), and a couple of other cleanups to the IDD and dx coil warnings. |
@Myoldmopar Concerned that the regression diffs here show max iteration warnings for HVACTemplate-5ZoneUnitarySystem in both develop and this branch. When did those creep in? But I have yet to reproduce those warnings locally. See error diffs here |
@Myoldmopar Oh - CI forces design day runs, which do produce max iteration warnings for HVACTemplate-5ZoeneUnitarySystem - even with 8.2.0. Shouldn't be. Need to work on figuring out why for that (and any others that don't run well with design days only. Post that as an issue or a story or? |
@Myoldmopar Please review changes to unit tests. I restarted the integration coverage tests (seemed stuck for too long) . Because I've made unit test changes both here and in #4624 this should wait until 4624 gets merged in and then I'll merge develop back here to resolve any conflicts in the unit tests. |
@rraustad So, these changes are causing new max iteration warnings with HVACTemplate-5ZoneUnitarySystem when run as-is (using the short runperiods in the example file). Current develop does not have these warnings. So, we need to double-check these changes. UnitarySystem_VSHeatPumpWaterToAirEquationFit has max iteration warnings both before and after this fix - which isn't good either, but perhaps a different issue. |
I haven't been able to find a problem with changes to this PR. I do see where the load is very close to the comp off capacity (~1W) which appeared to confuse the model. A few time steps later, it runs fine with only a couple iterations. I'll need to look more closely at what is happening. I can't say yet if this is a new problem but does look so thus far. |
@rraustad Thanks for looking at this more. Do you have an pending changes on your machine? If not, I will merge develop into here again and resolve the conflict (which is probably in the unit tests again). |
No pending changes at this time. I will look at this more over the weekend. |
…ixNANProblems-Issue4557 Conflicts: tst/EnergyPlus/unit/PurchasedAirManager.unit.cc
@rraustad I've merged in develop and pushed this up, so be sure to pull down the latest before you look at this again. |
…iteration on PLR (actually CycRatio or SpeedRatio).
@rraustad So, what it really needs is to operate at a mixture of flow rates during a single timestep. Could that be done? Would a reasonable compromise be to lock the flow rate based on the initial zone load request? In this case, zone needs cooling (albeit a very small amount) so operate this timestep at the cooling supply flow rate. Other solutions? |
Well, the zone needs cooling if the air flow is at the heating flow rate. The zone needs heating if operating at the cooling air flow rate. Constant fan is used during the day. If we change the example file to be multispeed heating and cooling, I think the max iters would go away (nope, they were not eliminated, I tried 2- and 3-spd heating, that surprises me). I wonder if industry has ever ran into this? What would a real system do if OA was provided and heating used full flow only while cooling allowed multiple speeds? A real system would operate in one mode based on zone load as you suggested. Eventually, the zone would float to the deadband while the system fan continued to operate. Either cooling or heating mode would turn on eventually. What's different with E+ is the OA system uses the previous time step flow to determine mixed air temp, this sometimes screws up the model. Maybe if flow was determined by load, this wouldn't be an issue. I guess that's what a real system would do so maybe it's a reasonable solution. This would mean then that constant fan systems would at times overshoot the (alternate) set point and also lead to smaller system time steps. I'll see if I can test this theory (comment out where I switch modes). |
@rraustad Longer term we should consider making the OA system a child of the unitary system so it gets simulated with whatever airflow rate the unitary system is operating at (no back and forth on that). And there may be some control logic changes that are in order as well. But for now, the changes you pushed up yesterday have resolved the iteration errors for the two single-day runperiods. I'm running an annual simulation now. |
Remember I was using London, I wanted the mild loads. |
@rraustad That went right past me (London). And Chicago annual simulation hits max iteration errors as well. |
After commenting out the mode switching, this looks like what I would expect. What I didn't expect is to still get max iteration warnings (starts at 1/14 8 AM ~100 of them). Uses 3-spd DX cooling and heating coils. I don't know if this is a different issue or not (i.e., if the model is working as I intend). Since the heating speed never got above 1 (10 in the figure), the OA system should have reasonably determined the mixed air temp from the previous time step recirc flow. |
@rraustad I've lost track of our status on this one. Is it ready to go in? |
…ixNANProblems-Issue4557 Conflicts: tst/EnergyPlus/unit/CMakeLists.txt
@@ -10987,13 +11094,21 @@ namespace HVACUnitarySystem { | |||
InletNode = UnitarySystem( UnitarySysNum ).UnitarySystemInletNodeNum; | |||
|
|||
if ( SpeedNum > 1 ) { | |||
AverageUnitMassFlow = CompOnMassFlow; | |||
if( CoolingLoad && MultiOrVarSpeedCoolCoil( UnitarySysNum ) || HeatingLoad && MultiOrVarSpeedHeatCoil( UnitarySysNum ) ) { |
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 The clang tests are throwing four warnings like this:
'&&' within '||' [-Wlogical-op-parentheses]
This line looks like it needs some clarification with parentheses. Also 11107 below. Not sure why four warnings.
@Myoldmopar @jasondegraw This is the pull request where I mixed in a bunch of new unit test deallocates. |
I'll fix that as soon as I can. Should be ( && ) || ( && ) |
@rraustad If you can't get to it, I can make that change. |
Corrected () || () issue and merged develop again. Defect file runs to completion. I still don't like some of the code I see, but since this model was presumably thoroughly tested, I am hesitant to make significant changes. I do see some areas that still need to be revised but these are not associated with this issue. So I suggest this gets merged. I'm pushing now to see what CI does. |
Looks like CI should be OK with it. The semi-expected unit test issues plus a few isolated regressions and reduced max-hvac-iteration warnings. I'll wait until I'm in the office and there should be a few more results by then, then I can merge or whoever else. |
@Myoldmopar @rraustad This branch has merge conflicts now. I can fix unless one of you has already started. |
…ixNANProblems-Issue4557 Conflicts: idd/Energy+.idd.in tst/EnergyPlus/unit/PurchasedAirManager.unit.cc
@Myoldmopar @rraustad Develop merged, conflict resolved, IDD reference re-fixed. One more round of CI, then this can go in. |
FixHVACUnitarySystem SetOnOffMassFlowRate NAN problem
Fixes #4557