dragonfly.cli.translate module¶
dragonfly translation commands.
- dragonfly.cli.translate.merge_models_to_honeybee(base_model, dragonfly_model=(), honeybee_model=(), full_geometry=False, no_plenum=False, solve_adjacency=False, merge_method='None', bypass_adj_check=False, permit_non_solid=False, output_file=None, multiplier=True, plenum=True, default_adjacency=True, enforce_adj_check=True, enforce_solid=True)[source]¶
- Merge multiple Dragonfly and/or Honeybee Models into a single Honeybee Model. - Parameters:
- base_model – Full path to a Dragonfly Model JSON or Pkl file that serves as the base into which the other model(s) will be merged. 
- dragonfly_model – List of other Dragonfly Models to be merged into the base model. 
- honeybee_model – List of other Honeybee Models to be merged into the base model. 
- full_geometry – Boolean to note if the multipliers on each Story should be passed along to the generated Honeybee Room objects or if full geometry objects should be written for each story in the building. (Default: False). 
- no_plenum – Boolean to indicate whether ceiling/floor plenum depths assigned to Room2Ds should generate distinct 3D Rooms in the translation. (Default: False). 
- solve_adjacency – Boolean to indicate whether all boundary conditions of the original models should be left as they are or whether adjacencies should be solved across the final model when everything is merged together. In this case, solving adjacencies will involve merging all coplanar faces across the Dragonfly/Honeybee Models, intersecting coplanar Faces to get matching areas, and setting Surface boundary conditions for all matching coplanar faces. (Default: False). 
- merge_method – - An optional text string to describe how the Room2Ds should be merged into individual Rooms during the translation. Specifying a value here can be an effective way to reduce the number of Room volumes in the resulting 3D Honeybee Model and, ultimately, yield a faster simulation time in the destination engine with fewer results to manage. Note that Room2Ds will only be merged if they form a continuous volume. Otherwise, there will be multiple Rooms per zone or story, each with an integer added at the end of their identifiers. Choose from the following options: - None - No merging of Room2Ds will occur 
- Zones - Room2Ds in the same zone will be merged 
- PlenumZones - Only plenums in the same zone will be merged 
- Stories - Rooms in the same story will be merged 
- PlenumStories - Only plenums in the same story will be merged 
 
- bypass_adj_check – Boolean to note whether an exception should be raised if an adjacency between two Room2Ds is invalid or if the check should be bypassed and the invalid Surface boundary condition should be replaced with an Outdoor boundary condition. If bypass is selected, any Walls containing WindowParameters and an illegal boundary condition will also be replaced with an Outdoor boundary condition. (Default: False). 
- permit_non_solid – Boolean to note whether rooms should be translated as solid extrusions whenever translating them with custom roof geometry produces a non-solid result or the non-solid room geometry should be allowed to remain in the result. The latter is useful for understanding why a particular roof geometry has produced a non-solid result. (Default: False). 
- output_file – Optional file to output the string of the HBJSON. If None, the string will simply be returned from this method. 
 
 
- dragonfly.cli.translate.model_to_honeybee(model_file, obj_per_model='Building', full_geometry=False, no_plenum=False, ceil_adjacency=False, merge_method='None', shade_dist=None, cap=False, bypass_adj_check=False, permit_non_solid=False, folder=None, log_file=None, multiplier=True, plenum=True, no_cap=True, no_ceil_adjacency=True, enforce_adj_check=True, enforce_solid=True)[source]¶
- Translate a Dragonfly Model file into one or more Honeybee Models. - Parameters:
- model_file – Full path to a Dragonfly Model JSON or Pkl file. 
- obj_per_model – - Text to describe how the input Buildings should be divided across the output Models. (Default: ‘Building’). Choose from the following options: - District - All buildings will be added to a single Honeybee Model.
- Such a Model can take a long time to simulate so this is only recommended for small numbers of buildings or cases where exchange of data between Buildings is necessary. 
 
- Building - Each building will be exported into its own Model.
- For each Model, the other buildings input to this component will appear as context shade geometry. 
 
