Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Nov 19, 2019
1 parent 681a1f1 commit 1f0044a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions ROSCO_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, turbine_params):
self.v_min = turbine_params['v_min']
self.v_rated = turbine_params['v_rated']
self.v_max = turbine_params['v_max']
self.max_pitch_rate = turbine_params['max_pitch_rate'] * deg2rad
self.max_pitch_rate = turbine_params['max_pitch_rate']
self.min_pitch_rate = -1 * self.max_pitch_rate
self.max_torque_rate = turbine_params['max_torque_rate']
self.rated_power = turbine_params['rated_power']
Expand Down Expand Up @@ -175,7 +175,10 @@ def load_from_fast(self, FAST_InputFile,FAST_directory, FAST_ver='OpenFAST',dev_
elif rot_source == 'cc-blade':
self.load_from_ccblade(fast)
else: # default load from cc-blade
if os.path.exists(txt_filename):
if txt_filename is None:
print('No rotor performance data source available, running CC-Blade.')
self.load_from_ccblade(fast)
elif os.path.exists(txt_filename):
self.load_from_txt(txt_filename)
else:
print('No rotor performance data source available, running CC-Blade.')
Expand Down
2 changes: 1 addition & 1 deletion ROSCO_toolbox/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def write_param_file(self, turbine, controller, param_file='DISCON.IN', txt_file
file.write('{:<13.1f} ! IPC_CornerFreqAct - Corner frequency of the first-order actuators model, to induce a phase lag in the IPC signal {{0: Disable}}, [rad/s]\n'.format(0.0))
file.write('\n')
file.write('!------- VS TORQUE CONTROL ------------------------------------------------\n')
file.write('{:<014.5f} ! VS_GenEff - Generator efficiency mechanical power -> electrical power, [should match the efficiency defined in the generator properties!], [-]\n'.format(turbine.GenEff))
file.write('{:<014.5f} ! VS_GenEff - Generator efficiency mechanical power -> electrical power, [should match the efficiency defined in the generator properties!], [%]\n'.format(turbine.GenEff))
file.write('{:<014.5f} ! VS_ArSatTq - Above rated generator torque PI control saturation, [Nm]\n'.format(turbine.rated_torque))
file.write('{:<014.5f} ! VS_MaxRat - Maximum torque rate (in absolute value) in torque controller, [Nm/s].\n'.format(turbine.max_torque_rate))
file.write('{:<014.5f} ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm].\n'.format(turbine.rated_torque*1.1))
Expand Down

0 comments on commit 1f0044a

Please sign in to comment.