NREL / EnergyPlus

EnergyPlus™ is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption and water use in buildings.
https://energyplus.net
Other
1.11k stars 388 forks source link

Add to warning of negative zone volume the azimuths and tilts for all surfaces in zone #6392

Open JasonGlazer opened 6 years ago

JasonGlazer commented 6 years ago

When a negative zone volume is detected but the zone is fully enclosed, it is likely that the remaining issue is that not all the surfaces coordinates are in the correct order. To help users diagnose this issue, when a negative zone volume is detected the azimuths, tilts and areas for all the surfaces of the zone should be reported. Perhaps the report should only occur when DisplayExtraWarnings is used.

See https://unmethours.com/question/27850/why-a-negative-zone-volume/

To reproduce this problem reverse the order of coordinates for a few of the surfaces for a zone in a test file.

Also added a defect file in DevSupport

JasonGlazer commented 6 years ago

Maybe it could be even smarter and look at the angle between the vector from the center of the zone and the center of each surface and compare it to the outward normal of the wall. If the angle is over 90 degrees it could provide a warning that the specific surface may be reversed.

jasondegraw commented 6 years ago

@JasonGlazer For nonconvex zones, isn't that potentially going to report out surfaces that are definitely not part of the issue? Not really false positives, but close?

JasonGlazer commented 6 years ago

@jasondegraw yes, I would need to be careful about the wording so that people check the surfaces that might be reversed but it doesn't mean that they are. For the case of a convex zone that it is simply an error with the order of the the coordinates, it would probably just point to ones that are a problem but with non-convex zones, it could have some false positives. I think checking for this would only occur when the zone volume is negative or maybe if the volume is significantly lower than the floor area times the average height.

Can you think of something that would be more a definitive way to determine if the surfaces are reversed? It seems like something that should be able to be determined. Maybe instead of the vector starting at the centroid of the zone, it should be from some other location near each wall but within the zone.

jasondegraw commented 6 years ago

@JasonGlazer The best I can think of off the top of my head is that traversing the edges of each surface should traverse each edge twice, once in each directions. That's if all the normals are pointing in the "same" direction and the volume is watertight. If I recall correctly, we can't guarantee that the volumes are watertight, so I'm not sure that helps much. Do we have a check of convexity? I'm not sure "convexity" is even a word.