Skip to content

Commit

Permalink
Account for fileprocessing re-org
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Oct 29, 2019
1 parent e3c0f99 commit 85503a5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Tune_Cases/tune_NREL5MW.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
controller_params = inps['controller_params']

#---------------------------------- DO THE FUN STUFF ------------------------------------#
# Initialiize turbine, controller, and file processing classes
# Initialiize turbine
turbine = wtc_turbine.Turbine(turbine_params)
controller = wtc_controller.Controller(controller_params)
file_processing = wtc_controller.FileProcessing()

# Load Turbine
Expand All @@ -37,16 +36,16 @@
else:
turbine.load_from_fast(path_params['FAST_InputFile'],path_params['FAST_directory'],dev_branch=True,rot_source=None)
# Write rotor performance file
turbine.write_rotor_performance(txt_filename='Cp_Ct_Cq.txt')
file_processing.write_rotor_performance(turbine,txt_filename='Cp_Ct_Cq.txt')

# Tune controller
# Initialize controller tuning and tune controller
controller = wtc_controller.Controller(controller_params)
controller.tune_controller(turbine)



# Initialize
# Write parameter input file
param_file = 'DISCON.IN' # This must be named DISCON.IN to be seen by the compiled controller binary.
file_processing.write_param_file(param_file,turbine,controller,new_file=True)
file_processing.write_param_file(turbine,controller,param_file=param_file)

# plot rotor performance
turbine.Cp.plot_performance(turbine.Cp_table, turbine.pitch_initial_rad, turbine.TSR_initial)
Expand Down

0 comments on commit 85503a5

Please sign in to comment.