Skip to content

Commit

Permalink
Include TSR_operational as yaml input
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Jan 22, 2020
1 parent dfe5717 commit 99de43e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
10 changes: 10 additions & 0 deletions ROSCO_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
'''
Expand Down Expand Up @@ -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):
'''
Expand Down
2 changes: 1 addition & 1 deletion ROSCO_toolbox/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 5 additions & 1 deletion Tune_Cases/DTU10MW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion Tune_Cases/IEA15MW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----------------------------------
Expand Down
6 changes: 4 additions & 2 deletions Tune_Cases/NREL5MW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 ----------------------------------
Expand Down

0 comments on commit 99de43e

Please sign in to comment.