dragonfly_uwg.properties.model module

Model UWG Properties.

class dragonfly_uwg.properties.model.ModelUWGProperties(host, terrain=None, traffic=None, tree_coverage_fraction=Autocalculate, grass_coverage_fraction=0)[source]

Bases: object

UWG Properties for Dragonfly Model.

Parameters:
  • host – A dragonfly_core Model object that hosts these properties.

  • terrain – A Terrain object that dictates the properties of the street and ground beneath the buildings. If None, a default terrain object will be generated by analysing all of the buildings in the Model and drawing a bounding rectangle in the XY plane around them. (Default: None).

  • traffic – A TrafficParameter object that defines the activity and intensity of traffic within the urban street canyons. If None, traffic intensity will be approximated using the average building story count along with a generic traffic schedule. (Default: None).

  • tree_coverage_fraction – A number from 0 to 1 that defines the fraction of the exposed terrain covered by trees. If Autocalculate, it will be determined by evaluating the horizontal area of all ContextShade geometry that has a true is_vegetation property. (Default: autocalculate).

  • grass_coverage_fraction – A number from 0 to 1 that defines the fraction of the exposed terrain that is covered by grass or shrubs. Anything not covered in grass is assumed to be pavement. (Default: 0).

Properties:
  • host

  • terrain

  • traffic

  • tree_coverage_fraction

  • grass_coverage_fraction

  • footprint_density

  • facade_to_site

  • exposed_ground_area

  • is_tree_coverage_autocalcualted

ToString()[source]
apply_properties_from_dict(data)[source]

Apply the uwg properties of a dictionary to the host Model of this object.

Parameters:

data – A dictionary representation of an entire dragonfly-core Model. Note that this dictionary must have ModelUWGProperties in order for this method to successfully apply the uwg properties.

average_shgc(climate_zone)[source]

Get the average SHGC across all buildings in the model.

Parameters:

climate_zone – Text for the ASHRAE climate zone, which must include the humidity letter (eg. “4A”) unless it is climate zone 7 or 8.

static compute_horizontal_area(face3ds)[source]

Get the area of a list of Face3D in the XY Plane.

This is useful for taking geometry representing grass or pavement and turning it into a number for grass_coverage_fraction.

duplicate(new_host=None)[source]

Get a copy of this Model.

Parameters:

new_host – A new Model object that hosts these properties. If None, the properties will be duplicated with the same host.

grass_coverage_from_geometry(grass_geometry)[source]

Set this object’s grass_coverage_fraction using an array of Face3Ds.

Parameters:

grass_geometry – An array of Face3Ds that represent grass surfaces.

move(moving_vec)[source]

Move these properties along a vector.

Parameters:

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

reflect(plane)[source]

Reflect this Terrain across a plane.

Parameters:

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

rotate_xy(angle, origin)[source]

Rotate this Terrain 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)[source]

Scale this Terrain 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]

Return Model UWG properties as a dictionary.

to_uwg_dict()[source]

Get a dictionary following the input schema of the UWG.

This dictionary can be serialized into a JSON in order to be run through the UWG. Note that this dictionary will only include the properties that the dragonfly Model object possesses and will lack all of those provided by the UWGSimulationParameter object. For fully simulate-able UWG input, the Model.to.uwg method should be used. The keys of the dictionary output by this method include the following.

  • bldheight

  • blddensity

  • vertohor

  • grasscover

  • treecover

  • bld

  • h_mix

  • albroof

  • vegroof

  • glzr

  • albwall

  • flr_h

  • charlength

  • albroad

  • droad

  • kroad

  • croad

  • sensanth

  • schtraffic

property exposed_ground_area

Get the area of the terrain exposed to the outdoor air.

property facade_to_site

Get a fractional number for the ratio between the facade are and site area.

property footprint_density

Get a fractional number for the footprint density of the model.

property grass_coverage_fraction

Get or set the fraction of the exposed site area covered in grass or shrubs.

Anything not covered in grass is assumed to be pavement.

property host

Get the Model object hosting these properties.

property is_tree_coverage_autocalcualted

Get a boolean for whether tree coverage is autocalcualted from Context.

property terrain

Get or set a Terrain object that dictates the properties of the ground.

property traffic

Get or set a TrafficParameter object that dictates the street traffic.

property tree_coverage_fraction

Get or set the fraction of the exposed site area covered in trees.