dragonfly_uwg.terrain module¶
- class dragonfly_uwg.terrain.Terrain(geometry, pavement_albedo=0.1, pavement_thickness=0.5, pavement_conductivity=1.0, pavement_heat_capacity=1600000.0)[source]¶
Bases:
object
Object representing the terrain on which an urban area sits.
Note
[1] Street, Michael A. (2013). Comparison of simplified models of urban climate for improved prediction of building energy use in cities. Thesis (S.M. in Building Technology) - Massachusetts Institute of Technology, Dept. of Architecture, http://hdl.handle.net/1721.1/82284
- Parameters:
geometry – An array of ladybug_geometry Face3D objects that together represent the terrain. This should include the entire area of the site, including that beneath building footprints.
pavement_albedo – A number between 0 and 1 that represents the albedo (reflectivity) of the pavement. (Default: 0.1, typical of fresh asphalt).
pavement_thickness – A number that represents the thickness of the pavement material in meters. (Default: 0.5 meters).
pavement_conductivity – A number representing the conductivity of the pavement material in W/m-K. (Default: 1 W/m-K, typical of asphalt).
pavement_heat_capacity – A number representing the volumetric heat capacity of the pavement material in J/m3-K. This is the number of joules needed to raise one cubic meter of the material by 1 degree Kelvin. (Default: 1.6e6 J/m3-K, typical of asphalt).
- Properties:
geometry
pavement_albedo
pavement_thickness
pavement_conductivity
pavement_heat_capacity
polygon2ds
area
horizontal_area
characteristic_length
min
max
- classmethod from_building_bounding_rect(buildings)[source]¶
Initialize a Terrain from a list of dragonfly Buildings.
- Parameters:
buildings – An array of dragonfly Buildings around which a bounding rectangle will be computed to produce terrain geometry.
- classmethod from_dict(data)[source]¶
Initialize a Terrain from a dictionary.
- Parameters:
data – A dictionary representation of a Terrain object in the format below.
{ "type": 'Terrain', "geometry": [], # array for Face3D for the terrain surface "pavement_albedo": 0.15, # number for the pavement albedo "pavement_thickness": 0.75, # pavement thickness in meters "pavement_conductivity": 1.0, # pavement conductivity in W/m2-K "pavement_heat_capacity": 1600000 # volumetric heat capacity in J/m3-K }
- move(moving_vec)[source]¶
Move this Terrain 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).
- property area¶
Get a number for the total surface area of the Terrain.
- property characteristic_length¶
Get a number for the characteristic length.
This is the linear dimension of the side of a square that encompasses the neighborhood.
- property geometry¶
Get a tuple of Face3D objects that together represent the Terrain.
- property horizontal_area¶
Get a number for the horizontal area of the urban Terrain surface.
This is projected into the XY plane.
- property max¶
Get a Point2D for the max bounding rectangle vertex in the XY plane.
- property min¶
Get a Point2D for the min bounding rectangle vertex in the XY plane.
- property pavement_albedo¶
Get or set a number between 0 and 1 for the pavement albedo (reflectivity).
- property pavement_conductivity¶
Get or set a number for the pavement conductivity in W/m-K.
- property pavement_heat_capacity¶
Get or set a number for the pavement volumetric heat capacity in J/m3-K.
- property pavement_thickness¶
Get or set a number for the pavement thickness in meters.
- property polygon2ds¶
Get a tuple of Polygon2D objects that together represent the Terrain.