-
Notifications
You must be signed in to change notification settings - Fork 398
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
Increase Slat Angle Sampling Frequency for Blind Properties #10646
Conversation
@@ -61,7 +61,7 @@ namespace EnergyPlus { | |||
|
|||
namespace Material { | |||
|
|||
constexpr int MaxSlatAngs(19); | |||
constexpr int MaxSlatAngs(181); // 1 degree increments for slat angles (We'll see what the performance implications are) |
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.
This is the only real change.
@@ -5833,7 +5833,7 @@ namespace Window { | |||
DPhi = 5.0 * Constant::DegToRadians; | |||
|
|||
// Integrate from -90 to 0 deg | |||
for (int IPhi = 1; IPhi <= 18; ++IPhi) { | |||
for (int IPhi = 1; IPhi <= (Material::MaxProfAngs / 2); ++IPhi) { |
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.
Noticed that these are literals so changed to use the constexpr int MaxProfAngs
. That is all.
I'll run clang format here and get this merged in. |
Looks happy enough, let's merge this. Thanks @amirroth |
Fix Bug Uncovered in PR #10646
This issue summarizes the underlying problem and its solution. TL;DR fixed-slat and movable-slat blinds used two different calculation methods for blind properties, direct calculation at the slat angle for fixed and interpolation between pre-calculated values sampled at 10 degree intervals for movable. This was found to cause meaningful differences between fixed-slat blinds and movable-slat blinds with the slats in the same position (specifically and especially the default 45 degrees). Some notable differences remained when the sampling period was reduced to 5 degrees, and so the period was further reduced to 1 degree.
"Errors" are expected in the three test files that use movable-slat blinds.
This issue was uncovered during the course of a refactor. The resolution is being packaged in a separate PR in order to isolate the output changes.
Comments and follow-up from @mjwitte and @vidanovic in the issue itself.