Skip to content

Commit 36be731

Browse files
dhcho347rafmudaf
authored andcommitted
Resolve conflicts during pull request
update visualization.py from develop branch
1 parent b1d4dcc commit 36be731

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

floris/tools/visualization.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@ def plot_turbines(
4949
color (str): Pyplot color option to plot the turbines.
5050
wind_direction (float): Wind direction (rotates farm)
5151
"""
52-
53-
# Correct for the wind direction
54-
yaw_angles = np.array(yaw_angles) - wind_direction - 270 #dh. activate
55-
5652
if color is None:
5753
color = "k"
5854

55+
fix_orientation=1 #dh. how to
56+
if fix_orientation : wind_direction = np.ones_like(wind_direction)*270 #dh
57+
5958
coordinates_array = np.array([[x, y, 0.0] for x, y in list(zip(layout_x, layout_y))])
6059
layout_x, layout_y, _ = rotate_coordinates_rel_west(np.array([wind_direction]), coordinates_array)
6160

@@ -88,15 +87,15 @@ def plot_turbines_with_fi(fi: FlorisInterface, ax=None, color=None, yaw_angles=N
8887
try:
8988
np.shape(fi.floris.farm.rotor_diameters)[1]
9089
rd=fi.floris.farm.rotor_diameters[0,0] # after calculate_wake with wd or ws is over 2
91-
except:
90+
except:
9291
rd=fi.floris.farm.rotor_diameters # after FI, reinitialize, etc...
9392

9493
plot_turbines(
9594
ax,
9695
fi.layout_x,
9796
fi.layout_y,
9897
yaw_angles[0, 0],
99-
rd, #dh. change
98+
rotor_diameters=rd, #dh
10099
color=color,
101100
wind_direction=fi.floris.flow_field.wind_directions[0],
102101
)

0 commit comments

Comments
 (0)