5-phase Cds phase gendaymtx | sky matrix question

Back at it again trying to resolve another issue, this time some questions about the sky matrix using gendaymtx.
My original issue seemed to have come from an incorrect creation of the 5185 sun. While looking through various threads I had seen a comment by Greg that the first sun (no rotations) should be in the +Y direction. Somehow mine had a vector of 0,0,0.0184789 which was throwing off all the matrix calculations. Not sure how this happened (or how I figured it out).
My question came up retracing the steps from Sarith’s tutorial and reviewing the man page for gendaymtx…

  • Section 9.1.3 shows (p81) the sky matrix command as - gendaymtx -m 6 -5 0.533 -of assets/NYC.wea > skyVectors/NYCd6.smx (created without -of for readability)

  • Appendix E | Scripts shows (p131) sky matrix command as - gendaymtx -5 0.533 -d -m 6 assets/NYC.wea > skyVectors/NYCsun.smx

Which of the above is correct ? The outputs are wildly different. The first (without -d) has values for most (if not all) of the components in the matrix file. The second (with -d) shows mostly zeroes throughout the file. I assume this is the expected result for no sky contribution. Since there is no documentation with the “-5” for 5-phase method I don’t know if it is assumed as direct output or not, though assuming it is not by default.

  • Now that my sun file aligns, looks like vetting the test images we do want the “-d” to have only direct components. Without, there is light coming in through the west facing window - which I assume is the sky distribution applied to the 5185 “suns” in the overall sky distribution?

Seems like I answered my own question, the issue of the sun not aligning as expected really threw me off guard. Lucky to have found that post by Greg (though now can’t find again). Confirmation of the inclusion of “-d” would be good, though feel confident it is right.

Best, and thanks in advance (again).

Chris

This should be the correct one.

The commands for the Five Phase Method were based on the validation study that LBNL did in 2015-2017. I just checked the commands that David had mailed me back then and the one highlighted above appears to be right one.
image
Anyway, I hope that either @Greg_Ward or @Taoning_Wang / @Taoning_Wang1 will confirm the correct command.

Regards,
Sarith

I don’t know when I made the comment about the first sun being in the Y-direction, but I don’t think that makes sense in this context. The output of gendaymtx is always dictated by the weather file, which delivers site coordinates and time/day information to determine solar angles.

The difference with and without the gendaymtx -5 option is significant, as you noted. This option was added at @Andrew_McNeil behest to put all the solar energy into one patch at a time rather than distributing it over the nearest four patches. It also uses the actually solar solid angle to compute luminance rather than patch size. The addition of the -d option removes flux from the other (non-solar) patches.

Bottom line, I agree with Sarith that this is the command you should be using to compute the solar-direct portion of the 5-phase method, but other users understand the details much better than I do at this point. For example, @David_Geisler-Morod1 figured out a way to include specular reflected components more accurately in the 5-phase method. See alsothe related thread here.

Thanks Greg (and @sarith) -

I guess my comment about the first sun being in +Y was related to the creation of the 5185 suns file, not the gendaymtx step.


For some reason my first sun was not oriented this way so for the one west facing window I was testing no sun came in. Plus the flux from the non-solar patches was giving this weird result from the expected “visible sun patch” in late afternoon. Sure it was somehow user error as many things are, the good vibes were on my side to be able to figure that out (likely would have never thought that was wrong otherwise).
Thanks!