-
Notifications
You must be signed in to change notification settings - Fork 10
Description
References: #86
Description
There may be a bug in the WindUpConfig option:
WindUpConfig.gapfill_uplift_curve_using_site_mean_power_curve = TrueWhen test and reference turbines are of different turbine types, the reversal analysis may produce incorrect results. Because the site mean power curve is computed across turbine types, using it to gap-fill the uplift curve may introduce errors when the power curves of the test and reference turbines are not comparable.
Steps to Reproduce
Although not trialled, this scenario should be able to be created by:
- Configure a
WindUpConfigwithgapfill_uplift_curve_using_site_mean_power_curve = True - Set up an analysis where the test and reference turbines are of different turbine types with different power curves
- Run the reversal analysis
- Observe that the gap-filled uplift curve may be based on an inappropriate site mean power curve for the turbine type
Expected Behaviour
The gap-filling logic should account for mixed turbine types, either by computing separate mean power curves per turbine type, or by raising a warning/error when turbine types differ between test and reference turbines.
Actual Behaviour
The site mean power curve is applied without checking whether the test and reference turbines share the same turbine type, potentially resulting in a silently incorrect uplift curve.
Potential Fix
- Check whether test and reference turbines share the same turbine type before applying gap-fill with the site mean power curve.
- If types differ, either:
- Compute a type-specific mean power curve for gap-filling, or
- Raise a
ValueErroror warning to alert the user.