## First row yaw_angles[:, :, 0] = 30.0 yaw_angles[:, :, 1] = -30.0 yaw_angles[:, :, 2] = 30.0 ## Second row yaw_angles[:, :, 3] = -30.0 yaw_angles[:, :, 4] = 30.0 yaw_angles[:, :, 5] = -30.0 horizontal_plane = fi.calculate_horizontal_plane(yaw_angles=yaw_angles, height=90.0) visualize_cut_plane(horizontal_plane, ax=axarr[4], title="Yawesome art", cmap="PuOr", minSpeed=MIN_WS, maxSpeed=MAX_WS) # plot_turbines_with_fi(axarr[8], fi) # Plot the cross-plane of the 3x3 configuration cross_plane = fi.calculate_cross_plane(yaw_angles=yaw_angles, downstream_dist=610.0) visualize_cut_plane(cross_plane, ax=axarr[5], title="Cross section at 610 m", minSpeed=MIN_WS, maxSpeed=MAX_WS) axarr[5].invert_xaxis() plt.show()
# Also, pass the heterogeneous map into the FlorisInterface. fi_2d = FlorisInterface("inputs/gch.yaml", het_map=het_map_2d) # Set shear to 0.0 to highlight the heterogeneous inflow fi_2d.reinitialize(wind_shear=0.0) # Using the FlorisInterface functions for generating plots, run FLORIS # and extract 2D planes of data. horizontal_plane_2d = fi_2d.calculate_horizontal_plane(x_resolution=200, y_resolution=100, height=90.0) y_plane_2d = fi_2d.calculate_y_plane(x_resolution=200, z_resolution=100, crossstream_dist=0.0) cross_plane_2d = fi_2d.calculate_cross_plane(y_resolution=100, z_resolution=100, downstream_dist=500.0) # Create the plots fig, ax_list = plt.subplots(3, 1, figsize=(10, 8)) ax_list = ax_list.flatten() visualize_cut_plane(horizontal_plane_2d, ax=ax_list[0], title="Horizontal", color_bar=True) ax_list[0].set_xlabel('x') ax_list[0].set_ylabel('y') visualize_cut_plane(y_plane_2d, ax=ax_list[1], title="Streamwise profile", color_bar=True)
""" This example uses an input file where multiple turbine types are defined. The first two turbines are the NREL 5MW, and the third turbine is the IEA 10MW. """ # Initialize FLORIS with the given input file via FlorisInterface. # For basic usage, FlorisInterface provides a simplified and expressive # entry point to the simulation routines. fi = FlorisInterface("inputs/gch_multiple_turbine_types.yaml") # Using the FlorisInterface functions for generating plots, run FLORIS # and extract 2D planes of data. horizontal_plane = fi.calculate_horizontal_plane(x_resolution=200, y_resolution=100, height=90) y_plane = fi.calculate_y_plane(x_resolution=200, z_resolution=100, crossstream_dist=0.0) cross_plane = fi.calculate_cross_plane(y_resolution=100, z_resolution=100, downstream_dist=500.0) # Create the plots fig, ax_list = plt.subplots(3, 1, figsize=(10, 8)) ax_list = ax_list.flatten() visualize_cut_plane(horizontal_plane, ax=ax_list[0], title="Horizontal") visualize_cut_plane(y_plane, ax=ax_list[1], title="Streamwise profile") visualize_cut_plane(cross_plane, ax=ax_list[2], title="Spanwise profile") plt.show()