diff --git a/ROSCO_toolbox/controller.py b/ROSCO_toolbox/controller.py index 83d1107c..acc2742b 100644 --- a/ROSCO_toolbox/controller.py +++ b/ROSCO_toolbox/controller.py @@ -186,8 +186,8 @@ def tune_controller(self, turbine): for i in range(len(TSR_op)): # Find pitch angle as a function of expected operating CP for each TSR Cp_TSR = np.ndarray.flatten(turbine.Cp.interp_surface(turbine.pitch_initial_rad, TSR_op[i])) # all Cp values for a given tsr - Cp_op[i] = np.clip(Cp_op[i], np.min(Cp_TSR), np.max(Cp_TSR)) # saturate Cp values to be on Cp surface - Cp_maxidx = Cp_TSR.argmax() # Find maximum Cp value for this TSR + Cp_maxidx = Cp_TSR.argmax() + Cp_op[i] = np.clip(Cp_op[i], np.min(Cp_TSR[Cp_maxidx:]), np.max(Cp_TSR[Cp_maxidx:])) # saturate Cp values to be on Cp surface # Find maximum Cp value for this TSR f_cp_pitch = interpolate.interp1d(Cp_TSR[Cp_maxidx:],pitch_initial_rad[Cp_maxidx:]) # interpolate function for Cp(tsr) values # expected operation blade pitch values if v[i] <= turbine.v_rated and isinstance(self.min_pitch, float): # Below rated & defined min_pitch diff --git a/ROSCO_toolbox/turbine.py b/ROSCO_toolbox/turbine.py index fd30a736..60af0b2c 100644 --- a/ROSCO_toolbox/turbine.py +++ b/ROSCO_toolbox/turbine.py @@ -254,8 +254,8 @@ def load_from_ccblade(self): self.load_blade_info() # Generate the look-up tables, mesh the grid and flatten the arrays for cc_rotor aerodynamic analysis - TSR_initial = np.arange(3, 15,0.5) - pitch_initial = np.arange(-1,25,0.5) + TSR_initial = np.arange(2, 15,0.5) + pitch_initial = np.arange(-5,25,0.5) pitch_initial_rad = pitch_initial * deg2rad ws_array = np.ones_like(TSR_initial) * self.v_rated # evaluate at rated wind speed omega_array = (TSR_initial * ws_array / self.rotor_radius) * RadSec2rpm diff --git a/environment.yml b/environment.yml index a8deaf95..ed3f970f 100644 --- a/environment.yml +++ b/environment.yml @@ -11,3 +11,4 @@ dependencies: - pandas - wisdem - cmake + - pyparsing==2.4.7 \ No newline at end of file