-
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
Expanded capabilities for heterogeneity #902
Merged
Merged
Conversation
This file contains 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
misi9170
changed the title
Expanded capabilities for heterogenaity
Expanded capabilities for heterogeneity
May 7, 2024
@misi9170 , this is ready for your review! |
misi9170
requested changes
May 13, 2024
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.
Overall, this looks good. The main comment I have is about whether the wind_speeds and wind_directions arguments should be the same length (so, meshgridded and flattened?)
misi9170
approved these changes
May 13, 2024
Merged
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.
Expanded capabilities for heterogeneity
The over-arching goals of this pull request are to expand heterogeneity's capabilities in FLORIS while maintaining backward compatibility with 4.0, and to do so in a non-messy way. Main features to be added:
heterogeneous_inflow_config_by_wd
dict as it gets more complicated, with clear errors\To do add the new features, we include a new class
HeterogeneousMap
, which is declared using parameters matched to the keywordsheterogeneous_inflow_config_by_wd
(plus wind_speeds) and does all the relevant checking so this doesn't need to be done by WindData objects. It also provides member functions for getting a findex-based heterogeneous_inflow_config which can be passed toFlorisModel.set()
and will include plotting functions.To avoid changing the API, the
HeterogenousMap
class is used within wind_data.py in such a way that either the formerheterogeneous_inflow_config_by_wd
parameter can be passed in, or a similar dictionary can be unpacked into aheterogenous_map
parameter, orHeterogenousMap
object can be passed in directly.We may over time favor moving toward
heterogenous_map
only, however this is not urgent.The plan of this pull request however is to update the examples (and documentation) to make direct use
HeterogeneousMap
as this is the clearer and more general syntax.Additionally in this pull request:
TimeSeries
wind_directions, wind_speeds or turbulence_intensitiesHeterogeneousMap
classWindData
classesFinally, one test of
WindData
was removed since it was calling a lower-level function which is now handled inHeterogenousMap
, this should not impact examples or practical useage.Impacted areas of the software
wind_data.py