diff --git a/ROSCO_toolbox/turbine.py b/ROSCO_toolbox/turbine.py index 53c404d0b..4d28ea01f 100644 --- a/ROSCO_toolbox/turbine.py +++ b/ROSCO_toolbox/turbine.py @@ -82,6 +82,11 @@ def __init__(self, turbine_params): else: self.ptfm_freq = 0.0 + if turbine_params['TSR_operational']: + self.tsr_operational = turbine_params['TSR_operational'] + else: + self.tsr_operational = None + # Allow print out of class def __str__(self): ''' @@ -386,6 +391,11 @@ def __init__(self,performance_table, pitch_initial_rad, TSR_initial): performance_fine = f_performance(TSR_fine_ind) performance_max_ind = np.where(performance_fine == np.max(performance_fine)) self.TSR_opt = float(TSR_fine[performance_max_ind[0]]) + + # Save below-rated operational TSR + if not self.TSR_operational: + self.TSR_operational = self.TSR_opt + def interp_surface(self,pitch,TSR): ''' diff --git a/ROSCO_toolbox/utilities.py b/ROSCO_toolbox/utilities.py index 60fa4579f..ce93f31f3 100644 --- a/ROSCO_toolbox/utilities.py +++ b/ROSCO_toolbox/utilities.py @@ -484,7 +484,7 @@ def write_param_file(self, turbine, controller, param_file='DISCON.IN', txt_file file.write('{:<11d} ! VS_n - Number of generator PI torque controller gains\n'.format(1)) file.write('{:<014.5f} ! VS_KP - Proportional gain for generator PI torque controller [1/(rad/s) Nm]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)\n'.format(controller.vs_gain_schedule.Kp[-1])) file.write('{:<014.5f} ! VS_KI - Integral gain for generator PI torque controller [1/rad Nm]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)\n'.format(controller.vs_gain_schedule.Ki[-1])) - file.write('{:<13.2f} ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad].\n'.format(turbine.Cp.TSR_opt)) + file.write('{:<13.2f} ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio [rad].\n'.format(turbine.Cp.TSR_operational)) file.write('\n') file.write('!------- SETPOINT SMOOTHER ---------------------------------------------\n') file.write('{:<13.5f} ! SS_VSGain - Variable speed torque controller setpoint smoother gain, [-].\n'.format(controller.ss_vsgain)) diff --git a/Tune_Cases/DTU10MW.yaml b/Tune_Cases/DTU10MW.yaml index 8ebae7500..de9409f03 100644 --- a/Tune_Cases/DTU10MW.yaml +++ b/Tune_Cases/DTU10MW.yaml @@ -19,7 +19,11 @@ turbine_params: max_torque_rate: 5000000. # Maximum torque rate [Nm/s], {~1/4 VS_RtTq/s} rated_power: 10000000. # Rated Power [W] bld_edgewise_freq: 4.519 # Blade edgewise first natural frequency [rad/s] - + # Optional + TSR_operational: # None # Desired below-rated operational tip speed ratio (Cp-maximizing TSR is used if not defined) + # - should be defined if Fl_Mode = 1 + twr_freq: # None # Tower natural frequency [rad/s] + ptfm_freq: # None # Platform natural frequency [rad/s] #------------------------------- CONTROLLER PARAMETERS ---------------------------------- controller_params: # Controller flags diff --git a/Tune_Cases/IEA15MW.yaml b/Tune_Cases/IEA15MW.yaml index 8235d95fc..b3513f372 100644 --- a/Tune_Cases/IEA15MW.yaml +++ b/Tune_Cases/IEA15MW.yaml @@ -19,7 +19,9 @@ turbine_params: max_torque_rate: 4500000. # Maximum torque rate [Nm/s], {~1/4 VS_RtTq/s} rated_power: 15000000. # Rated Power [W] bld_edgewise_freq: 3.4164 # Blade edgewise first natural frequency [rad/s] - # Optional - should be defined if Fl_Mode = 1 + # Optional + TSR_operational: 9.0 # Desired below-rated operational tip speed ratio (Cp-maximizing TSR is used if not defined) + # - should be defined if Fl_Mode = 1 twr_freq: # None # Tower natural frequency [rad/s] ptfm_freq: # None # Platform natural frequency [rad/s] #------------------------------- CONTROLLER PARAMETERS ---------------------------------- diff --git a/Tune_Cases/NREL5MW.yaml b/Tune_Cases/NREL5MW.yaml index 9b483ef65..06306a43d 100644 --- a/Tune_Cases/NREL5MW.yaml +++ b/Tune_Cases/NREL5MW.yaml @@ -8,7 +8,7 @@ path_params: # FAST_InputFile: '5MW_OC4Semi.fst' # Name of *.fst file # FAST_directory: '../Test_Cases/5MW_OC4_NR' # Main OpenFAST model directory, where the *.fst lives # Optional - rotor_performance_filename: 'Cp_Ct_Cq.OpenFAST_5MW.txt' # Filename for rotor performance text file (if it has been generated by ccblade already) + rotor_performance_filename: 'Cp_Ct_Cq.NREL5MW.txt' # Filename for rotor performance text file (if it has been generated by ccblade already) # -------------------------------- TURBINE PARAMETERS ----------------------------------- turbine_params: @@ -21,7 +21,9 @@ turbine_params: max_torque_rate: 1500000. # Maximum torque rate [Nm/s], {~1/4 VS_RtTq/s} rated_power: 5000000. # Rated Power [W] bld_edgewise_freq: 6.2831853 # Blade edgewise first natural frequency [rad/s] - # Optional - should be defined if Fl_Mode = 1 + # Optional + TSR_operational: # None # Desired below-rated operational tip speed ratio (Cp-maximizing TSR is used if not defined) + # - should be defined if Fl_Mode = 1 twr_freq: 0.4499 # Tower natural frequency [rad/s] ptfm_freq: 0.2325 # Platform natural frequency [rad/s] #------------------------------- CONTROLLER PARAMETERS ----------------------------------