<jupyter_start><jupyter_text>Getting startedSee https://github.com/NREL/floris/blob/main/examples/_getting_started/example_00_open_and_vis_floris.pyWritten by <NAME> <NAME> <EMAIL>2021-02-03<jupyter_code>import matplotlib.pyplot as plt
import floris.tools as ft
import numpy as np<jupyter_output><empty_output><jupyter_text>initialize FlorisSame setup as in the `example_input.json`, but with 5 turbines aligned axially.<jupyter_code># Initialize the FLORIS interface fi
# For basic usage, the florice interface provides a simplified interface to
# the underlying classes
fi = ft.floris_interface.FlorisInterface("example_input.json")
# Calculate wake
fi.calculate_wake()

# Get horizontal plane at default height (hub-height)
hor_plane = fi.get_hor_plane()

# Plot and show
fig, ax = plt.subplots()
ft.visualization.visualize_cut_plane(hor_plane, ax=ax)<jupyter_output>[34mfloris.tools.floris_interface.FlorisInterface[0m [1;30mINFO[0m Default to hub height = 90.0 for horizontal plane.<jupyter_text>Visualize turbine layout<jupyter_code># Make a random 9-turbine layout
layout_x = np.random.uniform(low=0, high=126 * 10, size=4)
layout_y = np.random.uniform(low=0, high=126 * 10, size=4)
fi.reinitialize_flow_field(layout_array=(layout_x, layout_y))
fi.calculate_wake()

# Show layout visualizations
fig, axarr = plt.subplots(1, 3, figsize=(15, 5))

ax = axarr[0]
hor_plane = fi.get_hor_plane()
ft.visualization.visualize_cut_plane(hor_plane, ax=ax)

ax = axarr[1]
fi.vis_layout(ax=ax)

ax = axarr[2]
fi.vis_layout(ax=ax, show_wake_lines=True)<jupyter_output>[34mfloris.tools.floris_interface.FlorisInterface[0m [1;30mINFO[0m Default to hub height = 90.0 for horizontal plane.<jupyter_text>Visualize wakes, inflow, and deficit<jupyter_code># Grab some cross planes
D = 126
cut_plane_base_5 = fi.get_cross_plane(5 * D)
cut_plane_base_in = fi.get_cross_plane(-5 * D)


# Get the difference planes
cut_plane_diff = ft.cut_plane.subtract(cut_plane_base_5, cut_plane_base_in)


# Plot and show
fig, axarr = plt.subplots(3, 1, figsize=(12, 6))

ax = axarr[0]
ft.visualization.visualize_cut_plane(cut_plane_base_5, ax=ax, minSpeed=4, maxSpeed=8)
ax.set_title("Baseline, 5D")

ax = axarr[1]
ft.visualization.visualize_cut_plane(cut_plane_base_in, ax=ax, minSpeed=4, maxSpeed=8)
ax.set_title("Baseline, Inflow")

ax = axarr[2]
ft.visualization.visualize_cut_plane(cut_plane_diff, ax=ax, minSpeed=-2, maxSpeed=2)
ax.set_title("5D - INFLOW")

# Reverse axis  making the view upstream looking down
for ax in axarr.flatten():
    ft.visualization.reverse_cut_plane_x_axis_in_plot(ax)

fig.tight_layout()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11482889733840304, 'fraction_numerical': 0.029657794676806085, 'mean_word_length': 7.095384615384615, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '664477', 'license': 'Apache-2.0', 'n_tokens_mistral': 1063, 'n_tokens_neox': 989, 'n_words': 201, 'path': 'notebooks/gettingStarted.ipynb', 'repo_name': 'nhamilto/UoU_FLORIS_demo', 'size': '2664'}