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

Visualizations of yawed flow dont appear yawed #318

Closed
paulf81 opened this issue Feb 15, 2022 · 1 comment · Fixed by #351
Closed

Visualizations of yawed flow dont appear yawed #318

paulf81 opened this issue Feb 15, 2022 · 1 comment · Fixed by #351
Assignees
Labels
bug Something isn't working v3 Label to denote focus on v3
Milestone

Comments

@paulf81
Copy link
Collaborator

paulf81 commented Feb 15, 2022

Bug description
Making a horizontal plot of a case with turbine yaw doesn't look like the turbine has been yawed

To Reproduce
Created this code which runs the example 3 turbine farm all aligned, or all 30 degrees. Change in yaw is evident in the printed power but not in the visualization


import matplotlib.pyplot as plt
import numpy as np

from floris.tools import FlorisInterface
from floris.tools.visualization import visualize_cut_plane

fig, axarr = plt.subplots(2,1,figsize=(10,5))

fi = FlorisInterface("inputs/gch.yaml")
fi.calculate_wake()
print(fi.get_turbine_powers())
horizontal_plane = fi.get_hor_plane(x_resolution=200, y_resolution=100)
visualize_cut_plane(horizontal_plane, ax=axarr[0], title="Aligned")


# Yaw the turbines
fi = FlorisInterface("inputs/gch.yaml")
yaw_angles = 30 * np.ones([1,1,3])
fi.calculate_wake(yaw_angles)
print(fi.get_turbine_powers())
horizontal_plane = fi.get_hor_plane(x_resolution=200, y_resolution=100)
visualize_cut_plane(horizontal_plane, ax=axarr[1], title="Yawed")


plt.show()

# Printed output:
# [[[1691326.48288851  429440.47062303  477388.23077145]]]
# [[[1294346.94921053  730096.98655742  845394.24451798]]]

Expected behavior
Would expect the lower plot to show wake steering

Screenshots, if applicable
image

Floris Version
v3

@paulf81 paulf81 added bug Something isn't working v3 Label to denote focus on v3 labels Feb 15, 2022
@paulf81 paulf81 added this to the v3.0 milestone Feb 15, 2022
@bayc
Copy link
Collaborator

bayc commented Feb 15, 2022

@paulf81 because of the way FLORIS is reinstantiated for the get_plane calls, the yaw angle information is lost. As such, yaw_angles is a variable that can be passed into the get_plane calls, and then the yawed flow should show up in the plots. Do you think this is satisfactory? Again, the thought we have been trying to implement with v3 is that things are more explicitly defined, so that we don't get stuck in situations where things are retained when we don't want them to be.

@rafmudaf rafmudaf modified the milestones: v3.0, v3.0rc3 Feb 15, 2022
@rafmudaf rafmudaf modified the milestones: v3.0rc3, v3.1.0 Feb 24, 2022
@bayc bayc linked a pull request Mar 1, 2022 that will close this issue
@bayc bayc closed this as completed Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3 Label to denote focus on v3
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants