Skip to content
rafmudafPublic

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

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):

    Dataset component Command Output
    Full wake-model/scenario dataset python -m wcomp.dataset dataset/<alignment>/cases/ and dataset/manifest.json
    Rotor-averaging comparison dataset python -m wcomp.rotor_average --write-dataset dataset/<alignment>/rotor_average.json
    Turbine-performance comparison dataset python -m wcomp.turbine_performance dataset/<alignment>/turbine_performance.json

    The full dataset 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.

    Every component is generated for two solver configurations ("alignments"):

    • default: each solver runs with its own legacy settings, configured by each case's wind_energy_system.yaml. This view is shown at the site root.
    • aligned: the settings that can be matched across the packages are matched (freestream deficit reference speed, linear rotor averaging, nine-point cubature for FLORIS and PyWake), configured by each case's wind_energy_system_aligned.yaml. This view is shown under /aligned/.

    The aligned files add attributes.analyses.superposition and attributes.analyses.rotor_averaging to the default file, and nothing else. Keys that a case file omits fall back to each solver's legacy behaviour; wcomp/analysis_settings.py is the single place that maps the keys to FLORIS, FOXES, and PyWake settings and reports any setting a solver cannot honour. Add --alignment default or --alignment aligned to any of the commands above to generate one alignment only (the default is all).

    The aligned settings need a FLORIS that reads power_average_method and thrust_average_method from the solver block (branch configurable-rotor-averaging), and a windIO whose plant schema describes attributes.analyses (branch analyses-block). Install both from those branches (editable installs of the local checkouts work); the default alignment runs on upstream releases.

    To regenerate only a subset of the full wake model dataset, pass one or more selectors like a software name or wake-model name. Software selectors match any listed software, wake-model selectors match any listed wake model, and mixing the two narrows the output to cases that satisfy both. When downselecting, the manifest keeps previously listed cases and merges in any regenerated cases:

    python -m wcomp.dataset floris
    python -m wcomp.dataset jensen --alignment aligned
    python -m wcomp.dataset floris foxes turbopark

    The rotor-averaging and turbine-performance commands write the comparison datasets consumed by site/src/components/RotorAveragingPage.astro and site/src/components/TurbinePerformancePage.astro, respectively.

  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.

WComp 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