Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Nov 21, 2019
1 parent d5ca9b3 commit 78e7f81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
5 changes: 1 addition & 4 deletions ROSCO_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ def __init__(self, turbine_params):
self.rated_power = turbine_params['rated_power']
self.bld_edgewise_freq = turbine_params['bld_edgewise_freq']

# # Init the cc-blade rotor
# self.cc_rotor = None

# Allow print out of class
def __str__(self):
'''
Expand All @@ -91,7 +88,7 @@ def __str__(self):
# Save function
def save(self,filename):
'''
Save turbine to pickle - outdated, but might be okay!!
Save turbine to pickle
Parameters:
----------
Expand Down
8 changes: 2 additions & 6 deletions Tune_Cases/tune_ROSCO.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

#------------------------------------- INITIALIZATION ----------------------------------#
# Import python modules
import numpy as np
from scipy import interpolate
import matplotlib.pyplot as plt
import yaml
import os
Expand All @@ -29,7 +27,6 @@
turbine_params = {}
control_params = {}

os.chdir('/Users/nabbas/Documents/WindEnergyToolbox/ROSCO_toolbox/Tune_Cases')
# Load input file contents, put them in some dictionaries to keep things cleaner
inps = yaml.safe_load(open(parameter_filename))
path_params = inps['path_params']
Expand All @@ -52,15 +49,14 @@
turbine.load_from_fast(path_params['FAST_InputFile'],path_params['FAST_directory'],dev_branch=True,rot_source=None)
file_processing.write_rotor_performance(turbine,txt_filename=path_params['rotor_performance_filename'])

# Initialize controller tuning and tune controller
# Instantiate 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(turbine,controller,param_file=param_file, txt_filename=path_params['rotor_performance_filename'])

# plot rotor performance
# Plot rotor performance
turbine.Cp.plot_performance(turbine.Cp_table, turbine.pitch_initial_rad, turbine.TSR_initial)
plt.show()

0 comments on commit 78e7f81

Please sign in to comment.