dragonfly_trace.writer module¶
Methods to write Dragonfly Models to Trane TRACE.
- dragonfly_trace.writer.model_to_trace700_csv(model, use_multiplier=True, exclude_plenums=True, merge_method=None, si_units=False, geometry_names=False, resource_names=False)[source]¶
Generate a CSV string with TRACE 700 load simulation attributes of a Model.
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.
use_multiplier – If True, the multipliers on this Model’s Stories will be passed along to the CSV. If False, 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).
exclude_plenums – Boolean to indicate whether ceiling/floor plenum depths assigned to Room2Ds should be ignored during translation. This results in each Room2D translating to a single Honeybee Room at the full floor_to_ceiling_height instead of a base Room with (a) plenum Room(s). (Default: True).
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
si_units – Boolean to note whether the units of the values in the resulting matrix are in SI (True) instead of IP (False). (Default: False).
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).
resource_names – Boolean to note whether a cleaned version of all resource display names should be used instead of identifiers when translating the Model to OSM and IDF. Using this flag will affect all Materials, Constructions, ConstructionSets, Schedules, Loads, and ProgramTypes. It will generally result in more read-able names for the resources in the OSM and IDF. 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).
- Returns:
Text string of content to be written into a CSV file containing all tables needed to specify room loads in TRACE 700.
- dragonfly_trace.writer.model_to_trace700_matrix(model, use_multiplier=True, exclude_plenums=True, merge_method=None, si_units=False, geometry_names=False, resource_names=False)[source]¶
Get matrices with TRACE 700 simulation attributes of a Model.
The resulting matrices can be written to a CSV and then copied into the tables that appear in the Component Tree view of TRACE 700. The order and organization of rooms in the resulting matrix matches that of the gbXML produced from the same model.
- Parameters:
model – A dragonfly Model for which a TRACE 700 CSV matrix will be returned.
use_multiplier – If True, the multipliers on this Model’s Stories will be passed along to the CSV. If False, 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).
exclude_plenums – Boolean to indicate whether ceiling/floor plenum depths assigned to Room2Ds should be ignored during translation. This results in each Room2D translating to a single Honeybee Room at the full floor_to_ceiling_height instead of a base Room with (a) plenum Room(s). (Default: True).
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
si_units – Boolean to note whether the units of the values in the resulting matrix are in SI (True) instead of IP (False). (Default: False).
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).
resource_names – Boolean to note whether a cleaned version of all resource display names should be used instead of identifiers when translating the Model to OSM and IDF. Using this flag will affect all Materials, Constructions, ConstructionSets, Schedules, Loads, and ProgramTypes. It will generally result in more read-able names for the resources in the OSM and IDF. 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).
- Returns:
A tuple with four items.
- room_matrix – A list of list where each sublist represents a row of the
Rooms table of the TRACE 700 Component Tree.
- airflows_matrix – A list of list where each sublist represents a row of the
Airflows table of the TRACE 700 Component Tree.
- people_and_lights_matrix – A list of list where each sublist represents
a row of the People & Lighting table of the TRACE 700 Component Tree.
- misc_loads_matrix – A list of list where each sublist represents a row of
the Miscellaneous Loads table of the TRACE 700 Component Tree.
- dragonfly_trace.writer.model_to_trace700_workbook(model, use_multiplier=True, exclude_plenums=True, merge_method=None, si_units=False, geometry_names=False, resource_names=False)[source]¶
Generate an Excel Workbook (openpyxl) with TRACE 700 attributes of a Model.
The resulting openpyxl Workbook can be saved and opened in Excel. The data in the tables can then 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 Excel Workbook will be returned.
use_multiplier – If True, the multipliers on this Model’s Stories will be passed along to the Workbook. If False, 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).
exclude_plenums – Boolean to indicate whether ceiling/floor plenum depths assigned to Room2Ds should be ignored during translation. This results in each Room2D translating to a single Honeybee Room at the full floor_to_ceiling_height instead of a base Room with (a) plenum Room(s). (Default: True).
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
si_units – Boolean to note whether the units of the values in the resulting matrix are in SI (True) instead of IP (False). (Default: False).
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).
resource_names – Boolean to note whether a cleaned version of all resource display names should be used instead of identifiers when translating the Model to OSM and IDF. Using this flag will affect all Materials, Constructions, ConstructionSets, Schedules, Loads, and ProgramTypes. It will generally result in more read-able names for the resources in the OSM and IDF. 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).
- Returns:
A base64 string of content to be written into an Excel file. The contents contain all tables needed to specify room loads in TRACE 700.
- dragonfly_trace.writer.rooms_to_trace700_matrix(rooms, si_units=False)[source]¶
Get a matrix for the “Rooms” table of the TRACE 700 Component Tree.
- Parameters:
rooms – A list of dragonfly Room2Ds and honeybee Rooms for which the TRACE 700 “Rooms” matrix will be returned.
si_units – Boolean to note whether the units of the values in the resulting matrix are in SI (True) instead of IP (False). (Default: False).
- Returns:
A list of list where each sublist represents a row of the Rooms table of the TRACE 700 Component Tree.