Python Wind Farm Analysis — Core Concepts

Why wind farm analysis matters

Wind energy supplied 7.8% of global electricity in 2023, and capacity is growing at 15% annually. A typical offshore wind farm costs $3–5 billion. Getting the layout wrong by even a few percent in annual energy production (AEP) means hundreds of millions in lost revenue over the project’s 25-year life. Python has become the standard analytical tool for wind engineers because it handles the full chain from raw meteorological data to financial modeling.

The analysis pipeline

Wind farm analysis follows a structured sequence:

  1. Wind resource assessment — Measure wind speed and direction at the site over 1–3 years using met masts or LiDAR.
  2. Long-term correlation — Adjust short measurement campaigns to represent typical long-term conditions using nearby reference stations (MCP — Measure-Correlate-Predict).
  3. Wind flow modeling — Extrapolate point measurements across the site accounting for terrain, roughness, and obstacles.
  4. Energy yield estimation — Combine wind resource with turbine power curves to estimate annual production.
  5. Wake modeling — Calculate how upstream turbines reduce wind speed for downstream ones.
  6. Layout optimization — Adjust turbine positions to maximize AEP while respecting setback and spacing constraints.

Key Python libraries

LibraryPurpose
windroseWind rose diagrams and frequency analysis
PyWake (DTU)Wake modeling and AEP calculation
FLORIS (NREL)Wake modeling with optimization for layout and yaw control
windpowerlibTurbine power curve modeling and feed-in estimation
brightwindWind resource assessment and MCP workflows
xarrayMulti-dimensional wind data (height, time, direction)
scipy.statsWeibull distribution fitting for wind speed

Wind resource characterization

Wind speed at a site is typically described by the Weibull distribution, characterized by a shape parameter (k) and scale parameter (A). Most sites have k between 1.5 and 3.0 — lower k means more variable wind.

The wind rose shows directional frequency and speed. It’s the first thing any wind engineer looks at. In Python, the windrose library generates these from time-series data in a few lines.

A critical concept: wind power scales with the cube of wind speed. Doubling wind speed means 8× the power. This is why small differences in average wind speed translate to large differences in energy production, and why accurate resource assessment is worth the investment.

Wake effects

When wind flows through a turbine rotor, it extracts energy and creates a wake — a region of reduced speed and increased turbulence. The Jensen (top-hat) model is the simplest: it assumes the wake expands linearly with distance and has uniform velocity deficit across its width. More sophisticated models (Bastankhah-Porté-Agel, Gauss) capture the realistic Gaussian velocity profile.

In a typical onshore wind farm, wake losses reduce total production by 5–15%. Offshore farms with prevailing wind directions can see 15–25% wake losses in tightly spaced arrays. This is why layout optimization matters so much.

Layout optimization

The goal: place N turbines on a site boundary to maximize AEP minus wake losses, subject to constraints (minimum spacing, setbacks from roads/property lines, environmental exclusion zones).

This is a non-convex optimization problem. Common approaches:

  • Genetic algorithms — Evolve a population of layouts, selecting the fittest.
  • Gradient-based optimization — FLORIS supports automatic differentiation through its wake models, enabling fast gradient descent.
  • Sequential placement — Add turbines one at a time to the highest-energy position, quick but suboptimal.

NREL’s FLORIS library is particularly powerful because it differentiates through wake models, making gradient-based optimization feasible for farms with hundreds of turbines.

A common misconception

People often think bigger turbines are always better. In reality, larger rotors have larger wakes, and in constrained sites, using smaller turbines with tighter spacing can produce more total energy. The optimal turbine size depends on site area, wind resource, and spacing constraints — it’s a system-level optimization, not a per-turbine decision.

Real-world application

Ørsted, the world’s largest offshore wind developer, uses Python-based analytical workflows throughout their development process. Their engineers combine CFD (Computational Fluid Dynamics) results with Python post-processing to validate simpler engineering wake models. Open-source tools like PyWake and FLORIS are used by consultancies and researchers to replicate and verify results independently.

One thing to remember: Wind farm analysis is fundamentally about wake management — the interaction between turbines matters more than individual turbine performance, and Python’s optimization libraries make exploring thousands of layout configurations practical.

pythonwind-energydata-sciencesustainability

See Also