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

Increase Slat Angle Sampling Frequency for Blind Properties #10646

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

amirroth
Copy link
Collaborator

@amirroth amirroth commented Aug 6, 2024

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.

@amirroth amirroth added the SeverityLow This defect is low severity, generally indicating low impact with a workaround available label Aug 6, 2024
@amirroth amirroth requested review from yujiex, Myoldmopar and vidanovic and removed request for yujiex August 6, 2024 22:00
@amirroth amirroth added this to the EnergyPlus 24.2 milestone Aug 6, 2024
@amirroth amirroth removed the request for review from vidanovic August 7, 2024 13:42
@@ -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)
Copy link
Collaborator Author

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) {
Copy link
Collaborator Author

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.

@Myoldmopar
Copy link
Member

I'll run clang format here and get this merged in.

@Myoldmopar Myoldmopar added Defect Includes code to repair a defect in EnergyPlus Refactoring Includes code changes that don't change the functionality of the program, just perform refactoring labels Aug 19, 2024
@Myoldmopar
Copy link
Member

Looks happy enough, let's merge this. Thanks @amirroth

@Myoldmopar Myoldmopar merged commit ea7067e into develop Aug 19, 2024
10 of 12 checks passed
@Myoldmopar Myoldmopar deleted the InterpSlatAng branch August 19, 2024 15:16
Myoldmopar added a commit that referenced this pull request Sep 3, 2024
@amirroth amirroth mentioned this pull request Sep 9, 2024
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 Refactoring Includes code changes that don't change the functionality of the program, just perform refactoring SeverityLow This defect is low severity, generally indicating low impact with a workaround available
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants