Skip to content
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

Merged
merged 6 commits into from
Aug 27, 2019

Conversation

RKStrand
Copy link
Contributor

@RKStrand RKStrand commented Aug 8, 2019

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.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • At least one of the following appropriate labels must be added to this PR to be consumed into the changelog:

Review Checklist

This will not be exhaustively relevant to every PR.

  • Functional code review (it has to work!)
  • If defect, results of running current develop vs this branch should exhibit the fix
  • CI status: all green or justified
  • Performance: CI Linux results include performance check
  • Unit Test(s)
  • C++ checks:
    • Argument types
    • If any virtual classes, ensure virtual destructor included, other things
  • IDD changes:
    • Verify naming conventions and styles, memos and notes and defaults
    • Open windows IDF Editor with modified IDD to check for errors
    • If transition, add to input rules file for interfaces
    • If transition, add transition source
    • If transition, update idfs
  • If new idf included, locally check the err file and other outputs
  • Required documentation updates?
  • ExpandObjects changes?
  • If output changes, including tabular output structure, add to output rules file for interfaces

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.
@RKStrand RKStrand added Defect Includes code to repair a defect in EnergyPlus EnergyPlus labels Aug 8, 2019
@RKStrand RKStrand requested a review from Myoldmopar August 8, 2019 11:50
@RKStrand RKStrand self-assigned this Aug 8, 2019
@mjwitte mjwitte added this to the EnergyPlus 9.2.0 milestone Aug 12, 2019
Copy link
Member

@Myoldmopar Myoldmopar left a 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);
}
Copy link
Member

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.

@Myoldmopar
Copy link
Member

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

@Myoldmopar Myoldmopar merged commit 3aefaaf into develop Aug 27, 2019
@Myoldmopar Myoldmopar deleted the 7269-SiteGroundDomainNoMassMatCrash branch August 27, 2019 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants