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
) – AWindTurbine
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:
’logarithmic’ - See
logarithmic_profile()
for more information. The parameter obstacle_height can be used to set the height of obstacles in the surrounding area of the wind turbine.’hellman’ - See
hellman()
for more information.’interpolation_extrapolation’ - See
linear_interpolation_extrapolation()
for more information.’log_interpolation_extrapolation’ - See
logarithmic_interpolation_extrapolation()
for more information.
Default: ‘logarithmic’.
temperature_model (str) –
Parameter to define which model to use to calculate the temperature of air at hub height. Valid options are:
’linear_gradient’ - See
linear_gradient()
for more information.’interpolation_extrapolation’ - See
linear_interpolation_extrapolation()
for more information.
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:
’barometric’ - See
barometric()
for more information.’ideal_gas’ - See
ideal_gas()
for more information.’interpolation_extrapolation’ - See
linear_interpolation_extrapolation()
for more information.
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:
- temperature_model¶
Defines which model is used to calculate the temperature of air at hub height.
- Type:
- density_correction¶
Used to set density_correction parameter in
power_curve()
.- Type:
- power_output¶
Electrical power output of the wind turbine in W.
- Type:
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.