windpowerlib.wind_farm.WindFarm

class windpowerlib.wind_farm.WindFarm(wind_turbine_fleet, efficiency=None, name='', **kwargs)[source]

Defines a standard set of wind farm attributes.

Parameters:
  • wind_turbine_fleet (pandas.DataFrame or list(WindTurbineGroup)) –

    The wind turbine fleet specifies the turbine types in the wind farm and their corresponding number or total installed capacity. There are different options to provide the wind turbine fleet (see also examples below):

    • pandas.DataFrame - DataFrame must have columns ‘wind_turbine’ containing a WindTurbine object and either ‘number_of_turbines’ (number of wind turbines of the same turbine type in the wind farm, can be a float) or ‘total_capacity’ (installed capacity of wind turbines of the same turbine type in the wind farm).

    • list(WindTurbineGroup) - A WindTurbineGroup can be created from a WindTurbine using the to_group() method.

    • list(dict) - It is still possible to use a list of dictionaries (see example) but we recommend to use one of the other options above.

  • efficiency (float or pandas.DataFrame or None (optional)) – Efficiency of the wind farm. Provide as either constant (float) or power efficiency curve (pd.DataFrame) containing ‘wind_speed’ and ‘efficiency’ columns with wind speeds in m/s and the corresponding dimensionless wind farm efficiency. Default: None.

  • name (str (optional)) – Can be used as an identifier of the wind farm. Default: ‘’.

wind_turbine_fleet

Wind turbines of wind farm. DataFrame must have ‘wind_turbine’ (contains a WindTurbine object) and ‘number_of_turbines’ (number of wind turbines of the same turbine type in the wind farm) as columns.

Type:

pandas.DataFrame

efficiency

Efficiency of the wind farm. Either constant (float) power efficiency curve (pd.DataFrame) containing ‘wind_speed’ and ‘efficiency’ columns with wind speeds in m/s and the corresponding dimensionless wind farm efficiency. Default: None.

Type:

float or pandas.DataFrame or None

name

If set this is used as an identifier of the wind farm.

Type:

str

hub_height

The calculated mean hub height of the wind farm. See mean_hub_height() for more information.

Type:

float

power_curve

The calculated power curve of the wind farm. See assign_power_curve() for more information.

Type:

pandas.DataFrame or None

Examples

>>> from windpowerlib import wind_farm
>>> from windpowerlib import WindTurbine
>>> import pandas as pd
>>> enerconE126 = {
...    'hub_height': 135,
...    'rotor_diameter': 127,
...    'turbine_type': 'E-126/4200'}
>>> e126 = WindTurbine(**enerconE126)
>>> vestasV90 = {
...     'hub_height': 90,
...     'turbine_type': 'V90/2000',
...     'nominal_power': 2e6}
>>> v90 = WindTurbine(**vestasV90)
>>> # turbine fleet as DataFrame
>>> wind_turbine_fleet = pd.DataFrame(
...     {'wind_turbine': [e126, v90],
...      'number_of_turbines': [6, None],
...      'total_capacity': [None, 3 * 2e6]})
>>> example_farm = wind_farm.WindFarm(wind_turbine_fleet, name='my_farm')
>>> print(example_farm.nominal_power)
31200000.0
>>> # turbine fleet as a list of WindTurbineGroup objects using the
>>> # 'to_group' method.
>>> wind_turbine_fleet = [e126.to_group(6),
...                       v90.to_group(total_capacity=3 * 2e6)]
>>> example_farm = wind_farm.WindFarm(wind_turbine_fleet, name='my_farm')
>>> print(example_farm.nominal_power)
31200000.0
>>> # turbine fleet as list of dictionaries (not recommended)
>>> example_farm_data = {
...    'name': 'my_farm',
...    'wind_turbine_fleet': [{'wind_turbine': e126,
...                            'number_of_turbines': 6},
...                           {'wind_turbine': v90,
...                            'total_capacity': 3 * 2e6}]}
>>> example_farm = wind_farm.WindFarm(**example_farm_data)
>>> print(example_farm.nominal_power)
31200000.0
__init__(wind_turbine_fleet, efficiency=None, name='', **kwargs)[source]

Methods

__init__(wind_turbine_fleet[, efficiency, name])

assign_power_curve([wake_losses_model, ...])

Calculates the power curve of a wind farm.

check_and_complete_wind_turbine_fleet()

Function to check wind turbine fleet user input.

mean_hub_height()

Calculates the mean hub height of the wind farm.

Attributes

nominal_power

The nominal power is the sum of the nominal power of all turbines.