Skip to content

Commit 5980a5d

Browse files
Change direction of cross-stream computation
1 parent d83943c commit 5980a5d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

amrwind_frontend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ def convert_winddir_to_xy(self, winddir):
981981
ny = np.sin(theta)
982982
vertical = np.array([0, 0, 1.0])
983983
streamwise = np.array([nx, ny, 0.0])
984-
crossstream = np.cross(streamwise, vertical)
984+
crossstream = -np.cross(streamwise, vertical)
985985
return streamwise, crossstream, vertical
986986

987987
# ---- ABL wind calculation ----------

farmfunctions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def refine_createZoneForTurbine(self, turbname, turbinedict, zonedict,
297297
vert = np.array([0.0, 0.0, 1.0])
298298
elif orient == 'y':
299299
streamwise = np.array([0.0, 1.0, 0.0])
300-
crossstream = np.array([-1.0, 0.0, 0.0])
300+
crossstream = np.array([1.0, 0.0, 0.0])
301301
vert = np.array([0.0, 0.0, 1.0])
302302
elif orient == 'nacdir':
303303
streamwise, crossstream, vert = self.convert_winddir_to_xy(turbyaw)
@@ -329,7 +329,7 @@ def refine_createZoneForFarm(self, zonedict, autofarmcenter, AvgTurbD, AvgHH,
329329
vert = np.array([0.0, 0.0, 1.0])
330330
elif orient == 'y':
331331
streamwise = np.array([0.0, 1.0, 0.0])
332-
crossstream = np.array([-1.0, 0.0, 0.0])
332+
crossstream = np.array([1.0, 0.0, 0.0])
333333
vert = np.array([0.0, 0.0, 1.0])
334334
elif orient == 'nacdir':
335335
print("Zone orientation nacdir not possible for farm zone.")
@@ -708,7 +708,7 @@ def sampling_createDictForTurbine(self, turbname, tdict, pdict, defaultopt):
708708
vert = np.array([0.0, 0.0, 1.0])
709709
elif orient == 'y':
710710
streamwise = np.array([0.0, 1.0, 0.0])
711-
crossstream = np.array([-1.0, 0.0, 0.0])
711+
crossstream = np.array([1.0, 0.0, 0.0])
712712
vert = np.array([0.0, 0.0, 1.0])
713713
elif orient == 'nacdir':
714714
streamwise, crossstream, vert = self.convert_winddir_to_xy(turbyaw)
@@ -883,7 +883,7 @@ def sampling_createDictForFarm(self, pdict, AvgCenter,
883883
vert = np.array([0.0, 0.0, 1.0])
884884
elif orient == 'y':
885885
streamwise = np.array([0.0, 1.0, 0.0])
886-
crossstream = np.array([-1.0, 0.0, 0.0])
886+
crossstream = np.array([1.0, 0.0, 0.0])
887887
vert = np.array([0.0, 0.0, 1.0])
888888
else: # Use the wind direction
889889
streamwise, crossstream, vert = self.convert_winddir_to_xy(winddir)

tkyamlgui

0 commit comments

Comments
 (0)