Skip to content

Commit

Permalink
Shutdown: Fix utilities.py to remove unknown character
Browse files Browse the repository at this point in the history
  • Loading branch information
abhineet-gupta committed Nov 16, 2024
1 parent e5ba227 commit 55b2fbf
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions rosco/toolbox/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,20 +233,20 @@ def write_DISCON(turbine, controller, param_file='DISCON.IN', txt_filename='Cp_C
file.write('{} ! PS_BldPitchMin - Minimum blade pitch angles [rad]\n'.format(''.join('{:<10.3f} '.format(rosco_vt['PS_BldPitchMin'][i]) for i in range(len(rosco_vt['PS_BldPitchMin'])))))
file.write('\n')
file.write('!------- SHUTDOWN -----------------------------------------------------------\n')
file.write('{0:<12d} ! SD_EnablePitch - Shutdown when collective blade pitch exceeds a threshold, [-]\n'.format(int(rosco_vt['SD_EnablePitch'])))
file.write('{0:<12d} ! SD_EnableYawError - Shutdown when yaw error exceeds a threshold, [-]\n'.format(int(rosco_vt['SD_EnableYawError'])))
file.write('{0:<12d} ! SD_EnableGenSpeed - Shutdown when generator speed exceeds a threshold, [-]\n'.format(int(rosco_vt['SD_EnableGenSpeed'])))
file.write('{0:<12d} ! SD_EnableTime - Shutdown at a predefined time, [-]\n'.format(int(rosco_vt['SD_EnableTime'])))
file.write('{:<014.5f} ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]\n'.format(rosco_vt['SD_MaxPit']))
file.write('{:<014.5f} ! SD_PitchCornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle for shutdown, [rad/s]\n'.format(rosco_vt['SD_PitchCornerFreq']))
file.write('{:<014.5f} ! SD_MaxYawError - Maximum yaw error to initiate shutdown, [rad]\n'.format(rosco_vt['SD_MaxYawError']))
file.write('{0:<12d} ! SD_EnablePitch - Shutdown when collective blade pitch exceeds a threshold, [-]\n'.format(int(rosco_vt['SD_EnablePitch'])))
file.write('{0:<12d} ! SD_EnableYawError - Shutdown when yaw error exceeds a threshold, [-]\n'.format(int(rosco_vt['SD_EnableYawError'])))
file.write('{0:<12d} ! SD_EnableGenSpeed - Shutdown when generator speed exceeds a threshold, [-]\n'.format(int(rosco_vt['SD_EnableGenSpeed'])))
file.write('{0:<12d} ! SD_EnableTime - Shutdown at a predefined time, [-]\n'.format(int(rosco_vt['SD_EnableTime'])))
file.write('{:<014.5f} ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]\n'.format(rosco_vt['SD_MaxPit']))
file.write('{:<014.5f} ! SD_PitchCornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle for shutdown, [rad/s]\n'.format(rosco_vt['SD_PitchCornerFreq']))
file.write('{:<014.5f} ! SD_MaxYawError - Maximum yaw error to initiate shutdown, [rad]\n'.format(rosco_vt['SD_MaxYawError']))
file.write('{:<014.5f} ! SD_YawErrorCornerFreq - Cutoff Frequency for first order low-pass filter for yaw error for shutdown, [rad/s]\n'.format(rosco_vt['SD_YawErrorCornerFreq']))
file.write('{:<014.5f} ! SD_MaxGenSpd - Maximum generator speed to initiate shutdown, [rad/s]\n'.format(rosco_vt['SD_MaxGenSpd']))
file.write('{:<014.5f} ! SD_GenSpdCornerFreq - Cutoff Frequency for first order low-pass filter for generator speed for shutdown, [rad/s] \n'.format(rosco_vt['SD_GenSpdCornerFreq']))
file.write('{:<014.5f} ! SD_Time - Shutdown time, [s]\n'.format(rosco_vt['SD_Time']))
file.write('{0:<12d} ! SD_Method - Shutdown method {{1: Reduce generator torque and increase blade pitch}}, [-]\n'.format(int(rosco_vt['SD_Method'])))
file.write('{:<014.5f} ! SD_MaxTorqueRate - Maximum torque rate for shutdown, [Nm/s]\n'.format(rosco_vt['SD_MaxTorqueRate']))
file.write('{:<014.5f} ! SD_MaxPitchRate - Maximum pitch rate used for shutdown, [rad/s]\n'.format(rosco_vt['SD_MaxPitchRate']))
file.write('{:<014.5f} ! SD_MaxGenSpd - Maximum generator speed to initiate shutdown, [rad/s]\n'.format(rosco_vt['SD_MaxGenSpd']))
file.write('{:<014.5f} ! SD_GenSpdCornerFreq - Cutoff Frequency for first order low-pass filter for generator speed for shutdown, [rad/s] \n'.format(rosco_vt['SD_GenSpdCornerFreq']))
file.write('{:<014.5f} ! SD_Time - Shutdown time, [s]\n'.format(rosco_vt['SD_Time']))
file.write('{0:<12d} ! SD_Method - Shutdown method {{1: Reduce generator torque and increase blade pitch}}, [-]\n'.format(int(rosco_vt['SD_Method'])))
file.write('{:<014.5f} ! SD_MaxTorqueRate - Maximum torque rate for shutdown, [Nm/s]\n'.format(rosco_vt['SD_MaxTorqueRate']))
file.write('{:<014.5f} ! SD_MaxPitchRate - Maximum pitch rate used for shutdown, [rad/s]\n'.format(rosco_vt['SD_MaxPitchRate']))
file.write('\n')
file.write('!------- Floating -----------------------------------------------------------\n')
if rosco_vt['Fl_Mode'] == 2:
Expand Down

0 comments on commit 55b2fbf

Please sign in to comment.