Skip to content
 
 

Repository files navigation

wcomp - A framework for comparing steady-state wind turbine wake modeling software

wcomp is a Python-based framework for comparing the wind turbine and wind farm wake calculations from a class of simulation software that typically have the following characteristics:

  • Python-based
  • Low-fidelity, analytical models
  • Research oriented

The objective is to provide a framework for characterizing the spread in implementations and customizations of a common set of mathematical wake models.

This framework and simple use cases were presented at the 2023 Wind Energy Sciences Conference in Glasgow, Scotland, by Rafael Mudafort. The slides from this talk are available at here, and a corresponding executable notebook is here. Documentation for wcomp is available at https://rafmudaf.github.io/wcomp/.

DOI: 10.11578/dc.20231113.4

Publications

Installation

Currently, wcomp must be installed manually pip. The dependencies are:

  • windIO v2, can be installed directly from PyPI
  • FLORIS v4.6.4, can be installed directly from PyPI
  • foxes v1.6.2, can be installed directly from PyPI
  • PyWake v2.5.0 plus three additional commits, must be installed from https://github.com/rafmudaf/PyWake at master branch

Follow these steps to install the dependencies and wcomp:

  1. Create a new Python environment
  2. Install the dependencies:
pip install windIO
pip install foxes==1.6.2
git clone https://github.com/natlabrockies/floris -b main && pip install -e floris/
git clone https://github.com/rafmudaf/PyWake && pip install -e PyWake/
  1. Install wcomp:
git clone https://github.com/rafmudaf/wcomp
pip install -e wcomp

Wake model comparison website

The comparison website (https://rafmudaf.github.io/wcomp/) is generated from a versioned dataset of solver outputs, decoupled from the site build itself.

  1. Generate the dataset (requires wcomp installed per Installation above):

    python -m wcomp.dataset

    This writes JSON results for every wake-model/scenario combination to dataset/ at the repo root, which is committed to version control as the site's source of truth.

  2. Run the site locally (requires Node.js 20+):

    npm install --prefix site
    npm run dev --prefix site

    This copies dataset/ into site/public/dataset/ and starts the Astro dev server.

  3. Build the production site (the same command CI runs):

    npm run build --prefix site

    Output is written to site/dist/. .github/workflows/deploy-pages.yaml builds and deploys this automatically on push to main -- it has no Python/solver dependencies, since the dataset is generated locally and committed rather than regenerated in CI.

Architecture and Design

The wcomp framework is meant to be simple and flexible. At it's core, it is three district components:

  1. A connection to the windIO interface for each integrated wake modeling software
  2. A library of data structures to represent the results of a wake calculation
  3. A library of plotting methods that couple with the included data structures

Any methods related to wind farm simulations or the calculation of related values or statistics should exist in the wake modeling software packages themselves. This framework should remain the point of the connection across this class of software.

The architecture of this framework is outlined below. The integrated wake modeling software are dependencies of wcomp, but their source code is external to this repository. The windIO package is used both to define the comparison cases and to load the input files.

graph TD
    L["FLORIS"]
    M["FOXES"]
    N["PyWake"]

    A["windIO"]
    subgraph a[wcomp]
        B["Model Interface"]
        C["Output Data Structure"]
        D["Plotting"]
    end

    L --> a
    M --> a
    N --> a
    A --> B
    C --> B
Loading

See the Architecture and API documentation for more information.

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages