Skip to content

Expand PyWake submodel support with case-insensitive lookup#53

Draft
bjarketol wants to merge 3 commits into
EUFLOW:mainfrom
bjarketol:expand-pywake-submodel-support
Draft

Expand PyWake submodel support with case-insensitive lookup#53
bjarketol wants to merge 3 commits into
EUFLOW:mainfrom
bjarketol:expand-pywake-submodel-support

Conversation

@bjarketol
Copy link
Copy Markdown
Contributor

Summary

  • Add _normalize_name() for case-insensitive model name matching across all 6 submodel categories
  • Expand deficit models: Niayifar2016, Zong2020, Carbajofuertes2018, TurboNOJ, GCL, SuperGaussian2023 with model-specific kwargs routing
  • Expand deflection (GCLHill), turbulence (GCL, IEC-TI-2019), superposition (Max, Weighted, Cumulative), rotor averaging (EqGrid, GQGrid, PolarGrid, CGI), and blockage models (SelfSimilarityDeficit, RankineHalfBody, Rathmann, VortexCylinder, VortexDipole, HybridInduction)
  • Fix get_with_default() to preserve extra user keys with recursive merge
  • Guard None names in deflection/turbulence to prevent AttributeError
  • Warn when scalar k is provided for a=[k_a, k_b] models
  • Replace debug print() calls with warnings.warn()
  • Simplify config functions with dict-based lookups, remove dead code and unused imports

Closes #52

Test plan

  • 130 parametrized unit tests in test_pywake_submodels.py covering all model mappings, case-insensitive matching, parameter passthrough, model instantiation, and error cases
  • 10 existing integration tests in test_pywake.py pass with no regressions
  • All 140 tests pass

🤖 Generated with Claude Code

@bjarketol bjarketol force-pushed the expand-pywake-submodel-support branch from a1be602 to 32e7a1c Compare March 2, 2026 20:34
@bjarketol bjarketol marked this pull request as draft March 2, 2026 20:45
@bjarketol bjarketol force-pushed the expand-pywake-submodel-support branch 3 times, most recently from e27dd02 to d2f074c Compare March 13, 2026 11:36
@bjarketol bjarketol force-pushed the expand-pywake-submodel-support branch from ae243ea to 1457d07 Compare March 27, 2026 08:27
bjarketol and others added 2 commits June 4, 2026 12:58
… deps, and NOJLocalDeficit alias

- Make all wrapped tools (floris, pywake, wayve, foxes) optional dependencies
- Add case-insensitive submodel name lookup across deficit, deflection, turbulence,
  superposition, rotor averaging, and blockage models
- Add NOJLocalDeficit as a deficit model name alias alongside Jensen
- Fix CI: skip floris on Python <3.10, fix numpy 2.x compat in wayve
- Add comprehensive parametrized tests for all submodel configuration functions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bjarketol bjarketol force-pushed the expand-pywake-submodel-support branch from 530e6b3 to 1c4b2c7 Compare June 4, 2026 11:10
…uards

Follow windIO's analysis-schema changes (engine-neutral rotor averaging,
single TI flag) on the pyWake path.

- TI reference: read the nested wake_expansion_coefficient.free_stream_ti
  (foxes-compatible) and set use_effective_ti = not free_stream_ti. Lift the
  handling out of the GAUSSIAN_MODELS branch into a TI_CAPABLE set so it also
  covers SuperGaussian/SuperGaussian2023 and TurbOPark (previously ignored).
  The removed top-level use_effective_ti key is no longer read.
- rotor_averaging: add the new windIO names grid -> GridRotorAvg,
  gaussian_overlap -> GaussianOverlapAvgModel, area_overlap ->
  AreaOverlapAvgModel; keep avg_deficit as a deprecated alias.
- Guard: WeightedSum/CumulativeWakeSum with a non-node rotor-averaging model
  now raises a clear ValueError instead of PyWake's deep AssertionError.
- Vector superposition (foxes-only) raises an explicit NotImplementedError.
- Tests: free_stream_ti polarity across all TI-capable deficits + exclusions,
  the three rotor-averaging names, the Weighted/Cumulative node guard, and
  Vector rejection; update prior tests off the removed use_effective_ti key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Expand PyWake submodel support with case-insensitive lookup and tests

1 participant