Skip to content

Commit

Permalink
Add flap max pitch as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Feb 14, 2020
1 parent 7cc3f57 commit 5874acb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ROSCO_toolbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ def __init__(self, controller_params):
else:
self.sd_maxpit = None

if controller_params['flp_maxpit']:
self.flp_maxpit = controller_params['flp_maxpit']
else:
if controller_params['Flp_Mode'] > 0:
self.flp_maxpit = 10.0 * deg2rad
else:
self.flp_maxpit = 0.0

def tune_controller(self, turbine):
"""
Given a turbine model, tune a controller based on the NREL generic controller tuning process
Expand Down
3 changes: 2 additions & 1 deletion ROSCO_toolbox/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,8 @@ def write_param_file(self, turbine, controller, param_file='DISCON.IN', txt_file
file.write('!------- FLAP ACTUATION -----------------------------------------------------\n')
file.write('{:<014.5f} ! Flp_Angle - Initial or steady state flap angle [rad]\n'.format(controller.flp_angle))
file.write('{:<014.8e} ! Flp_Kp - Blade root bending moment proportional gain for flap control [s]\n'.format(controller.Kp_flap[-1]))
file.write('{:<014.8e} ! Flp_Ki - Flap displacement integral gain for flap control [s]'.format(controller.Ki_flap[-1]))
file.write('{:<014.8e} ! Flp_Ki - Flap displacement integral gain for flap control [s]\n'.format(controller.Ki_flap[-1]))
file.write('{:<014.5f} ! Flp_MaxPit - Maximum (and minimum) flap pitch angle [rad]'.format(controller.flp_maxpit))
file.close()

def write_rotor_performance(self,turbine,txt_filename='Cp_Ct_Cq.txt'):
Expand Down

0 comments on commit 5874acb

Please sign in to comment.