windpowerlib.wind_turbine.WindTurbine¶
-
class
windpowerlib.wind_turbine.
WindTurbine
(name, hub_height, rotor_diameter=None, power_coefficient_curve=None, power_curve=None, nominal_power=None, fetch_curve=None, coordinates=None, data_source='oedb', **kwargs)[source]¶ Defines a standard set of wind turbine attributes.
Parameters: - name (string) – Name of the wind turbine type.
Use
get_turbine_types()
to see a table of all wind turbines for which power (coefficient) curve data is provided. - hub_height (float) – Hub height of the wind turbine in m.
- rotor_diameter (None or float) – Diameter of the rotor in m. Default: None.
- power_coefficient_curve (None, pandas.DataFrame or dictionary) – Power coefficient curve of the wind turbine. DataFrame/dictionary must have ‘wind_speed’ and ‘value’ columns/keys with wind speeds in m/s and the corresponding power coefficients. Default: None.
- power_curve (None, pandas.DataFrame or dictionary) – Power curve of the wind turbine. DataFrame/dictionary must have ‘wind_speed’ and ‘value’ columns/keys with wind speeds in m/s and the corresponding power curve value in W. Default: None.
- nominal_power (None or float) – The nominal output of the wind turbine in W. Default: None.
- fetch_curve (string) – Parameter to specify whether a power or power coefficient curve should be retrieved from the provided turbine data. Valid options are ‘power_curve’ and ‘power_coefficient_curve’. Default: None.
- coordinates (list or None) – List of coordinates [lat, lon] of location for loading data. Default: None.
- data_source (string) – Specifies whether turbine data (f.e. nominal power, power curve, power coefficient curve) is loaded from the OpenEnergy Database (‘oedb’) or from a csv file (‘<path including file name>’). Default: ‘oedb’. See example_power_curves.csv’ and `example_power_coefficient_curves.csv in example/data for the required form of a csv file (more columns can be added).
-
name
¶ Name of the wind turbine type. Use
get_turbine_types()
to see a table of all wind turbines for which power (coefficient) curve data is provided.Type: string
-
power_coefficient_curve
¶ Power coefficient curve of the wind turbine. DataFrame/dictionary must have ‘wind_speed’ and ‘value’ columns/keys with wind speeds in m/s and the corresponding power coefficients. Default: None.
Type: None, pandas.DataFrame or dictionary
-
power_curve
¶ Power curve of the wind turbine. DataFrame/dictionary must have ‘wind_speed’ and ‘value’ columns/keys with wind speeds in m/s and the corresponding power curve value in W. Default: None.
Type: None, pandas.DataFrame or dictionary
-
coordinates
¶ List of coordinates [lat, lon] of location for loading data. Default: None.
Type: list or None
-
power_output
¶ The calculated power output of the wind turbine. Default: None.
Type: pandas.Series
Notes
Your wind turbine object should have a power coefficient or power curve. You can set the fetch_curve parameter and the data_source parameter if you want to automatically fetch a curve from a data set provided in the OpenEnergy Database (oedb) or want to read a csv file that you provide. See example_power_curves.csv’ and `example_power_coefficient_curves.csv in example/data for the required form of such a csv file (more columns can be added).
Examples
>>> from windpowerlib import wind_turbine >>> enerconE126 = { ... 'hub_height': 135, ... 'rotor_diameter': 127, ... 'name': 'E-126/4200', ... 'fetch_curve': 'power_curve', ... 'data_source': 'oedb'} >>> e126 = wind_turbine.WindTurbine(**enerconE126) >>> print(e126.nominal_power) 4200000.0
-
__init__
(name, hub_height, rotor_diameter=None, power_coefficient_curve=None, power_curve=None, nominal_power=None, fetch_curve=None, coordinates=None, data_source='oedb', **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(name, hub_height[, rotor_diameter, …])Initialize self. fetch_turbine_data
(fetch_curve, data_source)Fetches data of the requested wind turbine. - name (string) – Name of the wind turbine type.
Use