welib

Wind energy library, Python and matlab tools for wind turbines analyses.
https://github.com/ebranlard/welib

Category: Renewable Energy
Sub Category: Wind Energy

Keywords

modeling wind-energy

Keywords from Contributors

aeroelasticity wind wind-farm wind-power wind-turbine

Last synced: about 13 hours ago
JSON representation

Repository metadata

Wind energy library, python and matlab tools for wind turbines analyses

README.md

��Build status
Buy Me a Coffee

Wind Energy Library - welib

Wind energy library: suite of python and matlab tools for aero-servo-hydro-elasticity (aerodynanmics, controls, hydrodynamics, structure/elasticity) and wind energy.

Installation and testing

Installing the latest release:

pip install --upgrade welib

Installing the latest dev version and running the unittests:

git clone http://github.com/ebranlard/welib -b dev
cd welib
python -m pip install -r requirements.txt
python -m pip install -e .
pytest

Gallery of example scripts

A sample of the figures generated by the examples in this repository are given below.
Additional examples can be found in the examples and tests folders of the different subpackages.

Click on the links to access the corresponding scripts.
Click on the figures to enlarge the figures.

airfoils: airfoil and polar applications

Examples of applications:

  • Manipulation of airfoil curves, find slopes, interpolate (see airfoils)
  • Run different dynamic stall models (e.g Oye or MHH/HGM model) (see airfoils/DS)

Sample figures from examples:

Airfoils - 3D correction Airfoils - Karman-Trefftz Velocity Field Airfoils - MGH dynamic stall model Airfoils - Oye dynamic stall model Airfoils - Wagner function
Airfoils - 3D correction Airfoils - Karman-Trefftz Velocity Field Airfoils - MGH dynamic stall model Airfoils - Oye dynamic stall model Airfoils - Wagner function

BEM: Blade Element Momentum Theory

Examples of Blade Element Momentum (BEM) Theory applications.

Sample figures from examples:

BEM - Steady - CP-lambda-pitch BEM - Steady - High thrust correction BEM - Steady - Performance curve BEM - Theory - Ideal rotor planform BEM - Unsteady - Prescribed surge motion
BEM - Steady - CP-lambda-pitch BEM - Steady - High thrust correction BEM - Steady - Performance curve BEM - Theory - Ideal rotor planform BEM - Unsteady - Prescribed surge motion

beam: beam theory and numerical analyses

Sample figures from examples:

Beam - 1D - Analytical and numerical deflections Beam - 1D - Analytical and numerical modes Beam - 2D - NREL5MW coupled blade modes Beam - 2D - NREL5MW deflections Beam - Analytical mode shapes different BC
Beam - 1D - Analytical and numerical deflections Beam - 1D - Analytical and numerical modes Beam - 2D - NREL5MW coupled blade modes Beam - 2D - NREL5MW deflections Beam - Analytical mode shapes different BC
Beam - Analytical mode shapes of a beam
Beam - Analytical mode shapes of a beam

dyninflow: dynamic inflow

Sample figures from examples:

Dynamic Inflow - Oye - induction step
Dynamic Inflow - Oye - induction step

fast: OpenFAST tools

This package led to the openfast\_toolbox
Sample figures from examples:

FAST - Average radial outputs FAST - interpolate radial time series
FAST - Average radial outputs FAST - interpolate radial time series

FEM: finite element method

Examples of applications:

  • Perform 2d/3d FEM analyses using beam/frame elements (see FEM)
  • Craig-Bampton / Guyan reduction of a structure (see FEM)

Sample figures from examples:

FEM - mode shapes of a beam FEM - mode shapes of tower
FEM - mode shapes of a beam FEM - mode shapes of tower

hydro: hydrodynamics applications

Examples of applications:

  • Wave kinematics for linear waves (see hydro/Ex1)
  • Generation of wave time series from a given spectrum (see hydro/Ex3)
  • Computation of wave loads on a monopile (see hydro/Ex4)

Sample figures from examples:

