ladybug.windprofile module

Module for visualizing and converting between meteorological and other wind speeds.

class ladybug.windprofile.WindProfile(terrain='city', meteorological_terrain='country', meteorological_height=10, log_law=False)[source]

Bases: object

Object for visualizing and converting from meteorological wind speeds.

Parameters:
  • terrain

    A text string that sets the terrain class associated with the location that the wind profile represents. (Default: city). Values must be one the following:

    • city - 50% of buildings above 21m over a distance of at least 2000m upwind.

    • suburban - suburbs, wooded areas.

    • country - open, with scattered objects generally less than 10m high.

    • water - flat areas downwind of a large water body (max 500m inland).

  • meteorological_terrain – A text string that sets the terrain class associated with the meteorological wind speed. (Default: country, which is typical of most airports where wind measurements are taken).

  • meteorological_height – A number for the height above the ground at which the meteorological wind speed is measured in meters. (Default: 10 meters).

  • log_law – A boolean to note whether the wind profile should use a logarithmic law to determine wind speeds instead of the default power law, which is used by EnergyPlus. (Default: False).

Properties:
  • terrain

  • meteorological_terrain

  • meteorological_height

  • log_law

  • boundary_layer_height

  • power_law_exponent

  • roughness_length

  • met_boundary_layer_height

  • met_power_law_exponent

  • met_roughness_length

ToString()[source]

Overwrite .NET ToString method.

calculate_wind(meteorological_wind_speed, height=1)[source]

Calculate the wind speed at a given height above the ground.

Parameters:
  • meteorological_wind_speed – A number for the meteorological wind speed [m/s].

  • height – The height above the ground to be evaluated in meters. (Default: 1).

calculate_wind_data(meteorological_wind_data, height=1)[source]

Get a data collection of wind speed at a given height above the ground.

Parameters:
  • meteorological_wind_data – A data collection of meteorological wind speed [m/s].

  • height – The height above the ground to be evaluated in meters. (Default: 1).

height_axis(max_height=30, tick_spacing=4, direction=None, base_point=Point3D(0.00, 0.00, 0.00), scale_factor=1, text_height=None, feet_labels=False)[source]

Get a several objects for representing the Y axis for height above the ground.

Parameters:
  • max_height – A number in meters to specify the maximum height of the wind profile curve. (Default: 30 meters).

  • tick_spacing – A number in meters to specify the difference between each of axis ticks. (Default 4 meters).

  • direction – An optional number between 0 and 360 that represents the cardinal direction that the wind profile is facing in the XY plane. 0 = North, 90 = East, 180 = South, 270 = West. If None, the axis will simply be placed in the XY plane. (Default: None).

  • base_point – A ladybug-geometry Point3D that represents the ground location of the wind profile. (Default, (0, 0, 0)).

  • scale_factor – An optional number that will be multiplied by all dimensions to account for the fact that the wind profile may be displaying in a units system other than meters. (Default: 1).

  • text_height – An optional number for the height of the text in the axis label. If None, the text height will be inferred based on the tick_spacing. (Default: None).

  • feet_labels – A boolean to note whether the text labels should be in feet (True) or meters (False). (Default: False).

Returns:

A tuple with three values.

  • axis_line: A ladybug-geometry Linesegment3D representing the axis.

  • axis_arrow: A ladybug-geometry Mesh3D representing the arrow head.

  • axis_ticks: A list of ladybug-geometry LineSegment3D representing the

    marks of heights along the axis.

  • text: A list of text strings tha align with the text_planes for the

    text to display in the 3D scene.

legend_plane(max_speed=5, direction=None, base_point=Point3D(0.00, 0.00, 0.00), length_dimension=5, scale_factor=1)[source]

Get a recommended Plane for the default base plane of the legend.

Parameters:
  • max_speed – A number for the maximum wind speed along the axis in [m/s]. (Default: 5)

  • direction – An optional number between 0 and 360 that represents the cardinal direction that the axis is facing in the XY plane. 0 = North, 90 = East, 180 = South, 270 = West. If None, the axis will simply be placed in the XY plane. (Default: None).

  • base_point – A ladybug-geometry Point3D that represents the origin of the axis. (Default, (0, 0, 0)).

  • length_dimension – A number to denote the length dimension of a 1 m/s wind vector in meters. (Default: 5).

  • scale_factor – An optional number that will be multiplied by all dimensions to account for the fact that the wind profile may be displaying in a units system other than meters. (Default: 1).

Returns:

A ladybug-geometry Plane for the recommended legend plane.

mesh_arrow(meteorological_wind_speed, height, direction=None, base_point=Point3D(0.00, 0.00, 0.00), length_dimension=5, height_dimension=1, scale_factor=1)[source]

Get a Mesh3D for an arrow at a given height above the ground.

