Basic Wind Turbine Simulation#

  • A basic wind turbine simulation can be performed

  • Requires known wind speeds

  • A power curve can be supplied directly, or a synthetic power curve can be automatically generated

Workflow:

  1. Import required packages

  2. Define turbine constants

  3. Simulate turbine directly with known wind speed data

  4. Plot powercurve and windspeeds and capacity factors over time

import reskit as rk
# Set some constants for later

TURBINE_CAPACITY = 4200  # kW
TURBINE_HUB_HEIGHT = 120  # meters
TURBINE_ROTOR_DIAMETER = 136  # meters
TURBINE_LOCATION = (6.0, 50.5)  # (lon, lat)

Simulate turbine directly with known wind speed data#

wind_speeds = [
    5.384,
    5.323,
    5.232,
    5.161,
    5.439,
    6.045,
    6.417,
    6.611,
    6.831,
    6.589,
    6.929,
    7.571,
    7.543,
    7.12,
    7.536,
    8.757,
    9.776,
    9.952,
    10.326,
    10.875,
    11.239,
    11.665,
    12.086,
    12.48,
    12.727,
    12.969,
    13.243,
    13.53,
    13.658,
    13.339,
    12.723,
    12.11,
    11.674,
    10.8,
    10.696,
    9.721,
    9.133,
    9.581,
    9.528,
    9.686,
    9.492,
    9.004,
    8.48,
    8.159,
    7.918,
    7.692,
    7.204,
    7.092,
    6.887,
    6.568,
    6.532,
    6.841,
    7.354,
    7.579,
    7.588,
    7.859,
    8.2,
    7.847,
    6.918,
    6.289,
    6.222,
    6.223,
    5.78,
    5.217,
    4.379,
    4.292,
    5.725,
    6.609,
    5.364,
    4.901,
    5.979,
]

pc = rk.wind.PowerCurve.from_capacity_and_rotor_diam(capacity=TURBINE_CAPACITY, rotor_diam=TURBINE_ROTOR_DIAMETER)

capacity_factors = pc.simulate(wind_speed=wind_speeds)
capacity_factors
array([0.14190208, 0.1365305 , 0.12875232, 0.1228696 , 0.14685994,
       0.206934  , 0.25053008, 0.27524018, 0.3047351 , 0.2723722 ,
       0.31818616, 0.41589923, 0.41123225, 0.3449083 , 0.41006914,
       0.63459522, 0.82416934, 0.85282688, 0.90355308, 0.95719743,
       0.97848641, 0.99253816, 0.99981756, 1.        , 1.        ,
       1.        , 1.        , 1.        , 1.        , 1.        ,
       1.        , 0.99992682, 0.99275347, 0.95151289, 0.94275694,
       0.81487474, 0.70776469, 0.79058219, 0.7811371 , 0.80887692,
       0.77464588, 0.68287471, 0.58099563, 0.51995009, 0.47617543,
       0.4363981 , 0.35710433, 0.34091314, 0.31242855, 0.26965369,
       0.26503977, 0.30611076, 0.38030558, 0.41723748, 0.41874588,
       0.4656284 , 0.52760146, 0.46349303, 0.31667659, 0.23483321,
       0.2268853 , 0.22700229, 0.17919551, 0.12749541, 0.06830299,
       0.06308339, 0.17381806, 0.27497874, 0.14012643, 0.10293064,
       0.19982399])
pc = rk.wind.PowerCurve.from_capacity_and_rotor_diam(capacity=TURBINE_CAPACITY, rotor_diam=TURBINE_ROTOR_DIAMETER)
pc
../../_images/98f39c5d32a148fe749c04c2ef4a9babf2e5390e5835320a77c8dee473ae266d.svg
# Comparison of wind speeds and capacity factors plot
import matplotlib.pyplot as plt

plt.rc("font", size=18)

fig, ax = plt.subplots(ncols=2, gridspec_kw=dict(wspace=0.25), figsize=(15, 5))
ax[0].plot(wind_speeds)
ax[0].set_ylabel("Wind Speed [m/s]")
ax[0].set_xlabel("Time Step")
ax[0].grid()
ax[0].set_ylim(0, 14)

ax[1].plot(capacity_factors)
ax[1].set_ylabel("Capacity Factor")
ax[1].set_xlabel("Time Step")
ax[1].grid()
ax[1].set_ylim(0, 1.05)
plt.show()
../../_images/a89d7ba0c41cc2d0bc32a8a64b34e0b2c6c2a32f29253cc02053cc4b42dc41ff.png