-
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
Use existing simulation yaw angles in planar calculations instead of switching to zero yaw angles #449
base: develop
Are you sure you want to change the base?
Conversation
This change is causing an error in example 00:
I'm not sure the best way to resolve this (whether it is to fix the test or the code), but will mark as a draft to indicate this is not ready to be merged. |
Thoughts from discussion:
|
Interesting thoughts @rafmudaf. How about assigning the turbine yaw angles in the
Cons are that this can be API breaking and increases the size of |
…aw_angles is None
@pjireland I rebased your commit onto the |
Thanks for the update, @rafmudaf! |
Hi @pjireland , I'm just looking back through older pull requests and I believe that the desired functionality is now included in Floris v4. For example, running import matplotlib.pyplot as plt
from floris import FlorisModel
from floris import flow_visualization as flowviz
fmodel = FlorisModel("inputs/gch.yaml")
fmodel.set(
wind_directions=[270.0],
wind_speeds=[8.0],
turbulence_intensities=[0.06],
layout_x=[0, 1000.0],
layout_y=[0.0, 0.0],
yaw_angles=[[20.0, 0.0]],
)
fmodel.run() # Not needed, but shows that yaw_angles are retained even after run()
plane = fmodel.calculate_horizontal_plane(height=90)
flowviz.visualize_cut_plane(plane)
plt.show() In fact, with the updates in v4, the If this looks good to you, I think we can close this pull request. |
Feature or improvement description
calculate_horizontal_plane
,calculate_cross_plane
, andcalculate_y_plane
previously used zero yaw angles if called withyaw_angles=None
. This PR changes the behavior to use the existing yaw angles fromself.floris.farm.yaw_angles
instead.Related issue, if one exists
#448
Impacted areas of the software
floris.tools.floris_interface.py
Test results, if applicable
Example visualization before change:
Example visualization after change:
Unit test results: