dragonfly_energy.cli.translate module

dragonfly energy translation commands.

dragonfly_energy.cli.translate.model_to_gbxml(model_file, osw_folder=None, full_geometry=False, plenum=False, ceil_adjacency=False, triangulate_subfaces=False, permit_non_planar=False, complete_geometry=False, interior_face_type='', ground_face_type='', output_file=None, multiplier=True, no_plenum=True, no_ceil_adjacency=True, default_subfaces=True, triangulate_non_planar=True, minimal=True)[source]

Translate a Dragonfly Model to a gbXML file.

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.

  • osw_folder – Folder on this computer, into which the working files will be written. If None, it will be written into a temp folder in the default simulation folder.

  • full_geometry – Boolean to note if the multipliers on each Building story will 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).

  • plenum – Boolean to indicate whether ceiling/floor plenums should be auto-generated for the Rooms. (Default: False).

  • ceil_adjacency – Boolean to indicate whether adjacencies should be solved between interior stories when Room2Ds perfectly match one another in their floor plate. This ensures that Surface boundary conditions are used instead of Adiabatic ones. Note that this input has no effect when the object-per-model is Story. (Default: False).

  • triangulate_subfaces – Boolean to note whether sub-faces (including Apertures and Doors) should be triangulated if they have more than 4 sides (True) or whether they should be left as they are (False). This triangulation is necessary when exporting directly to EnergyPlus since it cannot accept sub-faces with more than 4 vertices. (Default: False).

  • permit_non_planar – Boolean to note whether any non-planar orphaned geometry in the model should be triangulated upon export. This can be helpful because OpenStudio simply raises an error when it encounters non-planar geometry, which would hinder the ability to save gbXML files that are to be corrected in other software. (Default: False).

  • complete_geometry – Boolean to note whether space boundaries and shell geometry should be included in the exported gbXML vs. just the minimal required non-manifold geometry. (Default: False).

  • interior_face_type – Text string for the type to be used for all interior floor faces. If unspecified, the interior types will be left as they are. Choose from: InteriorFloor, Ceiling.

  • ground_face_type – Text string for the type to be used for all ground-contact floor faces. If unspecified, the ground types will be left as they are. Choose from: UndergroundSlab, SlabOnGrade, RaisedFloor.

  • bypass_check – Boolean to note whether the Model should be re-serialized to Python and checked before it is translated to .osm. The check is not needed if the model-json was exported directly from the honeybee-energy Python library. (Default: False).

  • output_file – Optional gbXML file to output the string of the translation. By default it will be returned from this method.

dragonfly_energy.cli.translate.model_to_idf(model_file, sim_par_json=None, full_geometry=False, plenum=False, ceil_adjacency=False, additional_str='', csv_schedules=False, hvac_check=False, geometry_names=False, resource_names=False, output_file=None, multiplier=True, no_plenum=True, no_ceil_adjacency=True, compact_schedules=True, hvac_to_ideal_air=True, geometry_ids=True, resource_ids=True)[source]

Translate a Dragonfly Model to an IDF using direct-to-idf translators.

The resulting IDF should be simulate-able but not all Model properties might make it into the IDF given that the direct-to-idf translators are used.

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.

  • sim_par_json – Full path to a honeybee energy SimulationParameter JSON that describes all of the settings for the simulation. If None, default parameters will be generated.

  • full_geometry – Boolean to note if the multipliers on each Building story will 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).

  • plenum – Boolean to indicate whether ceiling/floor plenums should be auto-generated for the Rooms. (Default: False).

  • ceil_adjacency – Boolean to indicate whether adjacencies should be solved between interior stories when Room2Ds perfectly match one another in their floor plate. This ensures that Surface boundary conditions are used instead of Adiabatic ones. Note that this input has no effect when the object-per-model is Story. (Default: False).

  • additional_str – Text string for additional lines that should be added to the IDF.

  • csv_schedules – Boolean to note whether any ScheduleFixedIntervals in the model should be included in the IDF string as a Schedule:Compact or they should be written as CSV Schedule:File and placed in a directory next to the output_file. (Default: False).

  • hvac_check – Boolean to note whether any detailed HVAC system templates should be converted to an equivalent IdealAirSystem upon export. If hvac-check is used and the Model contains detailed systems, a ValueError will be raised. (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).

  • output_file – Optional IDF file to output the IDF string of the translation. By default this string will be returned from this method.

dragonfly_energy.cli.translate.model_to_osm(model_file, sim_par_json=None, epw_file=None, full_geometry=False, plenum=False, ceil_adjacency=False, folder=None, osm_file=None, idf_file=None, geometry_names=False, resource_names=False, log_file=None, multiplier=True, no_plenum=True, no_ceil_adjacency=True, geometry_ids=True, resource_ids=True)[source]

Translate a Dragonfly Model to an OpenStudio Model.

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.

  • sim_par_json – Full path to a honeybee energy SimulationParameter JSON that describes all of the settings for the simulation. If None, default parameters will be generated.

  • epw_file – Full path to an EPW file to be associated with the exported OSM. This is typically not necessary but may be used when a sim-par-json is specified that requests a HVAC sizing calculation to be run as part of the translation process but no design days are inside this simulation parameter.

  • full_geometry – Boolean to note if the multipliers on each Building story will 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).

  • plenum – Boolean to indicate whether ceiling/floor plenums should be auto-generated for the Rooms. (Default: False).

  • ceil_adjacency – Boolean to indicate whether adjacencies should be solved between interior stories when Room2Ds perfectly match one another in their floor plate. This ensures that Surface boundary conditions are used instead of Adiabatic ones. Note that this input has no effect when the object-per-model is Story. (Default: False).

  • folder – Folder on this computer, into which the working files, OSM and IDF files will be written. If None, the files will be output in the same location as the model_file.

  • osm_file – Optional path where the OSM will be copied after it is translated in the folder. If None, the file will not be copied.

  • idf_file – Optional path where the IDF will be copied after it is translated in the folder. If None, the file will not be copied.

  • 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).

  • bypass_check – Boolean to note whether the Model should be re-serialized to Python and checked before it is translated to .osm. The check is not needed if the model-json was exported directly from the honeybee-energy Python library. (Default: False).

  • log_file – Optional log file to output the paths to the generated OSM and] IDF files if they were successfully created. By default this string will be returned from this method.

dragonfly_energy.cli.translate.model_to_sdd(model_file, full_geometry=False, plenum=False, ceil_adjacency=False, osw_folder=None, geometry_names=False, resource_names=False, output_file=None, multiplier=True, no_plenum=True, no_ceil_adjacency=True, geometry_ids=True, resource_ids=True)[source]

Translate a Dragonfly Model to a CBECC SDD file.

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.

  • full_geometry – Boolean to note if the multipliers on each Building story will 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).

  • plenum – Boolean to indicate whether ceiling/floor plenums should be auto-generated for the Rooms. (Default: False).

  • ceil_adjacency – Boolean to indicate whether adjacencies should be solved between interior stories when Room2Ds perfectly match one another in their floor plate. This ensures that Surface boundary conditions are used instead of Adiabatic ones. Note that this input has no effect when the object-per-model is Story. (Default: False).

  • osw_folder – Folder on this computer, into which the working files will be written. If None, it will be written into a temp folder in the default simulation folder.

  • 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).

  • output_file – Optional SDD file to output the string of the translation. By default it will be returned from this method.

dragonfly_energy.cli.translate.model_to_trace_gbxml(model_file, full_geometry=False, plenum=False, ceil_adjacency=False, detailed_windows=False, rect_sub_distance='0.15m', frame_merge_distance='0.2m', osw_folder=None, output_file=None, multiplier=True, no_plenum=True, no_ceil_adjacency=True, single_window=True)[source]

Translate a Dragonfly Model to a gbXML file that is compatible with TRACE.

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.

  • full_geometry – Boolean to note if the multipliers on each Building story will 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).

  • plenum – Boolean to indicate whether ceiling/floor plenums should be auto-generated for the Rooms. (Default: False).

  • ceil_adjacency – Boolean to indicate whether adjacencies should be solved between interior stories when Room2Ds perfectly match one another in their floor plate. This ensures that Surface boundary conditions are used instead of Adiabatic ones. Note that this input has no effect when the object-per-model is Story. (Default: False).

  • detailed_windows – A boolean for whether all windows within walls should be left as they are (True) or converted to a single window with an area that matches the original geometry (False). (Default: False).

  • rect_sub_distance – A number for the resolution at which non-rectangular Apertures will be subdivided into smaller rectangular units. This is required as TRACE 3D plus cannot model non-rectangular geometries. This can include the units of the distance (eg. 0.5ft) or, if no units are provided, the value will be interpreted in the honeybee model units. (Default: 0.15m).

  • frame_merge_distance – A number for the maximum distance between non-rectangular Apertures at which point the Apertures will be merged into a single rectangular geometry. This is often helpful when there are several triangular Apertures that together make a rectangle when they are merged across their frames. This can include the units of the distance (eg. 0.5ft) or, if no units are provided, the value will be interpreted in the honeybee model units. (Default: 0.2m).

  • osw_folder – Folder on this computer, into which the working files will be written. If None, it will be written into a temp folder in the default simulation folder.

  • output_file – Optional gbXML file to output the string of the translation. By default it will be returned from this method.