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

The ModelChain class provides a standardized, high-level interface for all of the modeling steps necessary for calculating wind turbine power output from weather time series inputs.

Parameters:
  • power_plant (WindTurbine) – A WindTurbine object representing the wind turbine.

  • wind_speed_model (str) –

    Parameter to define which model to use to calculate the wind speed at hub height. Valid options are:

    Default: ‘logarithmic’.

  • temperature_model (str) –

    Parameter to define which model to use to calculate the temperature of air at hub height. Valid options are:

    Default: ‘linear_gradient’.

  • density_model (str) –

    Parameter to define which model to use to calculate the density of air at hub height. Valid options are:

    Default: ‘barometric’.

  • power_output_model (str) –

    Parameter to define which model to use to calculate the turbine power output. Valid options are:

    • ’power_curve’ - See power_curve() for more information. In order to use the density corrected power curve to calculate the power output set parameter density_correction to True.

    • ’power_coefficient_curve’ - See power_coefficient_curve() for more information.

    Default: ‘power_curve’.

  • density_correction (bool) – This parameter is only used if the parameter power_output_model is ‘power_curve’. For more information on this parameter see parameter density_correction in power_curve(). Default: False.

  • obstacle_height (float) – This parameter is only used if the parameter wind_speed_model is ‘logarithmic’. For more information on this parameter see parameter obstacle_height in logarithmic(). Default: 0.

  • hellman_exp (float) – This parameter is only used if the parameter wind_speed_model is ‘hellman’. For more information on this parameter see parameter hellman_exponent in hellman(). Default: None.

power_plant

A WindTurbine object representing the wind turbine.

Type:

WindTurbine

wind_speed_model

Defines which model is used to calculate the wind speed at hub height.

Type:

str

temperature_model

Defines which model is used to calculate the temperature of air at hub height.

Type:

str

density_model

Defines which model is used to calculate the density of air at hub height.

Type:

str

power_output_model

Defines which model is used to calculate the turbine power output.

Type:

str

density_correction

Used to set density_correction parameter in power_curve().

Type:

bool

obstacle_height

Used to set obstacle_height in logarithmic().

Type:

float

hellman_exp

Used to set hellman_exponent in hellman().

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,
...    'turbine_type': 'E-126/4200'}
>>> 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]

Methods

__init__(power_plant[, wind_speed_model, ...])

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.