Skip to content

Clarify print to screen and fix seed averaging - #477

Merged
dzalkind merged 2 commits into
NLRWindSystems:developfrom
dzalkind:aep_print
Sep 18, 2026
Merged

dzalkind merged 2 commits into
NLRWindSystems:developfrom
dzalkind:aep_print

Conversation

@dzalkind

Copy link
Copy Markdown
Collaborator

Purpose

Make the reported AEP trustworthy, or absent, instead of quietly wrong.

WEIS only reconstructs a meaningful AEP from OpenFAST when the AEP DLC is set up over a range of wind speeds. The previous gate (n_ws_aep > 0) also accepted a plain DLC 1.1 run, even at a single wind speed, so aeroelastic.AEP was computed from a degenerate probability weighting and then fed to both the screen output and financese_post. Users running a single wind speed saw an AEP that could be confusing.

  • Add a derived DLC_driver -> use_openfast_aep flag in gc_LoadInputs: true only when the AEP DLC is present and covers more than one wind speed. The AEP DLC is the opt-in; no new user-facing option.
  • glue_code connects aeroelastic.AEP to financese_post.turbine_aep and the screen output only under that flag, otherwise rotorse.rp.AEP (WISDEM), which is the more correct value in nearly all setups.
  • Do not write outputs['AEP'] at a single wind speed; warn instead. The power curve channels (V, P, Cp, Ct, Omega, pitch, Thrust) are unaffected and still reported.
  • Outputs_2_Screen skips the AEP / Blade Mass / LCOE / Tip Defl. lines when the input is unconnected (previously, from_openfast runs left all four at their 0.0 default and printed 0.0000000000).
  • Remove a dead branch in get_AEP: idx_pwrcrv and n_ws_aep come from the same DLC-label filter, so len(idx_pwrcrv) == 0 could never be reached under n_ws_aep > 0.
  • Fix seed averaging in avg_seeds, which summed only the first two seeds of each group while dividing by n_seeds_AEP. Correct at 2 seeds, biased low and dropping data for 3+. Now vec.reshape(-1, n_seeds_AEP).mean(axis=1).

Note for reviewers: LCOE will change for setups that run DLC 1.1 without an AEP DLC, since financese_post now takes WISDEM's AEP. Power curve outputs with 3+ turbulent seeds will also change, as they were previously mis-averaged.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

  • pytest weis/dlc_driver/test/test_DLC_generator.py passes
  • Built the OpenMDAO model through final_setup() and queried get_source for outputs_2_screen_weis.aep and financese_post.turbine_aep across seven DLC setups. With a
    • WISDEM-built model (examples/03_design_with_openfast): AEP DLC over 2 wind speeds routes to aeroelastic.AEP; AEP DLC at 1 wind speed, DLC 1.1 at 2 and at 1 wind speed, and a DLC 1.3-only run all route to rotorse.rp.AEP.
    • With from_openfast: True (examples/05_control_optimization): DLC 1.1 leaves the screen AEP unconnected so the line is skipped, while an AEP DLC over 2 wind speeds still routes to aeroelastic.AEP.
  • Seed averaging verified separately on a 3-seed run, and screen-output suppression verified on a from_openfast run.

Checklist

  • I have run existing tests which pass locally with my changes (targeted: DLC generator test plus the model-build checks above; full suite not run)
  • I have added new tests or examples that prove my fix is effective or that my feature works
  • I have added necessary documentation

@dzalkind
dzalkind merged commit b5351ea into NLRWindSystems:develop Sep 18, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants