Phase 2 faithfulness: CrespoHernandez c, None rotor for WeightedSum, Zong eps_coeff#4
Merged
Merged
Conversation
…edSum, Zong eps_coeff Closes the Niayifar (2016) and Zong (2020) gaps vs py_wake.literature: - Fix C: CrespoHernandez honors a `c` coefficient array from the turbulence config; when given it builds CrespoHernandez(c=..., ct2a=ct2a_mom1d, addedTurbulenceSuperpositionModel=SqrMaxSum()) — the literature recipe. Without `c`, the PyWake default is unchanged. - Fix D: a "none" rotor-averaging option returns None, and the WeightedSum guard now accepts None (rotor centre, which PyWake allows) in addition to node models. Zong (2020) uses rotorAvgModel=None; forcing GridRotorAvg was a ~24% error. - ceps now maps to Zong's `eps_coeff` (PyWake's name for its near-wake epsilon), instead of being dropped. Verified against py_wake.literature: Niayifar2016 and Zong2020 now match to 0.000% per-turbine power. Adds unit tests for all three. 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 2 — closes the last two structural faithfulness gaps (Niayifar 2016, Zong 2020) vs
py_wake.literature.Fix C — CrespoHernandez calibration coefficients
_configure_turbulence_modelhonors acarray (new windIOturbulence_model.cfield). When given, it buildsCrespoHernandez(c=..., ct2a=ct2a_mom1d, addedTurbulenceSuperpositionModel=SqrMaxSum())— the literature recipe. Withoutc, the PyWake default is unchanged. (PyWake's defaultc[2]even has the opposite sign to the papers' calibration.)Fix D —
nonerotor averaging for WeightedSum_configure_rotor_averagingadds"none"→None.None(rotor centre, which PyWake allows) in addition to node models. Zong (2020) usesrotorAvgModel=None; WIFA forcingGridRotorAvgwas a ~24% error. An explicitcenteris still rejected (PyWake asserts).Zong
eps_coeffcepsnow maps to Zong'seps_coeff(PyWake's name for its near-wake epsilon, default 0.3535 vs the paper's 0.35), instead of being dropped.Verification
Behavioral check against
py_wake.literature: Niayifar2016 and Zong2020 now match to 0.000% per-turbine power.tests/test_pywake_submodels.py+tests/test_pywake.py: 217 passed (+6 new). Depends on bjarketol/windIOflow-model-chain(thec/noneschema fields, already merged).🤖 Generated with Claude Code