Bug fix: revise verify_convergence to support multiple wind speeds #385
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.
Feature or improvement description
This feature fixes bug #383 where
verify_convergence
does not work if more than one wind speed is defined in FLORIS.Related issue, if one exists
Issue #383
Impacted areas of the software
Yaw optimization.
Additional supporting information
In the past, we would first locate which turbines have a nonzero yaw angle and at what wind directions and wind speeds. We would only check the wind farm's power production for those turbines and conditions with and without yaw misalignment. With the grid-style way FLORIS is calculated, it's not possible to isolate exactly which wind direction/speed combinations we need to evaluate without doing a one-by-one loop, which is slow. Hence, the current method is simplified and just evaluates all atmospheric conditions num_turbs times, and for each atmospheric condition set we reset one of the turbine's yaw angle to its baseline value and calculate the power production. This means we may do many more calculations than necessary, but it does keep things in gridded format.
Test results, if applicable
Running example
09_opt_yaw_multiple_ws.py
withverify_convergence=False
yields:In which we see nonzero yaw angles at high wind speeds of 15-17 m/s, due to numerical precision. These yaw angles just shift the
cp
value ever so slightly that the wind farm power is slightly higher. Withverify_convergence=True
, it yields:Though, I have seen that the computation time can increase by 10-20% using
verify_convergence=True
. Hence, it still defaults toFalse
and it's up to the user to decide whether one would like to include this functionality. Perhaps once the timeseries calculation functionality for FLORIS is implemented (#299) I can restructure this code to more efficiently evaluate a minimal set of conditions.