Does "gensky" ouput the Global horziontal irradiance and diffuse horizontal irradiance?

Hi everyone,

I am reading Chapter 6 of Rendering with Radiance (1998): Daylight simulation.

I am not sure whether or not this topic should be categorized as “radiance-daysim”, is it an old tool of radiance or just a category name?

The following is my question: when I use the following command, its output is the material and geometry of the Sun and the distribution of the Sky, as shown below.

gensky 11 25 14:00 -a 51 -o 0 -m 0

gensky 11 25 14:00 -a 51 -o 0 -m 0
Local solar time: 14.22
Solar altitude and azimuth: 12.1 31.6
Ground ambient level: 8.1

void light solar
0
0
3 3.215e+06 3.215e+06 3.215e+06

solar source sun
0
0
4 -0.511775 -0.833144 0.209662 0.5

void brightfunc skyfunc
2 skybr skybright.cal
0
7 1 3.521e+00 4.199e+00 3.011e-01 -0.511775 -0.833144 0.209662

Based on the introduction in Section 6.1, my understanding is that the material definition (solar) gives the global RBG horizontal irradiance and the sky distribution (skyfunc) gives the diffuse horizontal RGB irradiance. But the Global Horizontal Irradiance at clear day generally is 1000w/m^2. So, how to understand the RBG irradiance values given in the solar? and skyfunc?

Best regards,
Hao

The “radiance-daysim” category is for discussions related to DAYSIM. The “radiance-general” category is appropriate for lighting & daylight-related topics not specific to that tool.

The sun source determines the direct contributions from the selected date/time/location. The skyfunc modifier must be applied to a sky glow to activate an indirect sky contribution, as explained in the gensky man page. The reason this is not generated by default is to allow maximum flexibility.

I hope this helps.
-Greg

1 Like

Hi Greg,

Thank you so much for your reply.

So based on your reply, my understanding is that in the .mat file generated by gensky command, the sun source determines the direct contribution from the sun (at a given date/time/location). But I still have the following questions:

  1. In the material definition of solar, does the RGB irradiance value reflect the direct normal irradiance or the direct horizontal irradiance? Based on Figure 6.1 in P343 and Equation 6.2 in P345, I understand that it reflects the Direct Normal Irradiance.
  2. If my understanding in Q1 is right, it makes perfect sense that the sun source determines the direct contributions (Direct normal irradiance from the sun), and the skyfunc are applied to a sky glow to reflect the diffuse horizontal irradiance, they together reflect the global horizontal irradiance. Am I right?
  3. But why the direct contribution from the sun is so huge because the solar constant is only 1362 W/m^2.

Thanks again for your help.

Best regards,
Hao

  1. They are related. If you multiply any of the RGB values (as they are the same to yield white light) by the solid angle of the sun, which is roughly PI*(0.5*PI/360)^2 or 6e-5 steradians, you will get direct normal solar irradiance.

  2. Yes, adding direct normal solar irradiance times the cosine of the angle to the zenith (which is the third real argument for the source as well as the last real argument for skyfunc, 0.209662 in your example) to the horizontal diffuse irradiance, which is the reported “Ground ambient level” in the comment at the top times PI. I get around 65.7 watts/m^2 for this value. About 40.3 w/m^ is direct and 25.4 is diffuse.

  3. The solid angle matters, in short.

1 Like

Hi Greg,

Thanks a lot for your explanation.

For Q1 and Q3, based on your explanation, I understand how it works.

But for the second part of your reply, I got the same results as you, the GHI = DNI* cos(the angle to the zenith) + DHI, but I am confused about the part: “the cosine of the angle to the zenith (which is the third real argument for the source as well as the last real argument for skyfunc, 0.209662 in your example)”. The “the cosine of the angle to the zenith” is used to calculate the DNI contribution on the ground.

For “which is the third real argument for the source as well as the last real argument for skyfunc”, A2 is the zenith brightness, what it means here that “as well as the last real argument”? Could you please give a further explanation of this part?

Best regards,
Hao

It’s just the way gensky works with skybright.cal. The solar direction vector is normalized, which means that the Z-component equals the cosine of the angle to the zenith. That’s just how normalized vectors work.

The normalized vector is repeated as the last 3 real arguments of the skyfunc modifier, because skybright.cal uses this vector to compute the angle between the sky-directed ray and the sun for the “gamma” angle used in CIE clear and intermediate sky calculations.

It’s just the way Radiance works with its .cal files that requires the redundant information.

-Greg

1 Like

Hi Greg,

Thank you for your reply.

For the cosine of the angle to the zenith is the Z-component (the last real argument for skyfunc), I understand how it works. Thank you so much for your explanation and patience. I truly appreciate it.

By the way, could you please suggest some references for the calculation of the A2 (the zenith brightness)? I searched it on Google but there is no clear introduction and I only finished the first 6 chapters of the Book Rendering with Radiance. Thank you in advance for your help.

Best regards,
Hao

Hi Hao,

There is no good reference for the calculation of the zenith brightness – you can try the latest edition of “The Daylighting Handbook,” which I believe held the original version of this calculation used in gensky.

In the end, you should provide the zenith brightness using the -b or -B option of gensky if this value matters to you. The default calculation based on atmoshperic turbidity is only supposed to get something reasonable. Since this value varies widely from place to place and day to day, the only accurate way to set it is from measurements.

The ultimate reference for the calculation used by gensky is of course in “ray/src/gen/gensky.c”.

Cheers,
-Greg

1 Like

Hi Greg,

For " The Daylighting Handbook, " , is it the Daylighting Handbook: Daylight simulations, dynamic façades, Reinhart, Christoph F?

Based on my limited knowledge of daylight simulation, I think the zenith brightness matters to me as I plan to do interior daylight simulation with the corresponding weather conditions.

Thanks again for your patience and clear explanation.

Cheers,
Hao

Hi Hao,

Yes, that is the best reference.

This discussion is really very similar to the other thread. If you have weather data for your area, then you should definitely apply the values from that using gensky -b or -B, or better, use gendaylit with its options for setting sky radiance.

Cheers,
-Greg

1 Like

Hi Greg,

Thank you for your help and clarification. I will read this book. I really appreciate your guidance.

Cheers,
Hao