Parameters:
  • meteorological_wind_speed – A number for the meteorological wind speed [m/s].

  • height – The height above the ground to be evaluated in meters.

  • direction – An optional number between 0 and 360 that represents the cardinal direction that the mesh arrow is facing in the XY plane. 0 = North, 90 = East, 180 = South, 270 = West. If None, the wind vector and mesh arrow will simply be placed in the XY plane. (Default: None).

  • base_point – A ladybug-geometry Point3D that represents the ground location of the wind profile. (Default, (0, 0, 0)).

  • length_dimension – A number to denote the length dimension of a 1 m/s wind vector in meters. This will be used to set the length of the wind vector arrow. (Default: 5).

  • height_dimension – A number to denote the height dimension of the wind vector in meters. (Default: 1).

  • scale_factor – An optional number that will be multiplied by all dimensions to account for the fact that the wind profile may be displaying in a units system other than meters. (Default: 1).

Returns:

A tuple with four values.

  • mesh_arrow: A Mesh3D object that represents the wind speed at the

    height above the ground.

  • wind_vector: A ladybug-geometry Vector3D representing the wind vector.

  • anchor_pt: A ladybug-geometry Point3D representing the anchor point

    for the wind vector.

  • wind_speed: A number for the wind speed associated with the mesh arrow.

mesh_arrow_profile(meteorological_wind_speed, max_height=30, vector_spacing=2, direction=None, base_point=Point3D(0.00, 0.00, 0.00), length_dimension=5, height_dimension=1, scale_factor=1)[source]

Get a Polyline3D for a wind profile curve at a meteorological wind speed.

Parameters:
  • meteorological_wind_speed – A number for the meteorological wind speed [m/s].

  • max_height – A number in meters to specify the maximum height of the wind profile curve. (Default: 30 meters).

  • vector_spacing – A number in meters to specify the difference in height between each of the mesh arrows. (Default 2 meters).

  • direction – An optional number between 0 and 360 that represents the cardinal direction that the wind profile is facing in the XY plane. 0 = North, 90 = East, 180 = South, 270 = West. If None, the wind profile will simply be placed in the XY plane. (Default: None).

  • base_point – A ladybug-geometry Point3D that represents the ground location of the wind profile. (Default, (0, 0, 0)).

  • length_dimension – A number to denote the length dimension of a 1 m/s wind vector in meters. (Default: 5).

  • height_dimension – A number to denote the height dimension of the wind vector in meters. (Default: 1).

  • scale_factor – An optional number that will be multiplied by all dimensions to account for the fact that the wind profile may be displaying in a units system other than meters. (Default: 1).

Returns:

A tuple with five values

  • profile_polyline: A ladybug-geometry Polyline3D representing the

    wind profile.

  • mesh_arrows: A list of ladybug-geometry Mesh3D objects that

    represent the wind speed along with wind profile.

  • wind_speeds: A list of numbers for the wind speed associated with

    the mesh arrows.

  • wind_vectors: A list of ladybug-geometry Vector3D representing the

    wind vectors that built the profile.

  • anchor_pts: A list of ladybug-geometry Point3D representing the

    anchor points for the wind vectors.

profile_polyline3d(meteorological_wind_speed, max_height=30, vector_spacing=2, direction=None, base_point=Point3D(0.00, 0.00, 0.00), length_dimension=5, scale_factor=1)[source]

Get a Polyline3D for a wind profile curve at a meteorological wind speed.

Parameters:
  • meteorological_wind_speed – A number for the meteorological wind speed [m/s].

  • max_height – A number in meters to specify the maximum height of the wind profile curve. (Default: 30 meters).

  • vector_spacing – A number in meters to specify the difference in height between each of the wind vectors that is used to build the profile curve. Lower numbers will result in smoother looking curves. (Default 2 meters).

  • direction – An optional number between 0 and 360 that represents the cardinal direction that the wind profile is facing in the XY plane. 0 = North, 90 = East, 180 = South, 270 = West. If None, the wind profile will simply be placed in the XY plane. (Default: None).

  • base_point – A ladybug-geometry Point3D that represents the ground location of the wind profile. (Default, (0, 0, 0)).

  • length_dimension – A number to denote the length dimension of a 1 m/s wind vector in meters. (Default: 5).

  • scale_factor – An optional number that will be multiplied by all dimensions to account for the fact that the wind profile may be displaying in a units system other than meters. (Default: 1).

Returns:

A tuple with three values.

  • profile_polyline: A ladybug-geometry Polyline3D representing the

    wind profile.

  • wind_vectors: A list of ladybug-geometry Vector3D representing the

    wind vectors that built the profile.

  • anchor_pts: A list of ladybug-geometry Point3D representing the

    anchor points for the wind vectors.

speed_axis(max_speed=5, direction=None, base_point=Point3D(0.00, 0.00, 0.00), length_dimension=5, scale_factor=1, text_height=None)[source]

