honeybee_plus.radiance.recipe.directreflection.gridbased module¶
-
class
honeybee_plus.radiance.recipe.directreflection.gridbased.
DirectReflectionGridBased
(sun_vectors, hoys, analysis_grids, timestep=1, reflective_surfaces=None, context_surfaces=None, sub_folder='directreflection')[source]¶ Bases:
honeybee_plus.radiance.recipe.solaraccess.gridbased.SolarAccessGridBased
Direct reflection recipe.
This recipe calculates the direct and first reflection from reflective surfaces.
-
classmethod
from_json
(rec_json)[source]¶ Create the solar access recipe from json. {
“id”: “solar_access”, “type”: “gridbased”, “location”: null, // a honeybee location - see below “hoys”: [], // list of hours of the year “surfaces”: [], // list of honeybee surfaces “analysis_grids”: [] // list of analysis grids “sun_vectors”: [] // list of sun vectors if location is not provided
}
-
classmethod
from_location_and_analysis_period
(location, analysis_period, point_groups, vector_groups=None, reflective_surfaces=None, context_surfaces=None, sub_folder='directreflection')[source]¶ Create direct reflection recipe from Location and analysis period.
-
classmethod
from_location_and_hoys
(location, hoys, point_groups, vector_groups=[], timestep=1, reflective_surfaces=None, context_surfaces=None, sub_folder='directreflection')[source]¶ Create direct reflection recipe from Location and hours of year.
-
classmethod
from_suns
(suns, point_groups, vector_groups=[], timestep=1, reflective_surfaces=None, context_surfaces=None, sub_folder='directreflection')[source]¶ Create direct reflection recipe from LB sun objects.
-
suns
¶ A list of ladybug suns.
-
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.
-
timestep
¶ The number of timesteps per hour for sun vectors. This number should be smaller than 60 and divisible by 60. The default is set to 1 such that one sun vector is generated for each hour (Default: 1).
-
reflective_surfaces
¶ A list of Honeybee surfaces to be modeled as reflective materials (Default: None).
-
context_surfaces
¶ A list of non-reflective Honeybee surfaces (default: None).
-
sub_folder
¶ Analysis subfolder for this recipe. (Default: “directreflection”)
-
-
to_json
()[source]¶ Create the solar access recipe from json. {
“id”: “solar_access”, “type”: “gridbased”, “location”: null, // a honeybee location - see below “hoys”: [], // list of hours of the year “surfaces”: [], // list of honeybee surfaces “analysis_grids”: [], // list of analysis grids “sun_vectors”: []
}
-
write
(target_folder, project_name='untitled', header=True, transpose=False)[source]¶ Write analysis files to target folder.
- Files for sunlight hours analysis are:
test points <project_name.pts>: List of analysis points. suns file <.sun>: list of sun sources . suns material file <*_suns.mat>: Radiance materials for sun sources. suns geometry file <*_suns.rad>: Radiance geometries for sun sources. material file <.mat>: Radiance materials. Will be empty if hb_objects is
None.
- geometry file <*.rad>: Radiance geometries. Will be empty if hb_objects is
None.
- batch file <*.bat>: An executable batch file which has the list of commands.
- oconv [material file] [geometry file] [sun materials file] [sun
geometries file] > [octree file]
- rcontrib -ab 0 -ad 10000 -I -M [sunlist.txt] -dc 1 [octree file]< [pts
file] > [rcontrib results file]
- 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.
transpose – Set to True to transpose the results matrix. By defalut each row include the results for each point and each column is the results for a different timestep (default: False).
- Returns
True in case of success.
-
classmethod