PLUME-66: Export CSV file with power output per wind turbine#5
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5 +/- ##
===========================================
+ Coverage 85.53% 90.98% +5.44%
===========================================
Files 28 28
Lines 726 832 +106
Branches 60 75 +15
===========================================
+ Hits 621 757 +136
+ Misses 105 75 -30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an optional CSV export of per-wind-turbine power output and extends the wind farm model API to provide per-turbine power values, updating the plugin, utilities, and tests accordingly.
Changes:
- Add
export_wind_turbine_powerconfiguration option and document it. - Extend wind-farm model interface with per-turbine power computation and implement it in Jensen/NoWake models.
- Add CSV export utility + update plugin runtime logic and tests (including an emulator-driven test).
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_wind_farm.cc |
Adds assertions for per-turbine power output consistency with total power. |
tests/data/test-plume-config.yml.in |
Enables per-turbine export in test config and sets wind_field_height. |
tests/data/emulator-config.yml |
Adds new emulator config used by the new integration-style test. |
tests/data/CMakeLists.txt |
Adjusts test config generation (minor formatting). |
tests/CMakeLists.txt |
Adds a new test invoking the emulator runner. |
src/wind_farm.h |
Adds computePowerPerTurbine() API declaration and docs. |
src/wind_farm.cc |
Implements computePowerPerTurbine() delegating to the model. |
src/wfp_models/wfp_model.h |
Extends model interface with computePowerByTurbine(). |
src/wfp_models/no_wake.h |
Declares computePowerByTurbine() override. |
src/wfp_models/no_wake.cc |
Implements per-turbine power computation + refactors total power to sum per-turbine results. |
src/wfp_models/jensen.h |
Declares computePowerByTurbine() override. |
src/wfp_models/jensen.cc |
Implements per-turbine power computation + refactors total power to sum per-turbine results. |
src/utils.h |
Declares exportWindTurbinePowers() utility. |
src/utils.cc |
Implements per-turbine power CSV export helper. |
src/point.h |
Introduces LatLonValue (lat/lon point with an associated scalar value). |
src/plugin.h |
Adds filename helper + flags and prefix for per-turbine export. |
src/plugin.cc |
Adds config flags, computes per-turbine powers, exports CSV, refactors filename building. |
config/plume-config.yml.in |
Adds export_wind_turbine_power example option. |
config/README.md |
Documents export_wind_turbine_power in the configuration table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cducher
requested changes
Apr 30, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
cducher
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces a new feature to export per-turbine wind power output to CSV files, alongside several related refactorings.
Export of per-turbine power output:
export_wind_turbine_power(defaultfalse) in both the documentation (config/README.md) and the example config (config/plume-config.yml.in) to control exporting per-turbine power output. [1] [2]WindFarmPluginCoreto compute, aggregate, and export per-turbine power values to CSV files when the option is enabled, including filename handling and output format. [1] [2] [3] [4] [5] [6]Data structure and API extensions:
LatLonValueclass (insrc/point.h) to represent a lat/lon point with an associated value, used for per-turbine power output.WFPModeland its implementationsJensenModelandNoWake) to provide acomputePowerByTurbinemethod returning per-turbine power values. [1] [2] [3] [4] [5] [6] [7]computePowerPerTurbineto theWindFarmclass to expose the new API. [1] [2]Refactoring and cleanup:
Testing:
Contributor Declaration
By opening this pull request, I affirm the following: