Honor axial_induction_model + TurbOPark literature recipe (faithfulness)#3
Merged
Merged
Conversation
Two faithfulness fixes on the pyWake path so the configured models reproduce py_wake.literature exactly: - Fix A: map analysis.axial_induction_model to ct2a (1D -> ct2a_mom1d, Madsen -> ct2a_madsen) and set it on every deficit that accepts a ct2a parameter. Previously the field was ignored and every deficit kept its ct2a_madsen default, so a "1D" request was silently dropped. Closes the Bastankhah2014 gap vs Bastankhah_PorteAgel_2014. - Fix B: build TurbOPark with the canonical Nygaard (2022) recipe — a Mirror ground model and ctlim=0.96 (constructor args) plus WS_key='WS_jlk' (set post-construction). run_simulation now takes groundModel from deficit_args instead of hardcoding None, and applies deficit_post_attrs. Closes the TurbOPark gap vs Nygaard_2022. _configure_deficit_model now returns (class, args, post_attrs); configure_wake_model exposes deficit_post_attrs. Adds unit tests for both fixes. Verified against py_wake.literature: Bastankhah2014 and TurbOPark now match to 0.000% per-turbine power. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The flow-model-chain branch carried three test files (mem_bench.py, test_memory.py, test_pywake.py) that predate the pinned pre-commit hooks and failed the black/isort CI check. Reformat them with the repo-pinned versions so the pipeline is green; no logic changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Phase 1 of closing the pyWake literature-faithfulness gaps (flow_model_chain experiment matrix vs
py_wake.literature).Fix A — honor
axial_induction_model→ct2a_configure_deficit_modelmapsanalysis.axial_induction_modelto PyWake'sct2a(1D → ct2a_mom1d,Madsen → ct2a_madsen) and sets it on every deficit that accepts act2aparameter (Blondel2020 doesn't, and is skipped). Previously the field was ignored, so every deficit kept itsct2a_madsendefault and a"1D"request was silently dropped. Always-on correctness fix.→ closes
Bastankhah2014vsBastankhah_PorteAgel_2014(was 4.1% → 0.000%).Fix B — TurbOPark canonical recipe
TurbOPark now matches
Nygaard_2022:Mirror(SquaredSum())ground model andctlim=0.96(constructor args), plusWS_key='WS_jlk'set post-construction.run_simulationtakesgroundModelfromdeficit_argsinstead of hardcodingNone, and applies a newdeficit_post_attrs.→ closes
TurbOParkvsNygaard_2022(was 131% → 0.000%).API
_configure_deficit_modelnow returns(class, args, post_attrs);configure_wake_modelexposesdeficit_post_attrs. New unit tests cover both fixes.Verification
tests/test_pywake_submodels.py+tests/test_pywake.py: 211 passed. Behavioral check againstpy_wake.literature: Bastankhah2014 and TurbOPark match to 0.000% per-turbine power.Note for the consumer: the flow_model_chain
pywake_jensen1983experiment specifiesaxial_induction="1D"butJensen_1983uses Madsen — once this lands, that experiment must flip to"Madsen"to stay faithful (handled in the flow_model_chain follow-up).🤖 Generated with Claude Code