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
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:
- Create a new Python environment
- 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/- Install
wcomp:
git clone https://github.com/rafmudaf/wcomp
pip install -e wcompThe comparison website (https://rafmudaf.github.io/wcomp/) is generated from a versioned dataset of solver outputs, decoupled from the site build itself.
-
Generate the dataset (requires
wcompinstalled per Installation above):Dataset component Command Output Full wake-model/scenario dataset python -m wcomp.datasetdataset/<alignment>/cases/anddataset/manifest.jsonRotor-averaging comparison dataset python -m wcomp.rotor_average --write-datasetdataset/<alignment>/rotor_average.jsonTurbine-performance comparison dataset python -m wcomp.turbine_performancedataset/<alignment>/turbine_performance.jsonThe 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'swind_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'swind_energy_system_aligned.yaml. This view is shown under/aligned/.
The aligned files add
attributes.analyses.superpositionandattributes.analyses.rotor_averagingto the default file, and nothing else. Keys that a case file omits fall back to each solver's legacy behaviour;wcomp/analysis_settings.pyis the single place that maps the keys to FLORIS, FOXES, and PyWake settings and reports any setting a solver cannot honour. Add--alignment defaultor--alignment alignedto any of the commands above to generate one alignment only (the default isall).The aligned settings need a FLORIS that reads
power_average_methodandthrust_average_methodfrom thesolverblock (branchconfigurable-rotor-averaging), and a windIO whose plant schema describesattributes.analyses(branchanalyses-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.astroandsite/src/components/TurbinePerformancePage.astro, respectively. -
Run the site locally (requires Node.js 20+):
npm install --prefix site npm run dev --prefix site
This copies
dataset/intosite/public/dataset/and starts the Astro dev server. -
Build the production site (the same command CI runs):
npm run build --prefix site
Output is written to
site/dist/..github/workflows/deploy-pages.yamlbuilds and deploys this automatically on push tomain-- it has no Python/solver dependencies, since the dataset is generated locally and committed rather than regenerated in CI.
The wcomp framework is meant to be simple and flexible. At it's core, it is three
district components:
- A connection to the windIO interface for each integrated wake modeling software
- A library of data structures to represent the results of a wake calculation
- 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
See the Architecture and API documentation for more information.