Get a several objects for representing the X axis for wind speed.

Parameters:
  • max_speed – A number for the maximum wind speed along the axis in [m/s]. (Default: 5)

  • direction – An optional number between 0 and 360 that represents the cardinal direction that the axis is facing in the XY plane. 0 = North, 90 = East, 180 = South, 270 = West. If None, the axis will simply be placed in the XY plane. (Default: None).

  • base_point – A ladybug-geometry Point3D that represents the origin of the axis. (Default, (0, 0, 0)).

  • length_dimension – A number to denote the length dimension of a 1 m/s wind vector in meters. (Default: 5).

  • scale_factor – An optional number that will be multiplied by all dimensions to account for the fact that the wind profile may be displaying in a units system other than meters. (Default: 1).

  • text_height – An optional number for the height of the text in the axis label. If None, the text height will be inferred based on the length_dimension. (Default: None).

Returns:

A tuple with three values.

  • axis_line: A ladybug-geometry Linesegment3D representing the axis.

  • axis_arrow: A ladybug-geometry Mesh3D representing the arrow head.

  • axis_ticks: A list of ladybug-geometry LineSegment3D representing the

    marks of speeds along the axis.

  • text_planes: A list of ladybug-geometry Planes for the axis text labels.

  • text: A list of text strings tha align with the text_planes for the

    text to display in the 3D scene.

title_plane(direction=None, base_point=Point3D(0.00, 0.00, 0.00), length_dimension=5, scale_factor=1, text_height=None)[source]

Get a recommended Plane for the default base plane of the title.

Parameters:
  • max_speed – A number for the maximum wind speed along the axis in [m/s]. (Default: 5)

  • direction – An optional number between 0 and 360 that represents the cardinal direction that the axis is facing in the XY plane. 0 = North, 90 = East, 180 = South, 270 = West. If None, the axis will simply be placed in the XY plane. (Default: None).

  • base_point – A ladybug-geometry Point3D that represents the origin of the axis. (Default, (0, 0, 0)).

  • length_dimension – A number to denote the length dimension of a 1 m/s wind vector in meters. (Default: 5).

  • scale_factor – An optional number that will be multiplied by all dimensions to account for the fact that the wind profile may be displaying in a units system other than meters. (Default: 1).

  • text_height – An optional number for the height of the text in the axis label. If None, the text height will be inferred based on the length_dimension. (Default: None).

Returns:

A ladybug-geometry Plane for the recommended title plane.

wind_vector(meteorological_wind_speed, height, direction=None, length_dimension=1, scale_factor=1)[source]

Get a Vector3D for a wind profile arrow at a given height above the ground.

Parameters:
  • meteorological_wind_speed – A number for the meteorological wind speed [m/s].

  • height – The height above the ground to be evaluated in meters.

  • direction – An optional number between 0 and 360 that represents the cardinal direction that the wind vector is facing in the XY plane. 0 = North, 90 = East, 180 = South, 270 = West. If None, the wind vector will simply be placed in the XY plane. (Default: None).

  • length_dimension – A number to denote the length dimension of a 1 m/s wind vector in meters. This will be used to set the length of the wind vector. (Default: 1).

  • scale_factor – An optional number that will be multiplied by all dimensions to account for the fact that the wind profile may be displaying in a units system other than meters. (Default: 1).

Returns:

A ladybug-geometry Vector3D representing the wind vector.

BLACK = (R:0, G:0, B:0, A:255)
TERRAINS = ('city', 'suburban', 'country', 'water')
TERRAIN_PARAMETERS = {'city': (460, 0.33, 1.0), 'country': (270, 0.14, 0.1), 'suburban': (370, 0.22, 0.5), 'water': (210, 0.1, 0.03)}
property boundary_layer_height

Get or set the boundary layer height of the wind profile location [m].

property log_law

A boolean to note whether the wind profile should be using a logarithmic law.

property met_boundary_layer_height

Get or set the boundary layer height of the meteorological location [m].

property met_power_law_exponent

Get or set the power law exponent of the meteorological location.

property met_roughness_length

Get or set the roughness length of the meteorological location [m].

property meteorological_height

Get or set the measurement height of the meteorological wind speed [m].

property meteorological_terrain

Get or set text for the terrain class for the meteorological location.

Setting this will set all of the properties of the boundary layer, roughness length, etc. Choose from the following options.

  • city

  • suburban

  • country

  • water

property power_law_exponent

Get or set the power law exponent of the wind profile location.

property roughness_length

Get or set the roughness length of the wind profile location [m].

property terrain

Get or set text for the terrain class for the wind profile location.

Setting this will set all of the properties of the boundary layer, roughness length, etc. Choose from the following options.

  • city

  • suburban

  • country

  • water