Skip to content

Conversation

@paulf81
Copy link
Collaborator

@paulf81 paulf81 commented Aug 9, 2025

Add turbine average velocity property to UncertainFLorisModel

This PR adds a property to allow getting the per-turbine average velocities from an UncertainFlorisModel. This property exists for FlorisModel. To provide this capability in UncertainFLorisModel requires mirroring the logic in get_turbine_powers to go from the expanded internal FlorisModel (which includes all the unique conditions after expanding across neighboring wind directions according to the wd_std) back to the un_expanded originally requested wind directions.

Several tests are included to check the functino works as expected

Impacted areas of the software

uncertain_floris_model.py

Test results, if applicable

New tests pass

@paulf81 paulf81 requested a review from misi9170 August 9, 2025 14:23
@paulf81
Copy link
Collaborator Author

paulf81 commented Aug 9, 2025

The failing tests seem unrelated to this PR but I could be mistaken

@misi9170
Copy link
Collaborator

Yes, the failing test is fixed in other open PRs #1126 , #1129 .

@paulf81
Copy link
Collaborator Author

paulf81 commented Aug 11, 2025

Yes, the failing test is fixed in other open PRs #1126 , #1129 .

Thanks! Sorry I missed that

@misi9170
Copy link
Collaborator

Thanks @paulf81 , this looks good to me. I've added a few things:

  • rename map_turbine_powers_uncertain() to map_turbine_values_uncertain() and create an alias with a deprecation warning
  • Add test for typical velocities behavior at downstream turbines (directly downstream turbine has a higher rotor average velocity using the uncertain model than the certain one)

As we discussed, I've also:

  • Added a test and an error if wd_std of 0 or less is used
  • Added a comment to the ApproxFlorisModel explaining the use of wd_std=1

I think this looks good. However, there are still a lot of methods on FlorisModel that are not currently available on the UncertainFlorisModel, e.g. get_turbine_ais(), sample_flow_at_points(), etc.

@misi9170 misi9170 changed the title Add turbine average velocity property to UncertainFLorisModel Add turbine_average_velocities property to UncertainFlorisModel Aug 13, 2025
@misi9170
Copy link
Collaborator

@paulf81 , any objections/comments on the changes I made? If not, I think I can merge.

@paulf81
Copy link
Collaborator Author

paulf81 commented Aug 18, 2025

@paulf81 , any objections/comments on the changes I made? If not, I think I can merge.

Yes, these look great, thank you!

@misi9170 misi9170 merged commit dbe0766 into NatLabRockies:develop Aug 18, 2025
11 checks passed
@misi9170 misi9170 mentioned this pull request Sep 23, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants