windpowerlib Documentation

repository·dev·Indexed 18 days ago

https://github.com/wind-python/windpowerlib

A Python library for calculating the power output of wind turbines, wind farms, and turbine clusters. It provides tools for modeling individual turbines via the WindTurbine class, managing fleets with WindFarm and WindTurbineCluster, and orchestrating workflows using ModelChain and TurbineClusterModelChain. Key features include height corrections for wind speed, temperature, and density, wake loss calculations, power curve smoothing, and integration with the Open Energy Data Base (OEDB).

Tokens
9.2K
Snippets
20
Records
60
Agent score
61%

What's inside windpowerlib

  1. New features in windpowerlib v0.0.5

    dev

    Version 0.0.5 introduced a complete restructuring of the library and added several key scientific calculation functions and data sets:

    • Wind Turbine Data: Power curves for numerous wind turbines are now included.
    • Air Density Calculation: Added rho_ideal_gas for calculating air density at hub height.
    • Wind Speed Calculation: Added v_wind_hellman for calculating wind speed at hub height.
    • Power Output: Added density correction for power output calculations.
    • Modelchain: Introduced modelchain for more convenient usage of the library's features.
  2. Core windpowerlib classes

    dev

    The primary entry points for wind power modeling in windpowerlib are the following classes:

    • wind_turbine.WindTurbine: Represents an individual wind turbine.
    • wind_farm.WindFarm: Represents a collection of turbines for wind farm calculations.
    • wind_turbine_cluster.WindTurbineCluster: Represents a cluster of turbines with specific calculation logic distinct from a WindFarm.
    • modelchain.ModelChain: A high-level object used to orchestrate the modeling process.
    • turbine_cluster_modelchain.TurbineClusterModelChain: An extension of ModelChain specifically designed for turbine clusters.
  3. Correct weather data height for wind turbine hub height

    dev

    Since weather data is often recorded at heights different from a turbine's hub height, windpowerlib provides modules to perform height corrections:

    • Wind Speed: Use the windspeedmodule to correct wind speed to the specific hub height of a turbine.
    • Temperature: Use the temperature_module for height correction of temperature data.
    • Density: Use the density_module for density calculations.
    • Extrapolation: If weather data is available at two or more heights, you can use linear or logarithmic inter-/extrapolation functions from the tools_module to determine values at the hub height.
  4. Use Modelchains for rapid wind power modeling

    dev

    Modelchains are high-level abstractions designed for an easy start. They combine multiple functions from the library into a single workflow. You can select desired functions via parameters, and any unspecified parameters will use default values.

    • Turbine Output Model: Use the modelchain in the modelchain_module to determine the output of a single wind turbine.
    • Farm/Cluster Output Model: Use the tc_modelchain_module to determine the output of a wind farm or a wind turbine cluster.
  5. Account for wake losses in wind farms

    dev

    You can account for wake losses (the reduction in wind speed/power caused by upstream turbines) using two different approaches:

    1. Wind Speed Reduction

    Use wind efficiency curves to determine the average reduction of wind speeds within a wind farm. These curves depend on the wind speed. You can retrieve these curves using get_wind_efficiency_curve. The library includes mean curves (based on dena-Netzstudie II and Kaspar Knorr studies) and 'extreme' curves for single farms that deviate significantly from the mean.

    2. Power Curve Reduction

    Apply losses directly to power curves by reducing power values by a constant or by a wind-speed-dependent efficiency. This is done using wake_losses_to_power_curve.

    Advantage: Applying efficiency to power curves instead of feed-in time series allows you to aggregate the power curves to obtain WindTurbineCluster power curves.

  6. Model wind farms and turbine clusters

    dev

    Version 0.1.0 introduced new abstractions for modeling complex wind energy systems:

    • WindFarm: Used for modeling a single wind farm. It includes attributes like aggregated power curves and wind farm efficiency (to account for wake losses).
    • WindTurbineCluster: Used for modeling a collection of multiple wind turbines and/or wind farms. This is particularly useful for grouping all turbines within a specific weather data grid cell. It can calculate an aggregated power curve that incorporates wake losses via a set efficiency.
    • TurbineClusterModelChain: A specialized class based on ModelChain that demonstrates how to use the new cluster and farm classes together.
  7. Model wind power using WindTurbine, WindFarm, and WindTurbineCluster

    dev

    The windpowerlib provides three primary classes for modeling different scales of wind power generation:

    1. WindTurbine: Models individual wind turbines.
    2. WindFarm: Models a collection of wind turbines organized as a farm.
    3. WindTurbineCluster: Models wind turbine clusters.

    These classes serve as the foundation for all power output and wind resource simulations in the library.

  8. Migrate to the revised WindTurbine API (v0.2.0)

    dev

    In version 0.2.0, the WindTurbine class underwent significant API changes. When initializing a turbine, note the following adjustments:

    • Parameter Renaming: The name parameter has been renamed to turbine_type.
    • Removed Parameters: fetch_curve, data_source, and coordinates have been removed.
    • Data Retrieval: By default, power curves and power coefficient curves are now automatically retrieved from the built-in oedb turbine library included with windpowerlib. This library contains data for a large set of wind turbines.
    • Units: Power curves and nominal power are now saved in W (Watts) instead of kW to maintain consistency with internal units.