API

Classes

wind_turbine.WindTurbine(turbine_name, ...) Defines a standard set of wind turbine attributes.
modelchain.ModelChain(wind_turbine[, ...]) Model to determine the output of a wind turbine

Temperature

Function for calculating air temperature at hub height.

temperature.linear_gradient(temperature, ...) Calculates the temperature at hub height using a linear gradient.

Density

Functions for calculating air density at hub height.

density.barometric(pressure, ...) Calculates the density of air at hub height using the barometric height equation.
density.ideal_gas(pressure, pressure_height, ...) Calculates the density of air at hub height using the ideal gas equation.

Wind speed

Functions for calculating wind speed at hub height.

wind_speed.logarithmic_profile(wind_speed, ...) Calculates the wind speed at hub height using a logarithmic wind profile.
wind_speed.hellman(wind_speed, ...[, ...]) Calculates the wind speed at hub height using the hellman equation.

Wind turbine data

Functions and methods to obtain the nominal power as well as power curve or power coefficient curve needed by the WindTurbine class.

wind_turbine.WindTurbine.fetch_turbine_data() Fetches data of the requested wind turbine.
wind_turbine.get_turbine_types([print_out]) Get the names of all possible wind turbine types for which the power coefficient curve or power curve is provided in the data files in the directory windpowerlib/data.
wind_turbine.read_turbine_data(**kwargs) Fetches power (coefficient) curves from a file.

Power output

Functions for calculating power output of a wind turbine.

power_output.power_coefficient_curve(...[, ...]) Calculates the turbine power output using a power coefficient curve.
power_output.power_curve(wind_speed, ...[, ...]) Calculates the turbine power output using a power curve.
power_output.power_curve_density_correction(...) Calculates the turbine power output using a density corrected power curve.

ModelChain

Creating a ModelChain object.

modelchain.ModelChain(wind_turbine[, ...]) Model to determine the output of a wind turbine

Running the ModelChain.

modelchain.ModelChain.run_model(weather_df) Runs the model.

Methods of the ModelChain object.

modelchain.ModelChain.temperature_hub(weather_df) Calculates the temperature of air at hub height.
modelchain.ModelChain.density_hub(weather_df) Calculates the density of air at hub height.
modelchain.ModelChain.wind_speed_hub(weather_df) Calculates the wind speed at hub height.
modelchain.ModelChain.turbine_power_output(...) Calculates the power output of the wind turbine.

Tools

Additional functions used in the windpowerlib.

tools.linear_interpolation_extrapolation(df, ...) Inter- or extrapolates between the values of a data frame.

Example

The basic example consists of the following functions.

basic_example.get_weather_data([filename]) Imports weather data from a file.
basic_example.initialise_wind_turbines() Initialises two WindTurbine objects.
basic_example.calculate_power_output(...) Calculates power output of wind turbines using the ModelChain.
basic_example.plot_or_print(my_turbine, e126) Plots or prints power output and power (coefficient) curves.
basic_example.run_basic_example() Run the basic example.