Hydro - Jonswap spectrum Hydro - Morison loads on monopile Hydro - wave generation Hydro - Wave kinematics
Hydro - Jonswap spectrum Hydro - Morison loads on monopile Hydro - wave generation Hydro - Wave kinematics

standards

Sample figures from examples:

IEC Standards - Extreme operating gusts IEC Standards - Turbulence classes
IEC Standards - Extreme operating gusts IEC Standards - Turbulence classes

partdyn: particle dynamics

Sample figures from examples:

PartDyn - Gravitational and spring interactions PartDyn - Gravitational interaction - Moon Orbit
PartDyn - Gravitational and spring interactions PartDyn - Gravitational interaction - Moon Orbit

plot

Sample figures from examples:

Plot - 3D blades
Plot - 3D blades

stoch: stochasticity

Manipulate stochastic variables.
Sample figures from examples:

Stochastic - Correlated variables Stochastic - Distributions Stochastic - Independent and standardized
Stochastic - Correlated variables Stochastic - Distributions Stochastic - Independent and standardized

system: system dynamics applications

Examples of applications:

  • Linearize a non-linear system defined by a state and output equation (implicit or explicit) (see system)
  • Perform time integration of mechanical systems (see system)

Sample figures from examples:

System - 2nd order - forced vibrations System - 2nd order - Responses System - 3D pendulum - motion System - LTI Bode plot - 2nd order mass spring damper System - Lorenz attractor
System - 2nd order - forced vibrations System - 2nd order - Responses System - 3D pendulum - motion System -  LTI Bode plot - 2nd order mass spring damper System - Lorenz attractor

tools: misc tools

  • Spectral analyses, signal processing, time integration, vector analyses
    Sample figures from examples:
Tools - Fatigue - Sinusoids Tools - Signal - Correlation coefficient Tools - Signal - FFT
Tools - Fatigue - Sinusoids Tools - Signal - Correlation coefficient Tools - Signal - FFT

vortilib: vortex dynamics, theory and methods

Sample figures from examples:

Vortilib - 2D vorticity patch discretized with vortex points Vortilib - Elliptical Coordinates Vortilib - Flow about a 2D point doublet Vortilib - Flow about a 2D point doublet - alt Vortilib - Flow about a 2D point source
Vortilib - 2D vorticity patch discretized with vortex points Vortilib - Elliptical Coordinates Vortilib - Flow about a 2D point doublet Vortilib - Flow about a 2D point doublet - alt Vortilib - Flow about a 2D point source
Vortilib - Flow about a 2D point source - alt Vortilib - Flow about a 2D point vortex Vortilib - Flow about a 2D point vortex - alt Vortilib - Flow about a 2D Rankine oval - alt Vortilib - Flow about a 2D vortex cylinder - Gamma=0.0
Vortilib - Flow about a 2D point source - alt Vortilib - Flow about a 2D point vortex Vortilib - Flow about a 2D point vortex - alt Vortilib - Flow about a 2D Rankine oval - alt Vortilib - Flow about a 2D vortex cylinder - Gamma=0.0
Vortilib - Flow about a 2D vortex cylinder - Gamma=0.5 Vortilib - Flow about a 2D vortex cylinder - Gamma=1.1 Vortilib - Flow about an axisymmetric vorticity surface Vortilib - Flow about an Ellipsoid Vortilib - Inviscid Vorticity Patch
Vortilib - Flow about a 2D vortex cylinder - Gamma=0.5 Vortilib - Flow about a 2D vortex cylinder - Gamma=1.1 Vortilib - Flow about an axisymmetric vorticity surface Vortilib - Flow about an Ellipsoid Vortilib - Inviscid Vorticity Patch
Vortilib - Rankine nose Vortilib - Vortex helix lifting line velocity Vortilib - Vortex particle regularization Vortilib - Vortex segment regularization
Vortilib - Rankine nose Vortilib - Vortex helix lifting line velocity Vortilib - Vortex particle regularization Vortilib - Vortex segment regularization

wt_theory: Analytical wind turbine solutions

Examples of applications:

  • Theory of optimal circulation

Sample figures from examples:

