dragonfly_trace.cli.translate module¶
dragonfly trace translation commands.
- dragonfly_trace.cli.translate.model_to_trace700_csv(model_file, metric=False, ventilation_method='Sum of Outdoor Air', full_geometry=False, separate_plenum=False, merge_method='None', geometry_names=False, output_file=None, imperial=True, multiplier=True, plenum=True, geometry_ids=True)[source]¶
Translate a Dragonfly Model to a CSV with tables for TRACE 700 attributes.
The resulting CSV tables can be copied into the tables that appear in the Component Tree view of TRACE 700. The order and organization of rooms in the resulting matrix should match that of the gbXML produced from the same model.
- Parameters:
model – A dragonfly Model for which a TRACE 700 CSV matrix will be returned.
metric – Boolean to note whether the units of the values in the resulting matrix are in SI (True) instead of IP (False). (Default: False).
ventilation_method –
Optional text for the ventilation method to be used in the resulting matrix. Choose from the following.
Sum of Outdoor Air
ASHRAE 62.1
full_geometry – If False, the multipliers on this Model’s Stories will be passed along to the CSV. If True, full geometry objects will be written for each and every floor in the building that are represented through multipliers and all resulting multipliers will be 1. (Default: True).
separate_plenum – Boolean to indicate whether ceiling/floor plenum depths assigned to Room2Ds should simply be reported as plenum depths in the CSV or they should be used to generate distinct separated plenum rooms in the translation. (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 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
geometry_names – Boolean to note whether a cleaned version of all geometry display names should be used instead of identifiers when translating the Model to OSM and IDF. Using this flag will affect all Rooms, Faces, Apertures, Doors, and Shades. It will generally result in more read-able names in the OSM and IDF but this means that it will not be easy to map the EnergyPlus results back to the original Honeybee Model. Cases of duplicate IDs resulting from non-unique names will be resolved by adding integers to the ends of the new IDs that are derived from the name. (Default: False).
output_file – Optional CSV file to output the CSV string of the translation. By default this string will be returned from this method.
- dragonfly_trace.cli.translate.model_to_trace700_gbxml(model_file, metric=False, opening_simplification='MergeAdjWindows', program_name=None, program_version=None, output_file=None, imperial=True)[source]¶
Translate a Dragonfly Model to a gbXML file suitable for TRACE 700.
- Parameters:
model_file – Path to either a DFJSON or DFpkl file. This can also be a HBJSON or a HBpkl from which a Dragonfly model should be derived.
metric – Boolean to note whether the units of the values in the resulting matrix are in SI (True) instead of IP (False). (Default: False).
opening_simplification –
Optional text to note the method by which openings are simplified as part of the translation to gbXML. (Default: MergeAdjWindows). Choose from the following options.
None - No sub-face simplification will occur
MergeAdjWindows - Adjacent windows are merged; doors are left as is
SingleWindow - All doors removed; windows are merged into one per wall
program_name – Optional text to set the name of the software that will appear under the programId and ProductName tags of the DocumentHistory section. This can be set things like “Ladybug Tools” or “Pollination” or some other software in which this gbXML export capability is being run. If None, the “OpenStudio” will be used. (Default: None).
program_version – Optional text to set the version of the software that will appear under the DocumentHistory section. If None, and the program_name is also unspecified, only the version of OpenStudio will appear. Otherwise, this will default to “0.0.0” given that the version field is required. (Default: None).
output_file – Optional gbXML file to output the string of the translation. By default it will be returned from this method.
- dragonfly_trace.cli.translate.model_to_trace700_xlsx(model_file, metric=False, ventilation_method='Sum of Outdoor Air', full_geometry=False, separate_plenum=False, merge_method='None', geometry_names=False, output_file=None, imperial=True, multiplier=True, plenum=True, geometry_ids=True)[source]¶
Translate a Dragonfly Model to an Excel file with tables for TRACE 700 attributes.
The resulting Excel tables can be copied into the tables that appear in the Component Tree view of TRACE 700. The order and organization of rooms in the resulting matrix should match that of the gbXML produced from the same model.
- Parameters:
model – A dragonfly Model for which a TRACE 700 XLSX file will be returned.
metric – Boolean to note whether the units of the values in the resulting matrix are in SI (True) instead of IP (False). (Default: False).
ventilation_method –
Optional text for the ventilation method to be used in the resulting matrix. Choose from the following.
Sum of Outdoor Air
ASHRAE 62.1
full_geometry – If False, the multipliers on this Model’s Stories will be passed along to the XLSX. If True, full geometry objects will be written for each and every floor in the building that are represented through multipliers and all resulting multipliers will be 1. (Default: True).
separate_plenum – Boolean to indicate whether ceiling/floor plenum depths assigned to Room2Ds should simply be reported as plenum depths in the tables or they should be used to generate distinct separated plenum rooms in the translation. (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 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
geometry_names – Boolean to note whether a cleaned version of all geometry display names should be used instead of identifiers when translating the Model to OSM and IDF. Using this flag will affect all Rooms, Faces, Apertures, Doors, and Shades. It will generally result in more read-able names in the OSM and IDF but this means that it will not be easy to map the EnergyPlus results back to the original Honeybee Model. Cases of duplicate IDs resulting from non-unique names will be resolved by adding integers to the ends of the new IDs that are derived from the name. (Default: False).
output_file – Optional XLSX file to output the XLSX content of the translation. By default this content will be returned from this method as a base64 string.
- dragonfly_trace.cli.translate.model_to_trace700_zip(model_file, metric=False, opening_simplification='MergeAdjWindows', ventilation_method='Sum of Outdoor Air', program_name=None, program_version=None, output_file=None, imperial=True)[source]¶
Translate a Dragonfly Model to a gbXML file suitable for TRACE 700.
- Parameters:
model_file – Path to either a DFJSON or DFpkl file. This can also be a HBJSON or a HBpkl from which a Dragonfly model should be derived.
metric – Boolean to note whether the units of the values in the resulting matrix are in SI (True) instead of IP (False). (Default: False).
opening_simplification –
Optional text to note the method by which openings are simplified as part of the translation to gbXML. (Default: MergeAdjWindows). Choose from the following options.
None - No sub-face simplification will occur
MergeAdjWindows - Adjacent windows are merged; doors are left as is
SingleWindow - All doors removed; windows are merged into one per wall
ventilation_method –
Optional text for the ventilation method to be used in the resulting matrix. Choose from the following.
Sum of Outdoor Air
ASHRAE 62.1
program_name – Optional text to set the name of the software that will appear under the programId and ProductName tags of the DocumentHistory section. This can be set things like “Ladybug Tools” or “Pollination” or some other software in which this gbXML export capability is being run. If None, the “OpenStudio” will be used. (Default: None).
program_version – Optional text to set the version of the software that will appear under the DocumentHistory section. If None, and the program_name is also unspecified, only the version of OpenStudio will appear. Otherwise, this will default to “0.0.0” given that the version field is required. (Default: None).
output_file – Optional gbXML file to output the string of the translation. By default it will be returned from this method.