Skip to content
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

[BUGFIX] Address reference wind height warnings raised unnecessarily #1017

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

misi9170
Copy link
Collaborator

@misi9170 misi9170 commented Nov 6, 2024

#1000 introduced a warning that is raised when turbine_type is set without setting the reference_wind_height, to let users know that the reference wind height had not been updated. This was pointed out by @cfrontin and also something I ran into recently while working on other aspects of the FLORIS code.

While this works as intended, the warning is now raised in some places (particularly set_operation_model) where the turbine_type is set implicitly (without direct input from the user). This pull request addresses the unnecessary warning raised by explicitly setting the reference_wind_height (to be the same as it was) when set_operation_model is called.

I've also updated some examples to add the reference wind height when the turbine model is set, as well as the calculate_horizontal_plane_with_turbines() function (which also implicitly sets the turbine_type). The following examples are updated:

  • examples_turbopark/001_...py
  • examples_turbine/003_...py
    Note that examples_turbine/001_check_turbine.py also raises the warning; however, in that case, the warning is raised appropriately, and the assign_hub_height_to_ref_height() method is then called to "correct" the problem. I therefore left this example as is.

In making the fixes, I also have created a @property for the reference_wind_height at the FlorisModel level to make it easy for users to access.

@misi9170 misi9170 added the bug Something isn't working label Nov 6, 2024
@misi9170 misi9170 mentioned this pull request Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant