-
Notifications
You must be signed in to change notification settings - Fork 422
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
Fix tdd calculations in CalcInteriorSolarDistribution #8358
Conversation
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.
@xuanluo113 The code changes look good.
Unit tests all pass when run serially.
I've added some plots showing the changes in the TDD.
But it seems like there should be diffs in the light shelf file. Stepping through the debugger, the code block is not getting used, but somehow the numbers aren't making it all the way to output.
@xuanluo113 Are you planning to look more closely at the lack of diff for the light shelf test file? |
@mjwitte I could do that by reporting related variables and add to the current regression test suite if necessary. However, in the meantime, I found some other similar bugs (non-tdd related) in this function (Issue #8369), which tested locally, may trigger more diffs (less in design day but more in year-round simulation reporting). Hope you can take another look at that issue to verify. I plan to fix those together in this branch unless you suggest otherwise |
@xuanariel Regarding the light shelf, I attempted to add output variables to that file and could not find any that were changing. If you have a test file that shows changes with this branch, please share it. |
@xuanluo113 (correct name this time!) Regarding the light shelf, I attempted to add output variables to that file and could not find any that were changing. If you have a test file that shows changes with this branch, please share it. |
@mjwitte Thanks.
I searched these arrays globally, they were used for calculating QDforDaylight (Diffuse solar radiation in a zone from sky and ground diffuse entering) back in 2007, but not anymore ever since. However, there still hang quite some blocks there to calculate these intermediate arrays. Anyhow, I plan to leave this bug fixing branch as it is and switch back to window-struct2 (PR #8347) to fix the second issue. There are nested branches and variables related to those calculations and would be better to add the fix upon the refactoring branch. The branch window-struct2 is currently cleaned up to be reviewed next. |
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.
@xuanluo113 This looks good. A few comments that can be addressed here or in the next window-struct branch. Let me know. I've pulled in develop to let CI make another pass before merging.
@@ -8190,6 +8160,7 @@ namespace SolarShading { | |||
if (SurfWinOriginalClass(SurfNum) == SurfaceClass_TDD_Diffuser) { | |||
PipeNum = SurfWinTDDPipeNum(SurfNum); | |||
SurfNum2 = TDDPipe(PipeNum).Dome; | |||
CosInc = CosIncAng(TimeStep, HourOfDay, SurfNum2); |
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.
Seems like CosInc
should be declared here with local scope (and also up in line 6360?). Possibly the same for some of these other variables. If you are planning that already in the next windowstruct branch, then it's ok here as-is.
WinTransBmBmSolar(SurfNum) = 0.0; | ||
WinTransBmDifSolar(SurfNum) = 0.0; |
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.
The full arrays for WinTransBmBmSolar
and WinTransBmDifSolar
are zeroed already in lines 6276:6277. Delete one of these?
WinTransBmSolar(SurfNum) = 0.0; | ||
WinTransBmDifSolar = 0.0; | ||
WinTransBmDifSolar(SurfNum) = 0.0; |
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.
And these lines probably are not necessary if these have been zeroed up at the top of the loop, but it's hard to know for sure if the path leads directly here or if the reset to zero is necessary.
@mjwitte Thanks! These have been resolved or do not apply anymore in the |
@xuanluo113 Thanks for clarifying. This will merge once CI finishes. |
Pull request overview
These are the changes for DaylightingDeviceTubular:

The changes look reasonable, but the heat gain/loss is wrong based on the other temperatures. Will post a new issue for that.
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.
If feature, test running new feature, try creative ways to break itCheck any new function arguments for performance impactsVerify IDF naming conventions and styles, memos and notes and defaultsIf new idf included, locally check the err file and other outputs