API

Classes

wind_turbine.WindTurbine(hub_height[, …]) Defines a standard set of wind turbine attributes.
wind_farm.WindFarm(wind_turbine_fleet[, …]) Defines a standard set of wind farm attributes.
wind_turbine_cluster.WindTurbineCluster(…) Defines a standard set of wind turbine cluster attributes.
modelchain.ModelChain(power_plant[, …]) Model to determine the output of a wind turbine
turbine_cluster_modelchain.TurbineClusterModelChain(…) Model to determine the output of a wind farm or wind turbine cluster.

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.get_turbine_data_from_file(…) Fetches turbine data from a csv file.
wind_turbine.load_turbine_data_from_oedb([…]) Loads turbine library from the OpenEnergy database (oedb).
wind_turbine.get_turbine_types([…]) Get all provided wind turbine types provided.

Data Container

Create data container to be used as an input in classes und functions.

wind_turbine.WindTurbineGroup A simple data container to define more than one turbine of the same type.
wind_turbine.WindTurbine.to_group([…]) Creates a WindTurbineGroup, a NamedTuple data container with the fields ‘number_of_turbines’ and ‘wind_turbine’.

Wind farm calculations

Functions and methods to calculate the mean hub height, installed power as well as the aggregated power curve of a WindFarm object.

wind_farm.WindFarm.check_and_complete_wind_turbine_fleet() Function to check wind turbine fleet user input.
wind_farm.WindFarm.nominal_power The nominal power is the sum of the nominal power of all turbines.
wind_farm.WindFarm.mean_hub_height() Calculates the mean hub height of the wind farm.
wind_farm.WindFarm.assign_power_curve([…]) Calculates the power curve of a wind farm.

Wind turbine cluster calculations

Functions and methods to calculate the mean hub height, installed power as well as the aggregated power curve of a WindTurbineCluster object. This is realized in a new module as the functions differ from the functions in the WindFarm class.

wind_turbine_cluster.WindTurbineCluster.nominal_power The nominal power is the sum of the nominal power of all turbines in the wind turbine cluster.
wind_turbine_cluster.WindTurbineCluster.mean_hub_height() Calculates the mean hub height of the wind turbine cluster.
wind_turbine_cluster.WindTurbineCluster.get_installed_power() Calculates the nominal_power of a wind turbine cluster.
wind_turbine_cluster.WindTurbineCluster.assign_power_curve([…]) Calculates the power curve of a wind turbine cluster.

Power output

Functions for calculating power output of a wind power plant.

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.

Alteration of power curves

Functions for smoothing power curves or applying wake losses to a power curve.

power_curves.smooth_power_curve(…[, …]) Smoothes a power curve by using a Gauss distribution.
power_curves.wake_losses_to_power_curve(…) Reduces the power values of a power curve by an efficiency (curve).

Wake losses

Functions for applying wake losses to a wind speed time series.

wake_losses.reduce_wind_speed(wind_speed[, …]) Reduces wind speed by a wind efficiency curve.
wake_losses.get_wind_efficiency_curve([…]) Reads wind efficiency curve(s) specified in curve_name.

ModelChain

Creating a ModelChain object.

modelchain.ModelChain(power_plant[, …]) 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.calculate_power_output(…) Calculates the power output of the wind power plant.

TurbineClusterModelChain

The TurbineClusterModelChain inherits all functions from the ModelChain.

Creating a TurbineClusterModelChain object.

turbine_cluster_modelchain.TurbineClusterModelChain(…) Model to determine the output of a wind farm or wind turbine cluster.

Running the TurbineClusterModelChain.

turbine_cluster_modelchain.TurbineClusterModelChain.run_model(…) Runs the model.

Methods of the TurbineClusterModelChain object.

turbine_cluster_modelchain.TurbineClusterModelChain.assign_power_curve(…) Calculates the power curve of the wind turbine cluster.
turbine_cluster_modelchain.TurbineClusterModelChain.temperature_hub(…) Calculates the temperature of air at hub height.
turbine_cluster_modelchain.TurbineClusterModelChain.density_hub(…) Calculates the density of air at hub height.
turbine_cluster_modelchain.TurbineClusterModelChain.wind_speed_hub(…) Calculates the wind speed at hub height.
turbine_cluster_modelchain.TurbineClusterModelChain.calculate_power_output(…) Calculates the power output of the wind power plant.

Tools

Additional functions used in the windpowerlib.

tools.linear_interpolation_extrapolation(df, …) Linearly inter- or extrapolates between the values of a data frame.
tools.logarithmic_interpolation_extrapolation(df, …) Logarithmic inter- or extrapolation between the values of a data frame.
tools.gauss_distribution(function_variable, …) Gauss distribution.
tools.estimate_turbulence_intensity(height, …) Estimate turbulence intensity by the roughness length.

ModelChain example

The modelchain_example consists of the following functions.

modelchain_example.get_weather_data([filename]) Imports weather data from a file.
modelchain_example.initialize_wind_turbines() Initializes three WindTurbine objects.
modelchain_example.calculate_power_output(…) Calculates power output of wind turbines using the ModelChain.
modelchain_example.plot_or_print(my_turbine, …) Plots or prints power output and power (coefficient) curves.
modelchain_example.run_example() Runs the basic example.

TurbineClusterModelChain example

The turbine_cluster_modelchain_example consists of the following functions as well as it uses functions of the modelchain_example.

turbine_cluster_modelchain_example.initialize_wind_farms(…) Initializes two WindFarm objects.
turbine_cluster_modelchain_example.initialize_wind_turbine_cluster(…) Initializes a WindTurbineCluster object.
turbine_cluster_modelchain_example.calculate_power_output(…) Calculates power output of wind farms and clusters using the TurbineClusterModelChain.
turbine_cluster_modelchain_example.plot_or_print(…) Plots or prints power output and power (coefficient) curves.
turbine_cluster_modelchain_example.run_example() Runs the example.