Skip to content

Commit

Permalink
Merge pull request #2 from NREL/tuning_dev
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
nikhar-abbas committed Sep 6, 2019
2 parents 0542f92 + 2f10061 commit d4ec558
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions WTC_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def load_from_txt(self,fast,txt_filename):
if line.__contains__('Pitch angle'):
# Beta.append(pfile.readline())
pitch_initial = np.array([float(x) for x in pfile.__next__().strip().split()])
pitch_initial = pitch_initial * (np.pi/180) # degrees to rad
pitch_initial_rad = pitch_initial * (np.pi/180) # degrees to rad
# Read Tip Speed Ratios (rad)
if line.__contains__('TSR'):
TSR_initial = np.array([float(x) for x in pfile.__next__().strip().split()])
Expand All @@ -233,9 +233,9 @@ def load_from_txt(self,fast,txt_filename):
CQ = np.reshape(CQ, (len(TSR_initial),len(pitch_initial)))

# # Form the interpolant functions which can look up any arbitrary location
self.cp_interp = interpolate.interp2d(pitch_initial, TSR_initial, CP, kind='cubic',bounds_error=False)
self.ct_interp = interpolate.interp2d(pitch_initial, TSR_initial, CT, kind='cubic',bounds_error=False))
self.cq_interp = interpolate.interp2d(pitch_initial, TSR_initial, CQ, kind='cubic',bounds_error=False))
self.cp_interp = interpolate.interp2d(pitch_initial_rad, TSR_initial, CP, kind='cubic')
self.ct_interp = interpolate.interp2d(pitch_initial_rad, TSR_initial, CT, kind='cubic')
self.cq_interp = interpolate.interp2d(pitch_initial_rad, TSR_initial, CQ, kind='cubic')


# # NOT CERTAIN OF THESE ALTERNATIVES YET
Expand Down

0 comments on commit d4ec558

Please sign in to comment.