-
Notifications
You must be signed in to change notification settings - Fork 418
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
Resolve Site:GroundDomain:* Issues with R-Only Materials #7446
Conversation
Site:GroundDomain:* objects require insulation but using a no mass material for the insulation causes EnergyPlus to crash. This code adds a trap on reading input to flag this problem and force the user to fix this. This check needs to be made in four different places so the fix includes two generic simple subroutines that check to see if there is a problem and then throw an error message if there was a problem. Testing indicates the error message is being produce when it should and not being sent to the err file if things are fine.
This commit includes a unit test for this fix, documentation changes to reinforce the requirement that no-mass materials may not be used for slab and basement insulation, and the renaming of one of the new functions to a clearer name.
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.
I am verifying this locally, but this looks like a good fix. Thanks.
if (SiteGroundDomainUsingNoMassMat(thisDomain.HorizInsThickness,thisDomain.HorizInsMaterialNum)) { | ||
ErrorsFound = true; | ||
SiteGroundDomainNoMassMatError(DataIPShortCuts::cAlphaFieldNames(8),DataIPShortCuts::cAlphaArgs(8),thisDomain.Name); | ||
} |
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.
At first I was going to suggest that the no-mass check function and the error function should be methods on the domain class itself so that you didn't have to pass args. However, I see now that the function would need to switch based on which condition it is checking, and would be overly complicated. On the other hand, in this case, the function is super simple and you just pass in a couple arguments and it is all good.
Verified the NaN defect with develop branch locally. Verified this branch provides a meaningful error message instead and gracefully exits. I also fixed a couple small things that I am pushing up now and this branch will be merged. Thanks @RKStrand |
Pull request overview
EnergyPlus was failing during situations where a user chose a "no mass" material (defined by only an R-Value) as the insulation material for the underground slab or basement model. This is tied to the fact that the model uses the thickness of the insulation material to define a solution mesh. The solution here was to not allow users to use no mass materials for horizontal or vertical insulation in these slab or basement models and require them to using a regular material which includes a designation of thickness, specific heat, etc. The new error message alerts the user to the need to use a regular material rather than a no mass material. This resolve GitHub Issue #7269.
Work Checklist
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Review Checklist
This will not be exhaustively relevant to every PR.