honeybee.radiance.recipe package¶
Subpackages¶
- honeybee.radiance.recipe.annual package
- honeybee.radiance.recipe.daylightcoeff package
- honeybee.radiance.recipe.daylightfactor package
- honeybee.radiance.recipe.directreflection package
- honeybee.radiance.recipe.fivephase package
- honeybee.radiance.recipe.pointintime package
- honeybee.radiance.recipe.radiation package
- honeybee.radiance.recipe.solaraccess package
- honeybee.radiance.recipe.threephase package
Submodules¶
honeybee.radiance.recipe.parameters module¶
Radiance parameters collection for recipes.
Note on default parameters for daylight coefficient based studies
- These parameters are meant specifically for rcontrib-based workflows and are not
- applicable to conventional rpict- and rtrace- based simulations.
- The values in tuples DCDEFAULTS, VMDEFAULTS are geared towards illuminance
- simulations. The values for DMDEFAULTS and SMDEFAULTS can be used with image-based simulations too.
- The value for limit-weight should be a value less than 1/ambient-divisions. The
- current values have been assigned as (1/ambient-divisions)*0.01. This should be taken into account if these parameters are being changed in the future.
- Finally, in the present scenario, there are no optimized set of parameters to
- bring any simulation results to convergence using Monte-Carlo simulations. So, these default values are based on best-practice discussions and experience of developers.
-
class
honeybee.radiance.recipe.parameters.
Parameters
(rad, vmtx, dmtx, smtx)¶ Bases:
tuple
-
dmtx
¶ Alias for field number 2
-
rad
¶ Alias for field number 0
-
smtx
¶ Alias for field number 3
-
vmtx
¶ Alias for field number 1
-
-
honeybee.radiance.recipe.parameters.
get_radiance_parameters_grid_based
(quality, rec_type)[source]¶ Get Radiance parameters for grid based recipes.
Parameters: - quality – 0 > low, 1 > Medium, 2 > High
- rec_type – Type of recipe. 0 > Point-in-time, 1 > Daylight Coeff., 2 > 3Phase, 3 > 5Phase
Returns: radiance_parameters, viewMatrixParameters, daylight_matrixParameters, sun_matrixParameters
-
honeybee.radiance.recipe.parameters.
get_radiance_parameters_image_based
(quality, rec_type)[source]¶ Get Radiance parameters for image based recipes.
Parameters: - quality – 0 > low, 1 > Medium, 2 > High
- rec_type – Type of recipe. 0 > Point-in-time, 1 > Daylight Coeff., 2 > 3Phase, 3 > 5Phase
Returns: radiance_parameters, viewMatrixParameters, daylight_matrixParameters
honeybee.radiance.recipe.recipedcutil module¶
A collection of useful methods for daylight-coeff recipes.
-
honeybee.radiance.recipe.recipedcutil.
coeff_matrix_commands
(output_name, receiver, rad_files, sender, points_file=None, number_of_points=None, rfluxmtx_parameters=None)[source]¶ Returns radiance commands to create coefficient matrix.
Parameters: - output_name – Output file name.
- receiver – A radiance file to indicate the receiver. In view matrix it will be the
- group and in daylight matrix it will be the sky. (window) –
- rad_files – A collection of Radiance files that should be included in the scene.
- sender – A collection of files for senders if senders are radiance geometries such as window groups (Default: ‘-‘).
- points_file – Path to point file which will be used instead of sender.
- number_of_points – Number of points in points_file as an integer.
- rfluxmtx_parameters – Radiance parameters for Rfluxmtx command using a RfluxmtxParameters instance (Default: None).
-
honeybee.radiance.recipe.recipedcutil.
create_reference_map_command
(view, view_file, outputfolder, octree_file)[source]¶ Create a reference map to conver illuminance to luminance.
-
honeybee.radiance.recipe.recipedcutil.
final_matrix_addition
(skymtx, skydirmtx, sunmtx, output)[source]¶ Add final sky, direct sky and sun matrix.
-
honeybee.radiance.recipe.recipedcutil.
final_matrix_addition_radiation
(skydifmtx, sunmtx, output)[source]¶ Add final diffuse sky and sun matrix.
-
honeybee.radiance.recipe.recipedcutil.
get_commands_radiation_sky
(project_folder, sky_matrix, reuse=True, simplified=False)[source]¶ Get list of commands to generate the skies.
1. sky matrix diffuse 3. sun matrix (aka analemma)
This methdo genrates sun matrix under project_folder/sky and return the commands to generate sky number 1.
Returns a namedtuple for (output_files, commands) output_files in a namedtuple itself (sky_mtx_total, sky_mtx_direct, analemma,
sunlist, analemmaMtx).Simplified method will only calculate radiation under patched sky.
-
honeybee.radiance.recipe.recipedcutil.
get_commands_scene_daylight_coeff
(project_name, sky_density, project_folder, skyfiles, inputfiles, points_file, total_point_count, rfluxmtx_parameters, reuse_daylight_mtx=False, total_count=1, radiation_only=False, transpose=False, simplified=False)[source]¶ Get commands for the static windows in the scene.
Use get_commands_w_groups_daylight_coeff to get the commands for the rest of the scene.
Parameters: - project_name – A string to generate uniqe file names for this project.
- sky_density – Sky density for this study.
- project_folder – Path to project_folder.
- skyfiles – Collection of path to sky files. The order must be (sky_mtx_total, sky_mtx_direct, analemma, sunlist, analemmaMtx). You can use get_commands_sky function to generate this list.
- inputfiles – Input files for this study. The order must be (opqfiles, glzfiles, wgsfiles, extrafiles). Each files object is a namedtuple which includes filepath to radiance files under fp and filepath to backed out files under fpblk.
- points_file – Path to points_file.
- total_point_count – Number of total points inside points_file.
- rfluxmtx_parameters – An instance of rfluxmtx_parameters for daylight matrix.
- reuse_daylight_mtx – A boolean not to include the commands for daylight matrix calculation if they already exist inside the folder.
-
honeybee.radiance.recipe.recipedcutil.
get_commands_sky
(project_folder, sky_matrix, reuse=True)[source]¶ Get list of commands to generate the skies.
- total sky matrix
- direct only sky matrix
- sun matrix (aka analemma)
This methdo genrates sun matrix under project_folder/sky and return the commands to generate skies number 1 and 2.
Returns a namedtuple for (output_files, commands) output_files in a namedtuple itself (sky_mtx_total, sky_mtx_direct, analemma,
sunlist, analemmaMtx).
-
honeybee.radiance.recipe.recipedcutil.
get_commands_w_groups_daylight_coeff
(project_name, sky_density, project_folder, window_groups, skyfiles, inputfiles, points_file, total_point_count, rfluxmtx_parameters, reuse_daylight_mtx=False, total_count=1, radiation_only=False, transpose=False)[source]¶ Get commands for the static windows in the scene.
Use get_commands_w_groups_daylight_coeff to get the commands for the rest of the scene.
Parameters: - project_name – A string to generate uniqe file names for this project.
- sky_density – Sky density for this study.
- project_folder – Path to project_folder.
- window_groups – List of window_groups.
- skyfiles – Collection of path to sky files. The order must be (sky_mtx_total, sky_mtx_direct, analemma, sunlist, analemmaMtx). You can use get_commands_sky function to generate this list.
- inputfiles – Input files for this study. The order must be (opqfiles, glzfiles, wgsfiles, extrafiles). Each files object is a namedtuple which includes filepath to radiance files under fp and filepath to backed out files under fpblk.
- points_file – Path to points_file.
- total_point_count – Number of total points inside points_file.
- rfluxmtx_parameters – An instance of rfluxmtx_parameters for daylight matrix.
- reuse_daylight_mtx – A boolean not to include the commands for daylight matrix calculation if they already exist inside the folder.
-
honeybee.radiance.recipe.recipedcutil.
image_based_view_coeff_matrix_commands
(receiver, rad_files, sender, view_info_file, view_file, view_rays_file, rfluxmtx_parameters=None)[source]¶ Returns radiance commands to create coefficient matrix.
Parameters: - receiver – A radiance file to indicate the receiver. In view matrix it will be the
- group and in daylight matrix it will be the sky. (window) –
- rad_files – A collection of Radiance files that should be included in the scene.
- sender – A collection of files for senders if senders are radiance geometries such as window groups (Default: ‘-‘).
- points_file – Path to point file which will be used instead of sender.
- number_of_points – Number of points in points_file as an integer.
- sampling_rays_count – Number of sampling rays (Default: 1000).
- rfluxmtx_parameters – Radiance parameters for Rfluxmtx command using a RfluxmtxParameters instance (Default: None).
-
honeybee.radiance.recipe.recipedcutil.
image_based_view_matrix_calculation
(view, wg, state, sky_matrix, extention='', digits=3)[source]¶
-
honeybee.radiance.recipe.recipedcutil.
image_based_view_sampling_commands
(project_folder, view, view_file, vwrays_parameters)[source]¶ Return VWrays command for calculating view coefficient matrix.
-
honeybee.radiance.recipe.recipedcutil.
imaged_based_sun_coeff_matrix_commands
(output_filename_format, view, view_rays_file, scene_files, analemma, sunlist)[source]¶
-
honeybee.radiance.recipe.recipedcutil.
matrix_calculation
(output, v_matrix=None, t_matrix=None, d_matrix=None, sky_matrix=None)[source]¶ Get commands for matrix calculation.
This method sets up a matrix calculations using Dctimestep.
-
honeybee.radiance.recipe.recipedcutil.
rgb_matrix_file_to_ill
(input, output, transpose=False)[source]¶ Convert rgb values in matrix to illuminance values.
-
honeybee.radiance.recipe.recipedcutil.
sky_receiver
(filepath, density, ground_file_format=None, sky_file_format=None)[source]¶ Create a receiver sky for daylight coefficient studies.
-
honeybee.radiance.recipe.recipedcutil.
skymtx_to_gendaymtx
(sky_matrix, target_folder)[source]¶ Return gendaymtx command based on input sky_matrix.
-
honeybee.radiance.recipe.recipedcutil.
sun_coeff_matrix_commands
(output, point_file, scene_files, analemma, sunlist, irradiance_calc)[source]¶ Return commands for calculating analemma coefficient.
Parameters: - output – Output daylight coefficient file (e.g. suncoeff.dc).
- point_file – Path to point / analysis grid file. In case of multiple grid put them together in a single file.
- scene_files – A list fo scene files. Usually black scene.
- analemma – Path to analemma file. You can generate analemma file using sun_matrix class. Analemma has list of sun positions with their respective values.
- sunlist – Path to sunlist. Use sun_matrix to generate sunlist.
- simulation_type –
Returns: octree and rcontrib commands ready to be executed.
-
honeybee.radiance.recipe.recipedcutil.
sun_matrix_calculation
(output, dc_matrix=None, sky_matrix=None)[source]¶ Get commands for sun matrix calculation.
This method sets up a matrix calculations using Dctimestep.
-
honeybee.radiance.recipe.recipedcutil.
window_group_to_receiver
(filepath, upnormal, material_name='vmtx_glow', angle_basis='Kelms Full')[source]¶ Take a filepath to a window group and create a receiver.
-
honeybee.radiance.recipe.recipedcutil.
write_rad_files_daylight_coeff
(working_dir, project_name, opq, glz, wgs)[source]¶ Write files to a target directory for daylight coefficeint method.
- The files will be written under
- working_dir/opaque working_dir/glazing working_dir/wgroup
Parameters: - working_dir – Path to working directory.
- opq – A RadFile for opaque surfaces.
- glz – A RadFile for glazing surfaces.
- wgs – A collection of RadFiles for window-groups.
Returns: A named tuple for each RadFile as (fp, fpblk) fp returns the file path to the list of radiance files. fpblk returns the file path to the list of blacked radiance files.
honeybee.radiance.recipe.recipeutil module¶
A collection of useful methods for recipes.
-
honeybee.radiance.recipe.recipeutil.
glz_srf_to_window_group
()[source]¶ Create a named tuple that looks like window groups for glazing surfaces.
This is neccessary to work with normal glazing just like window groups.
-
honeybee.radiance.recipe.recipeutil.
input_srfs_to_rad_files
(in_srfs)[source]¶ separate input honeybee surfaces to RadFiles based on type.
This function analyzes a collection of input honeybee surfaces and returns 3 rad_file like objecs for opaque, glazing and tuple(window groups).
-
honeybee.radiance.recipe.recipeutil.
write_extra_files
(rad_scene, target_dir, add_blacked=False)[source]¶ Copy additionl files from rad_scenes to working_dir.
Parameters: - rad_scene – A RadScene object.
- target_dir – Target study folder. The files will be copied under extra.
- add_blacked – Set to True to add the blacked radiance file to the same folder. The file will be named *_blacked.rad.
- named tuple for each RadFile as (A) –
- returns the file path to the list of original radiance files. (fp) –
- returns the file path to the list of blacked radiance files. (fpblk) –
-
honeybee.radiance.recipe.recipeutil.
write_rad_files
(scene_folder, project_name, opq, glz, wgs)[source]¶ Write files to a target directory.
This method should only be used for daylight coefficeint and multi-phase daylight simulations. The files will be written under
scene_folder/opaque scene_folder/glazing scene_folder/wgroupIf any of the surfaces has BSDF material the xml file will be copied under scene_folder/*/bsdf and the path to the material will be modified to the new path.
Parameters: - scene_folder – Path to working directory.
- opq – A RadFile for opaque surfaces.
- glz – A RadFile for glazing surfaces.
- wgs – A collection of RadFiles for window-groups.
Returns: Return 3 list for radiance files for opaque, glz and window groups. The list for windowgroups will be a list of lists for each window group and its states.
honeybee.radiance.recipe.recipexphaseutil module¶
A collection of useful methods for multi-phase recipes.
-
honeybee.radiance.recipe.recipexphaseutil.
get_commands_direct_view_daylight_matrices
(project_folder, window_group, count, inputfiles, points_file, number_of_points, sky_density, view_mtx_parameters, daylight_mtx_parameters, reuse_view_mtx=False, reuse_daylight_mtx=False)[source]¶ Get commnds, view matrix file and daylight matrix file for direct calculation.
-
honeybee.radiance.recipe.recipexphaseutil.
get_commands_view_daylight_matrices
(project_folder, window_group, count, inputfiles, points_file, number_of_points, sky_density, view_mtx_parameters, daylight_mtx_parameters, reuse_view_mtx=False, reuse_daylight_mtx=False, phases_count=3)[source]¶ Get commnds, view matrix file and daylight matrix file.
-
honeybee.radiance.recipe.recipexphaseutil.
matrix_calculation_five_phase
(project_name, sky_density, project_folder, window_group, skyfiles, inputfiles, points_file, total_point_count, rfluxmtx_parameters, v_matrix, d_matrix, dv_matrix, dd_matrix, window_group_count=0, reuse_view_mtx=False, reuse_daylight_mtx=False, counter=None, transpose=False)[source]¶ Get commands for the five phase recipe.
This function takes the result_files from 3phase calculation and adds direct calculation phases to it.
-
honeybee.radiance.recipe.recipexphaseutil.
matrix_calculation_three_phase
(project_folder, window_group, v_matrix, d_matrix, sky_mtx_total, transpose=False)[source]¶ Three phase matrix calculation.
Parameters: - project_folder – Full path to project folder.
- window_group – A window_group.
- v_matrix – Path to view matrix.
- d_matrix – Path to daylight matrix.
- sky_mtx_total – Path to sky matrix.
Returns: commands, result_files
-
honeybee.radiance.recipe.recipexphaseutil.
write_rad_files_multi_phase
(working_dir, project_name, opq, glz, wgs)[source]¶ Write files to a target directory for multi-phase method.
This method should only be used for daylight coefficeint and multi-phase daylight simulations. The files will be written under
working_dir/opaque working_dir/glazing working_dir/wgroupParameters: - working_dir – Path to working directory.
- opq – A RadFile for opaque surfaces.
- glz – A RadFile for glazing surfaces.
- wgs – A collection of RadFiles for window-groups.
Returns: A named tuple for each RadFile as (fp, fpblk, fpglw) fp returns the file path to the list of radiance files. It will be glowed
files for window_groups.
fpblk returns the file path to the list of blacked radiance files.