-
Notifications
You must be signed in to change notification settings - Fork 460
Throw Fatal Error When a Required Node is Missing in HVAC Mixer and Splitter #11098
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
Throw Fatal Error When a Required Node is Missing in HVAC Mixer and Splitter #11098
Conversation
Boththe AirLoopHVAC:Mixer and AirLoopHVAC:Splitter do not have any sort of error message produced when the mixer has no inlet nodes or the splitter has not outlet nodes. So, if a user by accident does not enter a mixer inlet or a splitter outlet, no error messages are produced and E+ crashes when it tries to simulate this device but the arrays are not sized to anything. This error message would avoid a hard crash and alert the user that something is wrong (like a missing comma in the file that prompted this defect). The new code additions here are to resolve the issue.
Forgot to clang-format the code that changed. Also accidentally committed code that should not be changed but has to be modified to work on my Mac temporarily.
Typo got randomly introduced here and caused problems. Fixing it back to the original state.
Creation of a unit test to exercise the new error messages for when a required node is missing from the mixer or splitter.
mjwitte
left a comment
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.
The new error messages work as expected (tested splitter and mixer).
** Severe ** AirLoopHVAC:Splitter, "DOAS LOOP SPLITTER" does not have any outlet nodes.
** ~~~ ** All splitters must have at least one outlet node.
** Fatal ** getAirLoopSplitter: Previous errors cause termination.
But this sort-of related warning is not clear:
** Warning ** AirLoopHVAC:OutdoorAirSystem = "DOAS LOOP OUTDOOR AIR EQUIPMENT LIST": blank Controller List Name must be used with AirLoopHVAC:DedicatedOutdoorAirSystem.
The system name is wrong, but even then, I don't think that controllers are a requirement for an AirLoopHVAC:DOAS system. If the DOAS equipment has no water coils, then it wouldn't need any controllers. The one example file has water coils, so it does have a controller list, SmallOffice_CentralDOAS. I would suggest removing this warning altogether. @rraustad ?
|
Regarding the DOAS controller list, I agree, it should not be required unless there is a water coil in the list. I think the controller presence should be testing for the presence of a water coil. The defect file DOAS OA System object has a blank controller list name so why is the equipment list name reported? The message is using AlphaArray(1) which gets overwritten when the equipment list gets processed prior to checking for the controller list. The DOAS code requires the controller list and should instead check for a water coil here in this else? or move this message elsewhere? The air loop checks for a controller while processing the equipment list in SimAirServingZones::GetAirPathData around line 1340 here. Same for the OA System just below the code in SimAirServingZones here. Notice that AlphArray gets overwritten in the call for the equipment list. The DOAS data should be kept separate with this calling structure. |
|
SimAirServingZones already loops through all OA Systems so maybe @mjwitte is correct and these messages for missing DOAS controller can be deleted. The controller water coil connection will be tested in SimAirServingZones. i.e., just delete the else for if (!lAlphaBlanks(2)). |
|
I think I'm following this. So, @rraustad, would you say: yes, you are on board with the suggestion of @mjwitte to get rid of the code: as part of this work? If yes, then I will delete it and make another commit. If no, I will hold until there is agreement. Thanks to you both for your feedback on this! |
|
@RKStrand yes I am on board with deleting this else. I would ask you test SmallOffice_CentralDOAS, by removing the controller list name from the AirLoopHVAC:OutdoorAirSystem, to make sure the correct warning is reported. |
|
@rraustad @mjwitte After removing the else code as described above and running SmallOffice_CentralDOAS with the controller list names removed from one of the AirLoopHVAC:OutdoorAirSystem definitions, I get the following error messages: ** Severe ** AirLoopHVAC:OutdoorAirSystem = "PSZ-AC:1_OA" invalid Controller List Name = " not found. Is this what was expected/desire? If the answer is yes, I will commit this change. If no, please advise as to what you would like done. Thanks! |
|
Yes, that's the correct type of warning I was looking for. But the test would be for the DOAS system where you removed the check. Try removing |
|
@rraustad 😳 Either I needed to be wearing my glasses or it was a little too early in the morning and I wasn't firing on all cylinders, because clearly I missed that I was changing the wrong object. My bad--sorry about that and for wasting your time. Now, I believe I got rid of the correct controller list. Here is the error message that was produced: ** Severe ** AirLoopHVAC:ControllerList="OA SYS 1 CONTROLLERS" is not referenced on a AirLoopHVAC or AirLoopHVAC:OutdoorAirSystem object. Is this what you were looking for as far as an error message produced by E+? |
|
That's the same dumb warning that requires a controller list and fatals out. A controller is required only if there is a water coil. Do we not have any example files with outdoor air systems that don't use a water coil? |
|
Not exactly, that error is because the controller list is present but never referenced. Try delete the controller list and leaving the controller list name blank. |
|
No problem. Here is what happened when I deleted the controller list and left the controller list name blank: ** Severe ** HVACControllers: GetControllerInput: Controller:WaterCoil="OA HC CONTROLLER 1" not found on any AirLoopHVAC:ControllerList. Not sure why the one error message shows up twice. |
|
Ok, well, now we have dangling controllers, so we need to also delete the controller objects. Then you should have covered all of the bases. |
|
As above but now with the controller objects deleted. Here are the resulting error messages: ** Severe ** GetAirPathData: AirLoopHVAC="OA HEATING COIL 1", invalid actuator. And I realized it wasn't a double error message previously but rather one was "CC" and one was "HC". |
At the request of reviewers, removed an unnecessary warning error (else condition) in MixedAir.cc.
src/EnergyPlus/MixedAir.cc
Outdated
| if (state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "AirLoopHVAC:DedicatedOutdoorAirSystem") == 0) { | ||
| ShowSevereError(state, | ||
| format("{} = \"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, AlphArray(1), cAlphaFields(2))); | ||
| ErrorsFound = true; |
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 to prolong this PR, but this if block makes no sense. It should also be removed.
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.
No problem. I just made a commit that gets rid of this if block (assuming that I got the offending one). Hope this helps and everything continues to come back all green.
Got rid of another section of code that a reviewer felt did not make sense and was unnecessary.
mjwitte
left a comment
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 Thanks. This will merge once CI comes back and reports green.
|
CI is all green. Merging. |
|
Thanks, Mike!
On Jun 20, 2025, at 9:56 AM, Michael J. Witte ***@***.***> wrote:
Merged #11098<https://urldefense.com/v3/__https://github.com/NREL/EnergyPlus/pull/11098__;!!DZ3fjg!-nMToVGlQ2BR-kvemGo6st-hCNCc63-EFz1gMKlsyG0IrwbIr0DzYMI510BsCKM4ZMbDEh5GjYG25Eq7TYqa410zPys$> into develop.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/NREL/EnergyPlus/pull/11098*event-18249317065__;Iw!!DZ3fjg!-nMToVGlQ2BR-kvemGo6st-hCNCc63-EFz1gMKlsyG0IrwbIr0DzYMI510BsCKM4ZMbDEh5GjYG25Eq7TYqaVa5785M$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABMJHPJMYABXGVNIEW4SGN33EQOKRAVCNFSM6AAAAAB7IZSTIKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJYGI2DSMZRG4YDMNI__;!!DZ3fjg!-nMToVGlQ2BR-kvemGo6st-hCNCc63-EFz1gMKlsyG0IrwbIr0DzYMI510BsCKM4ZMbDEh5GjYG25Eq7TYqa3osqeyA$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Pull request overview
Description of the purpose of this PR
In an IDF created by a user, there was a comma missing after the outlet node of an AirLoopHVAC:Mixer. When this was parsed, it meant that the first and only inlet node was not read in. This led to a hard crash of EnergyPlus. This PR fixes the problem so that when no inlet nodes are detected the program produces a severe/fatal with error messages that point to the location of the issue. A similar fix was made to the AirLoopHVAC:Splitter to avoid potential issues with that device. Both were tested with EnergyPlus and produce the severe/fatal when an IDF has a missing comma after the single required outlet (Mixer) or inlet (Splitter) node. A unit test testing the new code is also included.
Pull Request Author
Reviewer