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

Remove setpoints and wind condition specifics from calculate_XX_plane methods #868

Merged
merged 12 commits into from
Apr 8, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,23 @@
x_resolution=200,
y_resolution=100,
height=150.0,
awc_modes=awc_modes,
awc_amplitudes=awc_amplitudes
)

y_plane_baseline = fmodel.calculate_y_plane(
x_resolution=200,
z_resolution=100,
crossstream_dist=0.0,
awc_modes=awc_modes,
awc_amplitudes=awc_amplitudes
)
y_plane_helix = fmodel.calculate_y_plane(
x_resolution=200,
z_resolution=100,
crossstream_dist=-3*D,
awc_modes=awc_modes,
awc_amplitudes=awc_amplitudes
)

cross_plane = fmodel.calculate_cross_plane(
y_resolution=100,
z_resolution=100,
downstream_dist=720.0,
awc_modes=awc_modes,
awc_amplitudes=awc_amplitudes
)

# Create the plots
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
show_flow_cuts = True
num_in_row = 5

yaw_angles = np.zeros((1, num_in_row))


# Define function for visualizing wakes
def generate_wake_visualization(fmodel: FlorisModel, title=None):
# Using the FlorisModel functions, get 2D slices.
Expand All @@ -38,15 +35,13 @@ def generate_wake_visualization(fmodel: FlorisModel, title=None):
height=horizontal_plane_location,
x_bounds=x_bounds,
y_bounds=y_bounds,
yaw_angles=yaw_angles,
)
y_plane = fmodel.calculate_y_plane(
x_resolution=200,
z_resolution=100,
crossstream_dist=streamwise_plane_location,
x_bounds=x_bounds,
z_bounds=z_bounds,
yaw_angles=yaw_angles,
)
cross_planes = []
for cpl in cross_plane_locations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ def generate_wake_visualization(fmodel, title=None):
height=horizontal_plane_location,
x_bounds=x_bounds,
y_bounds=y_bounds,
yaw_angles=yaw_angles
)
y_plane = fmodel.calculate_y_plane(
x_resolution=200,
z_resolution=100,
crossstream_dist=streamwise_plane_location,
x_bounds=x_bounds,
z_bounds=z_bounds,
yaw_angles=yaw_angles
)
cross_planes = []
for cpl in cross_plane_locations:
Expand Down
5 changes: 2 additions & 3 deletions examples/examples_visualizations/001_layout_visualizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@

# Plot 2: Show turbine rotors on flow
ax = axarr[2]
horizontal_plane = fmodel.calculate_horizontal_plane(
height=90.0, yaw_angles=np.array([[0.0, 30.0, 0.0, 0.0, 0.0]])
)
fmodel.set(yaw_angles=np.array([[0., 30., 0., 0., 0.]]))
horizontal_plane = fmodel.calculate_horizontal_plane(height=90.0)
visualize_cut_plane(horizontal_plane, ax=ax, min_speed=MIN_WS, max_speed=MAX_WS)
layoutviz.plot_turbine_rotors(fmodel, ax=ax, yaw_angles=np.array([[0.0, 30.0, 0.0, 0.0, 0.0]]))
ax.set_title("Flow visualization with yawed turbine")
Expand Down