Summary
WIFA's PyWake adapter (wifa/pywake_api.py) currently supports only a small subset of the models available in PyWake. This expands all 6 submodel categories to cover the practical PyWake models, adds case-insensitive name matching, and adds parametrized unit tests.
Changes
New _normalize_name() helper
Case-insensitive model name matching — strips whitespace, lowercases, removes - and _. Handles windIO naming inconsistencies (e.g. TurbOPark vs TurboPark).
Expanded submodels
| Category |
Before |
After |
New models |
| Deficit |
5 |
11 |
Niayifar2016, Zong2020, Carbajofuertes2018, TurboNOJ, GCL, SuperGaussian2023 |
| Deflection |
2 |
3 |
GCLHill |
| Turbulence |
4 |
6 |
GCL, IEC-TI-2019 |
| Superposition |
2 |
5 |
Max, Weighted, Cumulative |
| Rotor averaging |
2 |
6 |
EqGrid, GQGrid, PolarGrid, CGI |
| Blockage |
3 |
9 |
SelfSimilarityDeficit, RankineHalfBody, Rathmann, VortexCylinder, VortexDipole, HybridInduction |
Other improvements
- Removed 9 debug
print() statements, replaced default warnings with warnings.warn()
Bastankhah2016 raises NotImplementedError with helpful message pointing to foxes or alternatives
Product superposition raises NotImplementedError (not available in PyWake)
Tests
- New
tests/test_pywake_submodels.py: 104 parametrized unit tests covering all configure functions
- All 10 existing integration tests pass (no regressions)
Summary
WIFA's PyWake adapter (
wifa/pywake_api.py) currently supports only a small subset of the models available in PyWake. This expands all 6 submodel categories to cover the practical PyWake models, adds case-insensitive name matching, and adds parametrized unit tests.Changes
New
_normalize_name()helperCase-insensitive model name matching — strips whitespace, lowercases, removes
-and_. Handles windIO naming inconsistencies (e.g.TurbOParkvsTurboPark).Expanded submodels
Other improvements
print()statements, replaced default warnings withwarnings.warn()Bastankhah2016raisesNotImplementedErrorwith helpful message pointing to foxes or alternativesProductsuperposition raisesNotImplementedError(not available in PyWake)Tests
tests/test_pywake_submodels.py: 104 parametrized unit tests covering all configure functions