- Story - Each Story of each Building will be exported into its
- own Model. For each Honeybee Model, the other input Buildings will appear as context shade geometry as will all of the other stories of the same building. 
 
 
- full_geometry – Boolean to note if the multipliers on each Story should be passed along to the generated Honeybee Room objects or if full geometry objects should be written for each story in the building. (Default: False). 
- no_plenum – Boolean to indicate whether ceiling/floor plenum depths assigned to Room2Ds should generate distinct 3D Rooms in the translation. (Default: False). 
- ceil_adjacency – Boolean to indicate whether adjacencies should be solved between interior stories when Room2D floor and ceiling geometries are coplanar. This ensures that Surface boundary conditions are used instead of Adiabatic ones. (Default: False). 
- merge_method – - An optional text string to describe how the Room2Ds should be merged into individual Rooms during the translation. Specifying a value here can be an effective way to reduce the number of Room volumes in the resulting 3D Honeybee Model and, ultimately, yield a faster simulation time in the destination engine with fewer results to manage. Note that Room2Ds will only be merged if they form a continuous volume. Otherwise, there will be multiple Rooms per zone or story, each with an integer added at the end of their identifiers. Choose from the following options: - None - No merging of Room2Ds will occur 
- Zones - Room2Ds in the same zone will be merged 
- PlenumZones - Only plenums in the same zone will be merged 
- Stories - Rooms in the same story will be merged 
- PlenumStories - Only plenums in the same story will be merged 
 
- shade_dist – An optional number to note the distance beyond which other buildings shade should not be exported into a Model. This can include the units of the distance (eg. 100ft) or, if no units are provided, the value will be interpreted in the dragonfly model units. If None, all other buildings will be included as context shade in each and every Model. Set to 0 to exclude all neighboring buildings from the resulting models. (Default: None). 
- cap – Boolean to indicate whether context shade buildings should be capped with a top face. (Default: False). 
- bypass_adj_check – Boolean to note whether an exception should be raised if an adjacency between two Room2Ds is invalid or if the check should be bypassed and the invalid Surface boundary condition should be replaced with an Outdoor boundary condition. If bypass is selected, any Walls containing WindowParameters and an illegal boundary condition will also be replaced with an Outdoor boundary condition. (Default: False). 
- permit_non_solid – Boolean to note whether rooms should be translated as solid extrusions whenever translating them with custom roof geometry produces a non-solid result or the non-solid room geometry should be allowed to remain in the result. The latter is useful for understanding why a particular roof geometry has produced a non-solid result. (Default: False). 
- folder – Folder on this computer, into which the HBJSON files will be written. If None, the files will be output to the honeybee default simulation folder and placed in a project folder with the same name as the model json. (Default: None). 
- log_file – Optional log file to output a JSON array of dictionaries with information about each of the generated HBJSONs, including their file paths. If None, the string will be returned from this method. 
 
 
- dragonfly.cli.translate.model_to_honeybee_file(model_file, full_geometry=False, no_plenum=False, ceil_adjacency=False, merge_method='None', bypass_adj_check=False, permit_non_solid=False, output_file=None, multiplier=True, plenum=True, no_ceil_adjacency=True, enforce_adj_check=True, enforce_solid=True)[source]¶
- Translate a Dragonfly Model into a single Honeybee Model. - Parameters:
- model_file – Full path to a Dragonfly Model JSON or Pkl file. 
- full_geometry – Boolean to note if the multipliers on each Story should be passed along to the generated Honeybee Room objects or if full geometry objects should be written for each story in the building. (Default: False). 
- no_plenum – Boolean to indicate whether ceiling/floor plenum depths assigned to Room2Ds should generate distinct 3D Rooms in the translation. (Default: False). 
- ceil_adjacency – Boolean to indicate whether adjacencies should be solved between interior stories when Room2D floor and ceiling geometries are coplanar. This ensures that Surface boundary conditions are used instead of Adiabatic ones. (Default: False). 
- bypass_adj_check – Boolean to note whether an exception should be raised if an adjacency between two Room2Ds is invalid or if the check should be bypassed and the invalid Surface boundary condition should be replaced with an Outdoor boundary condition. If bypass is selected, any Walls containing WindowParameters and an illegal boundary condition will also be replaced with an Outdoor boundary condition. (Default: False). 
- merge_method – - An optional text string to describe how the Room2Ds should be merged into individual Rooms during the translation. Specifying a value here can be an effective way to reduce the number of Room volumes in the resulting 3D Honeybee Model and, ultimately, yield a faster simulation time in the destination engine with fewer results to manage. Note that Room2Ds will only be merged if they form a continuous volume. Otherwise, there will be multiple Rooms per zone or story, each with an integer added at the end of their identifiers. Choose from the following options: - None - No merging of Room2Ds will occur 
- Zones - Room2Ds in the same zone will be merged 
- PlenumZones - Only plenums in the same zone will be merged 
- Stories - Rooms in the same story will be merged 
- PlenumStories - Only plenums in the same story will be merged 
 
- permit_non_solid – Boolean to note whether rooms should be translated as solid extrusions whenever translating them with custom roof geometry produces a non-solid result or the non-solid room geometry should be allowed to remain in the result. The latter is useful for understanding why a particular roof geometry has produced a non-solid result. (Default: False). 
- output_file – Optional file to output the string of the HBJSON. If None, the string will simply be returned from this method.