dragonfly_energy.des.connector module

Thermal connector in a District Energy System.

class dragonfly_energy.des.connector.ThermalConnector(identifier, geometry)[source]

Bases: _GeometryBase

Represents a thermal connector carrying hot, chilled or ambient water in a DES.

Parameters
  • identifier – Text string for a unique thermal connector ID. Must contain only characters that are acceptable in a DES. This will be used to identify the object across the exported geoJSON and DES files.

  • geometry – A LineSegment2D or Polyline2D representing the geometry of the thermal connector.

Properties:
  • identifier

  • display_name

  • geometry

ToString()
duplicate()

Get a copy of this object.

classmethod from_dict(data)[source]

Initialize an ThermalConnector from a dictionary.

Parameters

data – A dictionary representation of an ThermalConnector object.

classmethod from_dict_abridged(data)[source]

Initialize an ThermalConnector from an abridged dictionary.

Parameters

data – A ThermalConnector dictionary.

classmethod from_geojson_dict(data, origin_lon_lat, conversion_factors)[source]

Get a ThermalConnector from a dictionary as it appears in a GeoJSON.

Parameters
  • data – A GeoJSON dictionary representation of an ThermalConnector feature.

  • origin_lon_lat – An array of two numbers in degrees. The first value represents the longitude of the scene origin in degrees (between -180 and +180). The second value represents latitude of the scene origin in degrees (between -90 and +90). Note that the “scene origin” is the (0, 0) coordinate in the 2D space of the input polygon.

  • conversion_factors – A tuple with two values used to translate between meters and longitude, latitude.

move(moving_vec)

Move this object along a vector.

Parameters

moving_vec – A ladybug_geometry Vector3D with the direction and distance to move the object.

reflect(plane)

Reflect this object across a plane.

Parameters

plane – A ladybug_geometry Plane across which the object will be reflected.

reverse()[source]

Reverse the direction of this object’s geometry.

This is useful when trying to orient the connector to the direction of flow within a larger loop.

rotate_xy(angle, origin)

Rotate this object counterclockwise in the XY plane by a certain angle.

Parameters
  • angle – An angle in degrees.

  • origin – A ladybug_geometry Point3D for the origin around which the object will be rotated.

scale(factor, origin=None)

Scale this object by a factor from an origin point.

Parameters
  • factor – A number representing how much the object should be scaled.

  • origin – A ladybug_geometry Point3D representing the origin from which to scale. If None, it will be scaled from the World origin (0, 0, 0).

to_dict()[source]

ThermalConnector dictionary representation.

to_geojson_dict(start_id, end_id, origin_lon_lat, conversion_factors, start_feature_id=None, end_feature_id=None)[source]

Get ThermalConnector dictionary as it appears in an URBANopt geoJSON.

Parameters
  • start_id – Identifier of the junction at the start of the pipe.

  • end_id – Identifier of the junction at the end of the pipe.

  • origin_lon_lat – An array of two numbers in degrees. The first value represents the longitude of the scene origin in degrees (between -180 and +180). The second value represents latitude of the scene origin in degrees (between -90 and +90). Note that the “scene origin” is the (0, 0) coordinate in the 2D space of the input polygon.

  • conversion_factors – A tuple with two values used to translate between meters and longitude, latitude.

  • start_feature_id – Optional identifier for a feature (Building or GHE field) at the start of the pipe.

  • end_feature_id – Optional identifier for a feature (Building or GHE field) at the end of the pipe.

property display_name

Get or set a string for the object name without any character restrictions.

If not set, this will be equal to the identifier.

property geometry

Get a LineSegment2D or Polyline2D representing the thermal connector.

property identifier

Get or set the text string for unique object identifier.