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] Correct condition when yaw_angles passed to TurboPark model (version 3) #811

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

misi9170
Copy link
Collaborator

@misi9170 misi9170 commented Feb 20, 2024

Equivalent bugfix to #808 for FLORIS v3. See #808 for details

The example code to run is slightly different (due to the change from 5d to 4d arrays in v4, #764):

import numpy as np
from floris.tools import FlorisInterface

fi = FlorisInterface("inputs/turbopark.yaml")
print(1)
fi.calculate_wake() # Raises warning
print(2)
fi.calculate_wake(yaw_angles=None) # Raises warning
print(3)
fi.calculate_wake(yaw_angles=np.zeros((1,1,3))) # Raises warning
print(4)
fi.calculate_wake(yaw_angles=np.array([[[20, 10, 0]]])) # Raises warning (due to 0)
print(5)
fi.calculate_wake(yaw_angles=np.array(([[[20, 20, 20]]]))) # No warning raised

Expected behavior, and what this PR implements, is that 1), 2), and 3) do not raise a warning, while 4) and 5) do.

@misi9170 misi9170 changed the title [BUG] Correct condition when yaw_angles passed to TurboPark model (version 3) [BUGFIX] Correct condition when yaw_angles passed to TurboPark model (version 3) Feb 20, 2024
@rafmudaf rafmudaf merged commit c7f8f36 into NREL:develop Feb 20, 2024
8 checks passed
@misi9170 misi9170 deleted the bugfix/turbopark-yaw-angles branch February 20, 2024 20:53
@misi9170 misi9170 mentioned this pull request Apr 5, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working floris.simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants