-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update yaw and layout optimization tools for 4D #790
Conversation
e319ea3
to
912e480
Compare
floris/tools/optimization/yaw_optimization/yaw_optimization_base.py
Outdated
Show resolved
Hide resolved
floris/tools/optimization/yaw_optimization/yaw_optimization_base.py
Outdated
Show resolved
Hide resolved
floris/tools/optimization/yaw_optimization/yaw_optimizer_scipy.py
Outdated
Show resolved
Hide resolved
This looks great @bayc ! I just left a few small comments for your considerations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this @bayc. I left a few comments, but one other comment throughout is that in addition to introducing the wind speed array to a lot of the optimization function calls, does the TI array also need to be added? (for example in fi.reinitialize
and self._calculate_farm_power
) I think so because self.fi.floris.flow_field.turbulence_intensities
is now defined as an array with the same length as the wind direction and wind speed arrays.
floris/tools/optimization/yaw_optimization/yaw_optimization_base.py
Outdated
Show resolved
Hide resolved
floris/tools/optimization/yaw_optimization/yaw_optimization_base.py
Outdated
Show resolved
Hide resolved
Good call @ejsimley , I have updated throughout where I believe the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing my comments @bayc , approve!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked through the changes and pulled down and run the examples---all looks good to me. Thanks @bayc!
floris/tools/optimization/yaw_optimization/yaw_optimization_base.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bayc, the changes to add the turbulence intensity array inputs look good. I just found a couple places in parallel_computing_interface where I think they're needed as well.
… into update_opt_tools_to_4d
Update yaw and layout optimization tools and examples to new 4D format.
This PR makes the changes necessary for the yaw and layout optimization capabilities in FLORIS to support the new 4D wind condition format. It updates both the necessary tools and the related examples. It mainly focuses on eliminating the now extra dimension and introducing a wind speed array and a turbulence intensity array where necessary. It also removes the layout symmetry functionality as it would not work well with the new timeseries focus of the inputs.
Related issue
None
Impacted areas of the software
floris/tools/opitmization
examples
Additional supporting information
These changes were evaluated compared to the execution and results of the same examples in the v3 develop branch (a88a154). Note that for the examples to produce the exact same results, the older turbine performance data needed to be used with the new turbine definition file format (specifically, this version of the NREL 5MW was used: https://github.com/NREL/floris/blob/8e6fb6b54c1a7824d801499cf90037dd4bb59fb4/floris/turbine_library/nrel_5MW_v4converted.yaml).
Note that with the new support for time series as input, certain features were excluded from this update, specifically
exploit_layout_symmetry
. The related code was removed.Also,
verify_convergence
is currently broken and needs to be updated. I noticed results that would eliminate yaw angles under certain conditions (e.g. a full wind rose) and not under other (e.g. a couple wind directions with one wind speed). I believe this could be due to some normalization that is happening, but I have not confirmed that.I believe it would be worth while to add tests to some basic optimization results, just so we can track if results shift through other code development or updates in dependencies.
Test results, if applicable
See above to produce test results.