Modelling sky luminance#

In this tutorial, we will show how astk can be used to model sky luminance, that is how to input natural light conditions for simulating light interception

[1]:
from openalea.astk.sky_map import sky_grid, sky_map, show_sky
from openalea.astk.sky_sources import sky_turtle
from openalea.astk.sky_luminance import sky_luminance
from openalea.astk.sky_irradiance import sky_irradiance

Estimate sky irradiance#

By default , astk simulate one day long clear sky irradiance at Montpellier, the 21 of June 2000. For computing sky irradiance at your location or for longer/shorter perido of time, see ‘Modeling sky irradiance’ companion tutorial

[2]:
sky_irr = sky_irradiance()
sky_irr
[2]:
azimuth zenith elevation ghi dni dhi ppfd
2000-06-21 07:00:00+02:00 64.964943 82.113168 7.886832 60.946465 92.041199 48.316857 148.294639
2000-06-21 08:00:00+02:00 74.426178 71.957421 18.042579 229.864545 453.118711 89.522953 504.948469
2000-06-21 09:00:00+02:00 83.866975 61.281260 28.718740 416.105120 671.771159 93.312118 873.937767
2000-06-21 10:00:00+02:00 94.061489 50.403526 39.596474 591.750512 751.066148 113.038550 1212.231017
2000-06-21 11:00:00+02:00 106.318067 39.689358 50.310642 741.184658 782.891568 138.735360 1496.174934
2000-06-21 12:00:00+02:00 123.250892 29.785355 60.214645 852.932174 778.469936 177.303988 1707.180678
2000-06-21 13:00:00+02:00 149.893038 22.213724 67.786276 918.828032 787.889552 189.415600 1831.279539
2000-06-21 14:00:00+02:00 188.216321 20.077412 69.922588 934.150316 785.467446 196.415993 1860.110781
2000-06-21 15:00:00+02:00 222.570039 24.861968 65.138032 897.808460 790.895864 180.210219 1791.714236
2000-06-21 16:00:00+02:00 244.497975 33.670653 56.329347 812.392859 781.474663 162.019789 1630.727935
2000-06-21 17:00:00+02:00 259.065446 44.019757 45.980243 684.060062 764.123266 134.578851 1387.926414
2000-06-21 18:00:00+02:00 270.262468 54.855468 35.144532 522.326049 715.011297 110.736258 1079.269004
2000-06-21 19:00:00+02:00 280.031698 65.688728 24.311272 340.124868 575.665050 103.127220 725.138994
2000-06-21 20:00:00+02:00 289.403843 76.194198 13.805802 156.015935 290.498008 86.693873 353.173644
2000-06-21 21:00:00+02:00 299.040349 86.002561 3.997439 14.846194 0.000000 14.846194 40.029084

Estimate sky relative luminance#

  • Sky luminance is estimated from sky irradiances, using Perez all weather sky model (R. Perez, R. Seals, J. Michalsky, “All-weather model for sky luminance distribution—Preliminary configuration and validation”, Solar Energy, Volume 50, Issue 3, 1993, Pages 235-245)

  • Luminance is computed every steradian of the sky hemisphere

  • Luminance are scaled to ensure a global horizontal irradiance of 1

[3]:
grid=sky_grid()
sun, sky=sky_luminance(grid, 'all_weather', sky_irr)
[4]:
show_sky(grid, sky)
../_images/notebooks_Sky_luminance_9_0.png

Define sky discretisation#

  • Sky discretisation allow to split the sky in a limited number of direction for efficiency of light modelling.

  • other strategies can be found in the companon tutorial

[5]:
disc = sky_turtle()
sky_agg, grid_agg, sky_disc = sky_map(grid, sky, disc)
show_sky(grid,sky_disc)
../_images/notebooks_Sky_luminance_12_0.png
[ ]:

[ ]: