Question on SunLightHours outputs

Hi everyone, this is my first post here, I have used Ladybug before once.

I have a geometry and my main goal is to optimize the surface area of terraces (maximize) vs shadow surface area (minimize). For shadow I can also use number of hours of sun blockage, etc.

I downloaded an example: “Shadow_Range_Analysis” Which calculates the hours of sunlight for a given context on a grid.

What I did is put my breps both on the context input and the _geometry input, meaning it should construct the grid on the brep itself and not a grid on the ground. I dont know if its working correctly, but it seems like it.

LadyBug (302.1 KB)

What is baffling me are the outputs. I realized that for Galapagos I need the hours of shade not the hours of light. To minimize this value while maximizing surface area. I can obtain this with sunIsVisible by inverting the boolean. But, the results seems to differ from totalSunlightHours. By the descriptions I am not sure what totalSunlightHours is doing… I think it has to do with one considering only the hours when the sun is out and the other one considering them all? Dunno.

sunlightHoursResult = 1,035,392 h
sunIsVisible = 1,035,392 h
totalSunlightHours= 12,066,000 h

Pretty big difference of light hours…

Anyone care to explain exactly what totalSunlightHours is doing?

Thanks in advance!

If you see the hint of this output it said is “The average number of hours of direct sunlight received by the test _geometry”.

Hello, thank you for your response.
I have read the hint but i don’t completely understand. Maybe if I could arrive to the same number using mathematical operators within grashopper such as mass addition and average I could understand better.

I believe the total sunlight hours is the total hours across all test points.

The values are multiplied by area of each mesh face to make the results comparable between different cases. It makes more sense if you think about it in a radiation analysis. If we don’t multiply by the area then your for the same surface will be different based on the grid size. The units are hr*m2.