honeybee_plus.radiance.recipe.daylightcoeff.gridbased module

Radiance Daylight Coefficient Grid-Based Analysis Recipe.

class honeybee_plus.radiance.recipe.daylightcoeff.gridbased.DaylightCoeffGridBased(sky_mtx, analysis_grids, simulation_type=0, radiance_parameters=None, reuse_daylight_mtx=True, hb_objects=None, sub_folder='gridbased_daylightcoeff')[source]

Bases: honeybee_plus.radiance.recipe._gridbasedbase.GenericGridBased

Grid based daylight coefficient analysis recipe.

sky_mtx

A radiance SkyMatrix or SkyVector. For an SkyMatrix the analysis will be ran for the analysis period.

analysis_grids

A list of Honeybee analysis grids. Daylight metrics will be calculated for each analysisGrid separately.

simulation_type

0: Illuminance(lux), 1: Radiation (kWh), 2: Luminance (Candela) (Default: 0)

radiance_parameters

Radiance parameters for this analysis. Parameters should be an instance of RfluxmtxParameters.

hb_objects

An optional list of Honeybee surfaces or zones (Default: None).

sub_folder

Analysis subfolder for this recipe. (Default: “daylightcoeff”).

Usage:

# initiate analysis_recipe analysis_recipe = DaylightCoeffGridBased(

sky_mtx, analysis_grids, rad_parameters )

# add honeybee object analysis_recipe.hb_objects = HBObjs

# write analysis files to local drive commandsFile = analysis_recipe.write(_folder_, _name_)

# run the analysis analysis_recipe.run(commandsFile)

# get the results print(analysis_recipe.results())

classmethod from_json(rec_json)[source]

Create daylight coefficient recipe from JSON file { “id”: “daylight_coeff”, “type”: “gridbased”, “sky_mtx”: {}, // sky matrix json file “analysis_grids”: [], // list of analysis grids “surfaces”: [], // list of honeybee surfaces “simulation_type”: int // value between 0-2 “rad_parameters”: {} // radiance gridbased parameters json file }

classmethod from_points_file(epw_file, points_file, sky_density=1, simulation_type=0, radiance_parameters=None, reuse_daylight_mtx=True, hb_objects=None, sub_folder='gridbased_daylightcoeff')[source]

Create grid based daylight coefficient recipe from points file.

classmethod from_weather_file_points_and_vectors(epw_file, point_groups, vector_groups=None, sky_density=1, simulation_type=0, radiance_parameters=None, reuse_daylight_mtx=True, hb_objects=None, sub_folder='gridbased_daylightcoeff')[source]

Create grid based daylight coefficient from weather file, points and vectors.

Parameters
  • epw_file – An EnergyPlus weather file.

  • point_groups – A list of (x, y, z) test points or lists of (x, y, z) test points. Each list of test points will be converted to a TestPointGroup. If testPts is a single flattened list only one TestPointGroup will be created.

  • vector_groups – An optional list of (x, y, z) vectors. Each vector represents direction of corresponding point in testPts. If the vector is not provided (0, 0, 1) will be assigned.

  • sky_density – A positive intger for sky density. 1: Tregenza Sky, 2: Reinhart Sky, etc. (Default: 1)

  • hb_objects – An optional list of Honeybee surfaces or zones (Default: None).

  • sub_folder – Analysis subfolder for this recipe. (Default: “sunlighthours”)

preproc_commands()[source]

Add echo in front of comments in batch file comments.

property radiance_parameters

Radiance parameters for annual analysis.

results()[source]

Return results for this analysis.

property simulation_type

Illuminance(lux), 1: Radiation (kWh), 2: Luminance (Candela) (Default: 2)

Type

Simulation type

Type

0

property sky_density

Radiance sky type e.g. r1, r2, r4.

property sky_matrix

Get and set sky definition.

to_json()[source]

Create daylight coefficient JSON file { “id”: “daylight_coeff”, “type”: “gridbased”, “sky_mtx”: {}, // sky matrix json file “analysis_grids”: [], // list of analysis grids “surfaces”: [], // list of honeybee surfaces “simulation_type”: int // value between 0-2 “rad_parameters”: {} // radiance gridbased parameters json file }

property total_runs_count

Number of total runs for all window groups and states.

write(target_folder, project_name='untitled', header=True, transpose=False)[source]

Write analysis files to target folder.

Parameters
  • target_folder – Path to parent folder. Files will be created under target_folder/gridbased. use self.sub_folder to change subfolder name.

  • project_name – Name of this project as a string.

  • header – A boolean to include the header lines in commands.bat. header includes PATH and cd toFolder

Returns

Full path to command.bat