Hi,
I am not an architect but using your nice simulation tool for a research project, so I do not have an actual layout but having a python layout showing rooms, their sizes, and orientation. What I want to do is run a lighting simulation for my python layout (not Rhinio or cad).
So I found this code online which enables me to use my python layout to run a simple light simulation (example is shown for one room). My problem is that in this code nothing is linking the generated room with the actual address, and also there is no option to pull up the weather data for a specific region. Can you help me know what should be added to this code to enable me pull up the weather data for the area where my layout is located?
Thank you!
from honeybee.room import Room
from honeybee.radiance.material.glass import Glass
from honeybee.radiance.sky.certainIlluminance import CertainIlluminanceLevel
from honeybee.radiance.recipe.pointintime.gridbased import GridBased
# create a test room
room = Room(origin=(0, 0, 3.2), width=4.2, depth=6, height=3.2,
rotation_angle=45)
# add fenestration
# # add a window to the back wall
room.add_fenestration_surface(wall_name='back', width=2, height=2, sill_height=0.7)
# add another window with custom material. This time to the right wall
glass_60 = Glass.by_single_trans_value('tvis_0.6', 0.6)
room.add_fenestration_surface('right', 4, 1.5, 1.2, radiance_material=glass_60)
# run a grid-based analysis for this room
# generate the sky
sky = CertainIlluminanceLevel(illuminance_value=2000)
# generate grid of test points
analysis_grid = room.generate_test_points(grid_size=0.5, height=0.75)
# put the recipe together
rp = GridBased(sky=sky, analysis_grids=(analysis_grid,), simulation_type=0,
hb_objects=(room,))
# write and run the analysis
batch_file = rp.write(target_folder=r'c:\ladybug', project_name='room')
rp.run(batch_file, debug=False)
# results - in this case it will be an analysis grid
result = rp.results()[0]
# print the values for each point
for value in result.combined_value_by_id():
print('illuminance value: %d lux' % value[0])