windpowerlib.modelchain.ModelChain

class windpowerlib.modelchain.ModelChain(power_plant, wind_speed_model='logarithmic', temperature_model='linear_gradient', density_model='barometric', power_output_model='power_curve', density_correction=False, obstacle_height=0, hellman_exp=None, **kwargs)[source]

Model to determine the output of a wind turbine

Parameters:
  • power_plant (WindTurbine) – A WindTurbine object representing the wind turbine.
  • wind_speed_model (string) – Parameter to define which model to use to calculate the wind speed at hub height. Valid options are ‘logarithmic’, ‘hellman’ and ‘interpolation_extrapolation’, ‘log_interpolation_extrapolation’. Default: ‘logarithmic’.
  • temperature_model (string) – Parameter to define which model to use to calculate the temperature of air at hub height. Valid options are ‘linear_gradient’ and ‘interpolation_extrapolation’. Default: ‘linear_gradient’.
  • density_model (string) – Parameter to define which model to use to calculate the density of air at hub height. Valid options are ‘barometric’, ‘ideal_gas’ and ‘interpolation_extrapolation’. Default: ‘barometric’.
  • power_output_model (string) – Parameter to define which model to use to calculate the turbine power output. Valid options are ‘power_curve’ and ‘power_coefficient_curve’. Default: ‘power_curve’.
  • density_correction (boolean) – If the parameter is True the density corrected power curve is used for the calculation of the turbine power output. Default: False.
  • obstacle_height (float) – Height of obstacles in the surrounding area of the wind turbine in m. Set obstacle_height to zero for wide spread obstacles. Default: 0.
  • hellman_exp (float) – The Hellman exponent, which combines the increase in wind speed due to stability of atmospheric conditions and surface roughness into one constant. Default: None.
power_plant

A WindTurbine object representing the wind turbine.

Type:WindTurbine
wind_speed_model

Parameter to define which model to use to calculate the wind speed at hub height. Valid options are ‘logarithmic’, ‘hellman’ and ‘interpolation_extrapolation’, ‘log_interpolation_extrapolation’. Default: ‘logarithmic’.

Type:string
temperature_model

Parameter to define which model to use to calculate the temperature of air at hub height. Valid options are ‘linear_gradient’ and ‘interpolation_extrapolation’. Default: ‘linear_gradient’.

Type:string
density_model

Parameter to define which model to use to calculate the density of air at hub height. Valid options are ‘barometric’, ‘ideal_gas’ and ‘interpolation_extrapolation’. Default: ‘barometric’.

Type:string
power_output_model

Parameter to define which model to use to calculate the turbine power output. Valid options are ‘power_curve’ and ‘power_coefficient_curve’. Default: ‘power_curve’.

Type:string
density_correction

If the parameter is True the density corrected power curve is used for the calculation of the turbine power output. Default: False.

Type:boolean
hellman_exp

The Hellman exponent, which combines the increase in wind speed due to stability of atmospheric conditions and surface roughness into one constant. Default: None.

Type:float
obstacle_height

Height of obstacles in the surrounding area of the wind turbine in m. Set obstacle_height to zero for wide spread obstacles. Default: 0.

Type:float
power_output

Electrical power output of the wind turbine in W.

Type:pandas.Series

Examples

>>> from windpowerlib import modelchain
>>> 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)
>>> modelchain_data = {'density_model': 'ideal_gas'}
>>> e126_mc = modelchain.ModelChain(e126, **modelchain_data)
>>> print(e126_mc.density_model)
ideal_gas
__init__(power_plant, wind_speed_model='logarithmic', temperature_model='linear_gradient', density_model='barometric', power_output_model='power_curve', density_correction=False, obstacle_height=0, hellman_exp=None, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(power_plant[, wind_speed_model, …]) Initialize self.
calculate_power_output(wind_speed_hub, …) Calculates the power output of the wind power plant.
density_hub(weather_df) Calculates the density of air at hub height.
run_model(weather_df) Runs the model.
temperature_hub(weather_df) Calculates the temperature of air at hub height.
wind_speed_hub(weather_df) Calculates the wind speed at hub height.