WT Theory - CP optimal WT Theory - CP optimal WT Theory - Induced velocity vs Wake length WT Theory - Wake Expansion Models
WT Theory - CP optimal WT Theory - CP optimal WT Theory - Induced velocity vs Wake length WT Theory - Wake Expansion Models

wind and welib/ws_estimator: wind generation and estimation

  • Generate stochastic wind times series
  • Estimate wind speed (see 'welib\ws_estimator`))

Sample figures from examples:

Wind - wind generation at point
Wind - wind generation at point

ctrl: control

kalman: kalman

  • Run a kalman filter to estimate states of a system (see kalman)

weio: Wind energy IO

  • Read and write common wind energy file formats (see weio, a clone of weio)
    Sample figures from examples:

yams: Yet Another Multibody Solver

Set of tools to work with structural dyanmics.
Examples of applications:

  • Setup the equation of motions for a multibody system with flexible members analytically or numerically (see yams)

Examples of application

You can have a look at the example gallery below for direct links to examples and associated plots.

  • Aerodynamic applications (package airfoils, BEM):

    • Manipulation of airfoil curves, find slopes, interpolate (see airfoils)
    • Run different dynamic stall models (e.g Oye or MHH/HGM model) (see airfoils/DS)
  • Hydrodynamics applications (package hydro):

    • Wave kinematics for linear waves (see hydro/Ex1)
    • Generation of wave time series from a given spectrum (see hydro/Ex3)
    • Computation of wave loads on a monopile (see hydro/Ex4)
  • Structural dynamics and system dynamics applications (packages FEM, system, yams):

    • Setup the equation of motions for a multibody system with flexible members analytically or numerically (see yams)
    • Linearize a non-linear system defined by a state and output equation (implicit or explicit) (see system)
    • Perform 2d/3d FEM analyses using beam/frame elements (see FEM)
    • Craig-Bampton / Guyan reduction of a structure (see FEM)
    • Perform time integration of mechanical systems (see system)
  • Controls applications (packages ctrl, kalman):

    • Run a kalman filter to estimate states of a system (see kalman)
  • Wind energy applications:

    • Run steady state BEM simulations (see BEM/steady 1-2
    • Run unsteady BEM simulations (see BEM/unsteady 1-2
    • Read and write common wind energy file formats (see weio, a clone of weio)
    • Generate stochastic wind and waves times series
    • Estimate wind speed (see 'welib\ws_estimator`))
    • Theory of optimal circulation
    • Standards
  • Other (packages tools, ode):

    • Spectral analyses, signal processing, time integration, vector analyses

See also:

  • pyDatView: GUI to visualize files (supported by weio) and perform analyses on the data

Libraries

The repository contains a set of small packages, for aerodynamics, structure, control and more:

  • airfoils: polar manipulations, dynamic stall models
  • beams: analytical results for beams
  • BEM: steady and unsteady bem code
  • ctrl: control tools
  • dyninflow: dynamic inflow models
  • fastlib: tools to handle OpenFAST models (run simulations, postprocess, linear model)
  • FEM: Finite Element Method tools (beams)
  • hydro: hydrodynamic tools
  • kalman: kalman filter
  • mesh: meshing tools
  • ode: tools for time integration of ODE
  • standards: some formulae and scripts useful for the IEC standards
  • system: tools for dynamic systems (e.g. LTI, state space) and mechanical systems (M,C,K matrices), eigenvalue analysis, time integration
  • tools: mathematical tools, signal processing
  • weio: library to read and write files used in wind energy, clone of weio
  • wt_theory: scripts implementing some wind turbine aerodynamic theory
  • ws_estimator: wind speed estimator for wind energy based on tabulated Cp Ct
  • yams: multibody analyses

References and how to cite

If you find some of this repository useful and use it in your research, thank you for using the following citations.

  • General wind turbine scripts and aerodynamics:
@book{Branlard:book,
    author = {E. Branlard},
    title = {Wind Turbine Aerodynamics and Vorticity-Based Methods: Fundamentals and Recent Applications},
    year = {2017},
    publisher= {Springer International Publishing},
    doi={10.1007/978-3-319-55164-7},
    isbn={ 978-3-319-55163-0}
}
  • Structural dynamics:
@article{Branlard:2019,
    title    = {{Flexible multibody dynamics using joint coordinates and the Rayleigh-Ritz approximation: The general framework behind and beyond Flex}},
    author   = {E. Branlard},
    journal  = {Wind Energy},
    volume   = {22},
    number   = {7},
    pages    = {877-893},
    year     = {2019},
    doi      = {10.1002/we.2327}
}

Contributing

Any contributions to this project are welcome! If you find this project useful, you can also buy me a coffee (donate a small amount) with the link below:


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 1 day ago

Total Commits: 626
Total Committers: 6
Avg Commits per committer: 104.333
Development Distribution Score (DDS): 0.045

Commits in past year: 45
Committers in past year: 2
Avg Commits per committer in past year: 22.5
Development Distribution Score (DDS) in past year: 0.022

Name Email Commits
Emmanuel Branlard e****d@n****v 598
Emmanuel Branlard e****.@g****m 20
Branlard e****r@n****v 5
SimonHH 3****H 1
Jeffrey Harris c****5@g****m 1
Veronica Liverud Krathe v****k@n****o 1

Committer domains:


Issue and Pull Request metadata

Last synced: 13 days ago

Total issues: 5
Total pull requests: 10
Average time to close issues: 7 days
Average time to close pull requests: 9 days
Total issue authors: 5
Total pull request authors: 4
Average comments per issue: 0.6
Average comments per pull request: 0.5
Merged pull request: 10
Bot issues: 0
Bot pull requests: 0

Past year issues: 2
Past year pull requests: 2
Past year average time to close issues: about 5 hours
Past year average time to close pull requests: 5 minutes
Past year issue authors: 2
Past year pull request authors: 1
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.0
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/ebranlard/welib

Top Issue Authors

  • s1291 (1)
  • stefano2734 (1)
  • Chiaraginko (1)
  • Antoine-HENRY-setec (1)
  • verlivkra (1)

Top Pull Request Authors

  • ebranlard (6)
  • jcharris (2)
  • verlivkra (1)
  • SimonHH (1)

Top Issue Labels

Top Pull Request Labels

  • bug (3)
  • enhancement (1)

Package metadata

proxy.golang.org: github.com/ebranlard/welib

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/ebranlard/welib#section-documentation
  • Licenses: mit
  • Latest release: v4.2.0+incompatible (published 15 days ago)
  • Last Synced: 2026-03-01T14:00:49.840Z (3 days ago)
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 5.401%
    • Average: 5.583%
    • Dependent repos count: 5.764%
pypi.org: welib

Wind Energy Library

  • Homepage: http://github.com/ebranlard/welib/
  • Documentation: https://welib.readthedocs.io/
  • Licenses: MIT
  • Latest release: 4.2.0 (published 15 days ago)
  • Last Synced: 2026-03-01T14:00:46.085Z (3 days ago)
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 432 Last month
  • Rankings:
    • Dependent packages count: 7.31%
    • Forks count: 7.395%
    • Stargazers count: 9.574%
    • Average: 20.72%
    • Dependent repos count: 22.088%
    • Downloads: 57.232%
  • Maintainers (1)

Dependencies

requirements.txt pypi
  • chardet *
  • future *
  • matplotlib *
  • numpy *
  • numpy >=1.16.5
  • pandas >=1.0.1
  • pandas *
  • scipy *
  • sympy *
  • xlrd *
setup.py pypi
  • chardet *
  • future *
  • matplotlib *
  • numpy *
  • pandas *
  • scipy *
  • sympy *
  • xlrd *
welib/tools/requirements.txt pypi
  • deap *
  • future *
  • matplotlib *
  • numpy *
  • pandas *
  • screeninfo *
.github/workflows/tests.yml actions
  • actions/checkout main composite
  • actions/setup-python v2 composite
welib/tools/external/setup.py pypi

Score: 12.565284369120876