Wind Turbines

Wind Turbine Generator

Wind Turbine Generators (WTGs)

A .wtg file can be read using the windkit.read_wtg() function.

import windkit as wk
wtg = wk.read_wtg("Bonus_1_MW.wtg")
Dimensions:                        (mode: 1, wind_speed: 22)
* wind_speed                     (wind_speed) float64 4.0 5.0 ... 24.0 25.0
* mode                           (mode) int64 0
Data variables:
    power_output                   (mode, wind_speed) float64 2.41e+04 ... 1e+06
    thrust_coefficient             (mode, wind_speed) float64 0.915 ... 0.161
    air_density                    (mode) float64 1.225
    stationary_thrust_coefficient  (mode) float64 0.161
    wind_speed_cutin               (mode) float64 4.0
    wind_speed_cutout              (mode) float64 25.0
    rated_power                    (mode) float64 1e+06
    name                           <U10 'Bonus 1 MW'
    rotor_diameter                 float64 54.2
    hub_height                     float64 50.0
    regulation_type                int64 2
    Conventions:      CF-1.8
    Package name:     windkit
    Package version:  0.6.4.dev32+g349fa3c
    Creation date:    2023-10-31T09:04:58
    author:           Bjarke Tobias Olsen
    institution:      DTU Wind Energy

The wtg xarray.Dataset format contains a number of variables and attributes. The most important variables are:

  • power_output: The power output of the wind turbine generator in W.

  • thrust_coefficient: The thrust coefficient of the wind turbine generator.

  • air_density: The air density in kg/m3.

  • stationary_thrust_coefficient: The stationary thrust coefficient of the wind turbine generator.

  • wind_speed_cutin: The cut-in wind speed of the wind turbine generator in m/s.

  • wind_speed_cutout: The cut-out wind speed of the wind turbine generator in m/s.

  • rated_power: The rated power of the wind turbine generator in W.

The power output and the thrust coefficient are functions of the wind speed and the mode of the WTG. The mode is used to distinguish between different operating conditions of the WTG. Each mode is associated with a set of operating conditions, such as varying air density, cut-in and cut-out wind speeds, and rated power etc. In the WTG object above there is only one mode available.

To manually create a wind turbine generator, a xarray.Dataset following format desribed above can be created:

import numpy as np
import xarray as xr

# Create a wind turbine generator
power_output = np.random.rand(1, 22) * 1e6
thrust_coefficient = np.random.rand(1, 22)
air_density = np.array([1.225])
stationary_thrust_coefficient = np.array([0.161])
wind_speed_cutin = np.array([4.0])
wind_speed_cutout = np.array([25.0])
rated_power = np.array([1e6])
name = "Bonus 1 MW"
rotor_diameter = 54.2
hub_height = 50.0
regulation_type = 2  # 1=stall, 2=pitch

wind_speed = np.linspace(4.0, 25.0, 22)
mode = np.array([0])

wtg = xr.Dataset(
        power_output=(["mode", "wind_speed"], power_output),
        thrust_coefficient=(["mode", "wind_speed"], thrust_coefficient),
        air_density=(["mode"], air_density),
        stationary_thrust_coefficient=(["mode"], stationary_thrust_coefficient),
        wind_speed_cutin=(["mode"], wind_speed_cutin),
        wind_speed_cutout=(["mode"], wind_speed_cutout),
        rated_power=(["mode"], rated_power),

The resulting WTG is very similar to the one read from file above (apart from the randomly generated data).

Wind Turbines object

Groups of wind turbines can be created in WindKit Introduction can be created by instanciating a windkit.WindTurbines class object. This is done by providing a list of tuples of wind turbine generators and their respective positions:

import windkit as wk

wt_locs = wk.spatial.create_dataset(
    x=[0, 0, 0, 0, 0],
    y=[0, 1, 2, 3, 4],
    height=[50, 50, 50, 50, 50],

wts = wk.WindTurbines([
    (wtg, wt_locs),

In this case, just a single turbine group of five turbines is added. More turbine groups can be added by providing more tuples of wind turbine generators and their respective positions.