Skip to content

Honor axial_induction_model + TurbOPark literature recipe (faithfulness)#3

Merged
bjarketol merged 2 commits into
flow-model-chainfrom
pywake-faithful-phase1
Jun 8, 2026
Merged

Honor axial_induction_model + TurbOPark literature recipe (faithfulness)#3
bjarketol merged 2 commits into
flow-model-chainfrom
pywake-faithful-phase1

Conversation

@bjarketol

Copy link
Copy Markdown
Owner

Phase 1 of closing the pyWake literature-faithfulness gaps (flow_model_chain experiment matrix vs py_wake.literature).

Fix A — honor axial_induction_modelct2a

_configure_deficit_model maps analysis.axial_induction_model to PyWake's ct2a (1D → ct2a_mom1d, Madsen → ct2a_madsen) and sets it on every deficit that accepts a ct2a parameter (Blondel2020 doesn't, and is skipped). Previously the field was ignored, so every deficit kept its ct2a_madsen default and a "1D" request was silently dropped. Always-on correctness fix.

→ closes Bastankhah2014 vs Bastankhah_PorteAgel_2014 (was 4.1% → 0.000%).

Fix B — TurbOPark canonical recipe

TurbOPark now matches Nygaard_2022: Mirror(SquaredSum()) ground model and ctlim=0.96 (constructor args), plus WS_key='WS_jlk' set post-construction. run_simulation takes groundModel from deficit_args instead of hardcoding None, and applies a new deficit_post_attrs.

→ closes TurbOPark vs Nygaard_2022 (was 131% → 0.000%).

API

_configure_deficit_model now returns (class, args, post_attrs); configure_wake_model exposes deficit_post_attrs. New unit tests cover both fixes.

Verification

tests/test_pywake_submodels.py + tests/test_pywake.py: 211 passed. Behavioral check against py_wake.literature: Bastankhah2014 and TurbOPark match to 0.000% per-turbine power.

Note for the consumer: the flow_model_chain pywake_jensen1983 experiment specifies axial_induction="1D" but Jensen_1983 uses 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

bjarketol and others added 2 commits June 8, 2026 21:12
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>
@bjarketol bjarketol merged commit b78411e into flow-model-chain Jun 8, 2026
4 checks passed
@bjarketol bjarketol deleted the pywake-faithful-phase1 branch June 8, 2026 19:17
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.

1 participant