NREL / bifacial_radiance

Toolkit for working with RADIANCE for the ray-trace modeling of Bifacial Photovoltaics
https://bifacial-radiance.readthedocs.io
BSD 3-Clause "New" or "Revised" License
90 stars 48 forks source link

gendaylit internal bug #377

Open ErwannHouzay opened 2 years ago

ErwannHouzay commented 2 years ago

Hello;

Don't know if it's the best place to submit this bug but I was not able to submit an issue on Radiance project itself...

Within gendaylit program the daynumber variable (line 137) is never initialized when you provide the solar position as input (the way you do it in your code....)

This variable is used for the calculation of the sky_brightness (main parameter of Perez model). As this value is not defined , the compiler probably affect something (likely to be 0 but it could depend on the compiler...)

A workaround for your code is to use the P option to pass the value yourself or use the date parameter (then the day number will be correctly intialized line 417

I have no real idea about the possible impact of this on the sky dome generated.

ErwannHouzay commented 2 years ago

Notice a second bug in the theta_phi_to_dzeta_gamma. Sun azimuth should also be used for the gamma angle calculation.... Impact is probably limited because this is only used for correct sky dome scaling front of input irradiance data

shirubana commented 2 years ago

Hi @ErwannHouzay -- Greg Ward is very active on their Radiance forum. I would recommend posting in there they know gendaylit internal workings and hopefully this can be revised faster/better

https://discourse.radiance-online.org/