Repository navigation
Clarify print to screen and fix seed averaging - #477
Merged
Merged
Conversation
ptrbortolotti
approved these changes
Sep 11, 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.
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, soaeroelastic.AEPwas computed from a degenerate probability weighting and then fed to both the screen output andfinancese_post. Users running a single wind speed saw an AEP that could be confusing.DLC_driver -> use_openfast_aepflag ingc_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_codeconnectsaeroelastic.AEPtofinancese_post.turbine_aepand the screen output only under that flag, otherwiserotorse.rp.AEP(WISDEM), which is the more correct value in nearly all setups.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_Screenskips the AEP / Blade Mass / LCOE / Tip Defl. lines when the input is unconnected (previously,from_openfastruns left all four at their0.0default and printed0.0000000000).get_AEP:idx_pwrcrvandn_ws_aepcome from the same DLC-label filter, solen(idx_pwrcrv) == 0could never be reached undern_ws_aep > 0.avg_seeds, which summed only the first two seeds of each group while dividing byn_seeds_AEP. Correct at 2 seeds, biased low and dropping data for 3+. Nowvec.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_postnow takes WISDEM's AEP. Power curve outputs with 3+ turbulent seeds will also change, as they were previously mis-averaged.Type of change
Testing
pytest weis/dlc_driver/test/test_DLC_generator.pypassesfinal_setup()and queriedget_sourceforoutputs_2_screen_weis.aepandfinancese_post.turbine_aepacross seven DLC setups. With aexamples/03_design_with_openfast): AEP DLC over 2 wind speeds routes toaeroelastic.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 torotorse.rp.AEP.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 toaeroelastic.AEP.from_openfastrun.Checklist