honeybee_radiance.dynamic.group module¶
Object representing a group of sub-faces or shades that change states in unison.
- class honeybee_radiance.dynamic.group.DynamicShadeGroup(identifier, dynamic_objects)[source]¶
Bases:
object
Object representing a group of dynamic shades that change states in unison.
Note that this object is not intended to set any Model properties. It is only used by the Model to collect objects with the same dynamic_group_identifier and export a common set of radiance files from them.
- Parameters:
identifier – Text string for a unique Group ID. Must not contain spaces or special characters. This will be used to identify the object across a model and in the exported Radiance files.
dynamic_objects – An array of Shades that are contained within the group.
- Properties:
identifier
dynamic_objects
state_count
is_opaque
is_indoor
states_json_list
- states_by_index(state_index)[source]¶
Get an array of state objects representing a single state for this group.
The resulting array will parallel the dynamic_objects of this group, with one state object per dynamic object.
- Parameters:
state_index – An integer from 0 up to the state_count - 1 , which notes the state of the group for which a rad string will be produced.
- to_radiance(state_index, direct=False, minimal=False)[source]¶
Generate a RAD string representation of a state for this group.
The resulting string includes everything going into a single .rad file to simulate the state, including all geometry and modifiers.
- Parameters:
state_index – An integer from 0 up to the state_count - 1 , which notes the state of the group for which a rad string will be produced.
direct – Boolean to note whether to write the “direct” version of the state. (Default: False)
minimal – Boolean to note whether the radiance string should be written in a minimal format (with spaces instead of line breaks). Default: False.
- property dynamic_objects¶
Get a tuple of objects contained within the group.
- property identifier¶
Get a text string for the unique group identifier.
- property is_indoor¶
Get a boolean for whether all shades in the group are indoor.
- property is_opaque¶
Get a boolean for whether all states of all shades in the group are opaque.
- property state_count¶
Gat an integer for the total number of states of the dynamic group.
This is equal to the number of states in the dynamic_object with the highest number of states. After a dynamic_object with fewer states than that of it’s dynamic group has hit its highest state, it just remains in that state as the other dynamic_objects continue to change.
- property states_json_list¶
A list for the states.json file that notes the files for each state.
The files will follow a standard naming convention as follows. <dynamic group identifier>..<field name>..<state count>.rad. For instance skylight..direct..000.rad
- class honeybee_radiance.dynamic.group.DynamicSubFaceGroup(modifier, dynamic_objects)[source]¶
Bases:
DynamicShadeGroup
A group of dynamic Apertures and Doors that change states in unison.
Note that this object is not intended to set any Model properties. It is only used by the Model to collect objects with the same dynamic_group_identifier and export a common set of radiance files from them.
- Parameters:
identifier – Text string for a unique Group ID. Must not contain spaces or special characters. This will be used to identify the object across a model and in the exported Radiance files.
dynamic_objects – An array of Shades that are contained within the group.
- Properties:
identifier
dynamic_objects
state_count
is_opaque
is_indoor
states_json_list
- blk_to_radiance(minimal=False)[source]¶
Generate a RAD string for the black representation of this group.
The resulting string includes everything going into the black .rad file, including all geometry and modifiers.
- Parameters:
minimal – Boolean to note whether the radiance string should be written in a minimal format (with spaces instead of line breaks). Default: False.
- dmtx_to_radiance(state_index, minimal=False)[source]¶
Generate a dmtx RAD string representation of a state.
The resulting string has all geometry geometry and the white_glow modifier.
- Parameters:
state_index – An integer from 0 up to the state_count - 1 , which notes the state of the group for which a rad string will be produced.
minimal – Boolean to note whether the radiance string should be written in a minimal format (with spaces instead of line breaks). Default: False.
- rfluxmtx_control_params(state_index=0, sampling=None, up_direction=None)[source]¶
Create a formatted Rfluxmtx control parameters string.
The optional values are sampling and up_direction. If these values are not provided they will be assigned based on the first State of the dynamic object.
The control params are only meaningful for BSDF modifiers with one of the sampling types listed below.
- Parameters:
sampling –
Set hemisphere sampling type. Acceptable inputs for hemisphere sampling type are:
u for uniform.(Usually applicable for ground).
kf for klems full.
kh for klems half.
kq for klems quarter.
- rN for Reinhart - Tregenza type skies. N stands for subdivisions
and defaults to 1.
scN for shirley-chiu subdivisions.
Add a
-
in front of the input for left-handed coordinates. For more information see rfluxmtx docs. https://www.radiance-online.org/learning/documentation/manual-pages/pdfs/rfluxmtx.pdf/at_download/fileup_direction – Orient the “up” direction for the hemisphere using the indicated axis or a direction vector. Valid inputs include the following. [-]{X|Y|Z|ux,uy,uz}. (Default: Y).
- Returns:
RfluxmtxControlParameters
- states_by_index(state_index)[source]¶
Get an array of state objects representing a single state for this group.
The resulting array will parallel the dynamic_objects of this group, with one state object per dynamic object.
- Parameters:
state_index – An integer from 0 up to the state_count - 1 , which notes the state of the group for which a rad string will be produced.
- tmxt_bsdf(state_index)[source]¶
A BSDF modifier representing the tranmission matrix of a state if it exists.
This will be None unless all of the objects in the group have the same BSDF modifier for the state. Note that having a single tmxt_bsdf is a requirement in order to be compatible with 3-phase and 5-phase simulation.
- Parameters:
state_index – An integer from 0 up to the state_count - 1 , which notes the state of the group for which a rad string will be produced.
- to_radiance(state_index, direct=False, minimal=False)¶
Generate a RAD string representation of a state for this group.
The resulting string includes everything going into a single .rad file to simulate the state, including all geometry and modifiers.
- Parameters:
state_index – An integer from 0 up to the state_count - 1 , which notes the state of the group for which a rad string will be produced.
direct – Boolean to note whether to write the “direct” version of the state. (Default: False)
minimal – Boolean to note whether the radiance string should be written in a minimal format (with spaces instead of line breaks). Default: False.
- vmtx_to_radiance(state_index, minimal=False)[source]¶
Generate a vmtx RAD string representation of a state.
The resulting string has all geometry geometry and the white_glow modifier.
- Parameters:
state_index – An integer from 0 up to the state_count - 1 , which notes the state of the group for which a rad string will be produced.
minimal – Boolean to note whether the radiance string should be written in a minimal format (with spaces instead of line breaks). Default: False.
- property dynamic_objects¶
Get a tuple of objects contained within the group.
- property identifier¶
Get a text string for the unique group identifier.
- property is_indoor¶
Get a boolean for whether all sub-faces in the group have a Surface BC.
- property is_opaque¶
Always False for dynamic sub-faces.
- property state_count¶
Gat an integer for the total number of states of the dynamic group.
This is equal to the number of states in the dynamic_object with the highest number of states. After a dynamic_object with fewer states than that of it’s dynamic group has hit its highest state, it just remains in that state as the other dynamic_objects continue to change.
- property states_json_list¶
A list for the states.json file that notes the files for each state.
The files will follow a standard naming convention as follows. <dynamic group identifier>..<field name>..<state count>.rad. For instance skylight..direct..000.rad
Note that this list does not contain the tmtx, vmtx, or dmtx keys and these should be added separately if this states.json is to be used for 3-phase studies.