Daylight simulations using Python

Dear All,

I am working on a project to automate daylight simulations. I decided to use Ladybug tools as they are very powerful and relatively easy to use. I have learned how to perform daylight simulations using Grasshopper’s attached sample files, and by doing some training for different scenarios.

However, in my project, I am trying to conduct a “point-in-time-grid” simulation, but in all of my simulation attempts, I get 0 results. This can also happen when i try to conduct “daylight-factor” simulations. I do get results when I perform “annual-daylight” simulations with also some warnings.

I get error messages as follows:

"
*b"2022-03-17 17:16:23 INFO: Started running CreateRadFolder...\r\n2022-03-17 17:16:23 INFO: Started running GenerateSky...\r\n2022-03-17 17:16:24 INFO: c:\\users\\omar_\\ladybug_tools\\python\\lib\\site-packages\\honeybee_radiance_folder\\folder.py:615: UserWarning: Sensors_from_author sensor grid has no light-path. It will not be included in three or five phase studies.\r\n2022-03-17 17:16:24 INFO: 'or five phase studies.' % grid['name']\r\n2022-03-17 17:16:24 INFO: c:\\users\\omar_\\ladybug_tools\\python\\lib\\site-packages\\honeybee_radiance_folder\\folder.py:615: UserWarning: s_grid sensor grid has no light-path. It will not be included in three or five phase studies.\r\n2022-03-17 17:16:24 INFO: 'or five phase studies.' % grid['name']\r\n2022-03-17 17:16:24 INFO: C:\\Users\\omar_\\AppData\\Local\\Temp\\tmpekxtj7uk\r\n2022-03-17 17:16:24 INFO: ...finished running CreateRadFolder in 0:00:01\r\n2022-03-17 17:16:24 INFO: ...finished running GenerateSky in 0:00:01\r\n2022-03-17 17:16:25 INFO: Started running SplitGridFolder...\r\n2022-03-17 17:16:25 INFO: Started running AdjustSky...\r\n2022-03-17 17:16:26 INFO: Distributed 1000 sensors among 5 grids with 200 sensors each.\r\n2022-03-17 17:16:26 INFO: ...finished running SplitGridFolder in 0:00:01\r\n2022-03-17 17:16:26 INFO: ...finished running AdjustSky in 0:00:01\r\n2022-03-17 17:16:27 INFO: Started running CreateOctree...\r\n2022-03-17 17:16:28 INFO: ...finished running CreateOctree in 0:00:01\r\n2022-03-17 17:16:29 INFO: Started running PointInTimeGridRayTracingLoop...\r\n2022-03-17 17:16:29 INFO: Started running PointInTimeGridRayTracingLoop...\r\n2022-03-17 17:16:30 INFO: Started running PointInTimeGridRayTracingLoop...\r\n2022-03-17 17:16:30 INFO: c:\\users\\omar_\\ladybug_tools\\python\\lib\\site-packages\\honeybee_radiance_command\\rcalc.py:98: UserWarning: rcalc: no inputs.\r\n2022-03-17 17:16:30 INFO: warnings.warn('rcalc: no inputs.')\r\n2022-03-17 17:16:30 INFO: rtrace: warning - no light sources found\r\n2022-03-17 17:16:30 INFO: Started running PointInTimeGridRayTracingLoop...\r\n2022-03-17 17:16:30 INFO: ...finished running PointInTimeGridRayTracingLoop in 0:00:01\r\n2022-03-17 17:16:31 INFO: c:\\users\\omar_\\ladybug_tools\\python\\lib\\site-packages\\honeybee_radiance_command\\rcalc.py:98: UserWarning: rcalc: no inputs.\r\n2022-03-17 17:16:31 INFO: warnings.warn('rcalc: no inputs.')\r\n2022-03-17 17:16:31 INFO: rtrace: warning - no light sources found\r\n2022-03-17 17:16:31 INFO: Started running PointInTimeGridRayTracingLoop...\r\n2022-03-17 17:16:31 INFO: ...finished running PointInTimeGridRayTracingLoop in 0:00:01\r\n2022-03-17 17:16:31 INFO: c:\\users\\omar_\\ladybug_tools\\python\\lib\\site-packages\\honeybee_radiance_command\\rcalc.py:98: UserWarning: rcalc: no inputs.\r\n2022-03-17 17:16:31 INFO: warnings.warn('rcalc: no inputs.')\r\n2022-03-17 17:16:31 INFO: rtrace: warning - no light sources found\r\n2022-03-17 17:16:31 INFO: ...finished running PointInTimeGridRayTracingLoop in 0:00:01\r\n2022-03-17 17:16:31 INFO: c:\\users\\omar_\\ladybug_tools\\python\\lib\\site-packages\\honeybee_radiance_command\\rcalc.py:98: UserWarning: rcalc: no inputs.\r\n2022-03-17 17:16:31 INFO: warnings.warn('rcalc: no inputs.')\r\n2022-03-17 17:16:31 INFO: rtrace: warning - no light sources found\r\n2022-03-17 17:16:32 INFO: ...finished running PointInTimeGridRayTracingLoop in 0:00:01\r\n2022-03-17 17:16:32 INFO: c:\\users\\omar_\\ladybug_tools\\python\\lib\\site-packages\\honeybee_radiance_command\\rcalc.py:98: UserWarning: rcalc: no inputs.\r\n2022-03-17 17:16:32 INFO: warnings.warn('rcalc: no inputs.')\r\n2022-03-17 17:16:32 INFO: rtrace: warning - no light sources found\r\n2022-03-17 17:16:32 INFO: ...finished running PointInTimeGridRayTracingLoop in 0:00:01\r\n2022-03-17 17:16:33 INFO: Started running RestructureResults...\r\n2022-03-17 17:16:34 INFO: ...finished running RestructureResults in 0:00:01\r\n"*
b’’
"

any suggestions, please?

Hi @omarhamed,

You can ignore these warnings as they are not errors. To be able to help you with your script you need to share a sample code. Otherwise, it’s almost impossible to say what is going on.

1 Like

Dear @mostapha,

Thank you for your reply.
kindly find the attached file below. I use a simple Shoebox-gbXML model, which is attached below.

Daylight Simulations_Mostapha.ipynb (56.6 KB)

Project1.xml (59.1 KB)

kind regards.

Dear @mostapha,

I have also tested the point-in-time-view recipe, and in best scenarios, the output hdr image looks like this:

I think I do have some problems with the materials/modifiers. I have defined and assigned Modifiers to the model, but the output in any recipe did not change.

Could you help me identify what did I miss?

I am attaching the updated script files below.

Daylight Simulations.ipynb (127.2 KB)

Project21.xml (86.7 KB)

Best Regards.

Hello, Ladybug community,

Could anyone help in resolving this issue described above?

Best regards,
Omar

Dear All,

Thank you for your support. I have reviewed the script again and found that I misspelt one argument that led to placing the values of all inputs to “0”.

Now everything works just fine.

All the best.