Skip to content

Commit

Permalink
Shutdown: Modify DISCON.IN files for test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
abhineet-gupta committed Nov 16, 2024
1 parent e4060b9 commit e5ba227
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 15 deletions.
16 changes: 14 additions & 2 deletions Examples/Test_Cases/BAR_10/BAR_10_DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,20 @@
-0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.015 -0.012 0.000 0.011 0.020 0.029 0.041 0.056 0.069 0.082 0.095 0.108 0.120 0.132 0.143 0.155 0.166 0.178 0.189 0.200 0.211 0.222 0.232 0.243 0.254 0.264 0.274 0.285 0.295 0.305 0.315 0.325 0.335 0.344 0.354 0.364 0.373 ! PS_BldPitchMin - Minimum blade pitch angles [rad]

!------- SHUTDOWN -----------------------------------------------------------
0.698100000000 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]
0.418880000000 ! SD_CornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle, [rad/s]
0 ! SD_EnablePitch - Shutdown when collective blade pitch exceeds a threshold, [-]​
0 ! SD_EnableYawError - Shutdown when yaw error exceeds a threshold, [-]​
0 ! SD_EnableGenSpeed - Shutdown when generator speed exceeds a threshold, [-]​
0 ! SD_EnableTime - Shutdown at a predefined time, [-]​
0.5236 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]​
0.4189 ! SD_PitchCornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle for shutdown, [rad/s]​
0.5236 ! SD_MaxYawError - Maximum yaw error to initiate shutdown, [rad]​
0.4189 ! SD_YawErrorCornerFreq - Cutoff Frequency for first order low-pass filter for yaw error for shutdown, [rad/s]
10.000 ! SD_MaxGenSpd - Maximum generator speed to initiate shutdown, [rad/s]​
0.4189 ! SD_GenSpdCornerFreq - Cutoff Frequency for first order low-pass filter for generator speed for shutdown, [rad/s] ​
9999.00 ! SD_Time - Shutdown time, [s]​
1 ! SD_Method - Shutdown method {1: Reduce generator torque and increase blade pitch},​ [-]​
4500000 ! SD_MaxTorqueRate - Maximum torque rate for shutdown, [Nm/s]​
0.03480 ! SD_MaxPitchRate - Maximum pitch rate used for shutdown, [rad/s]​

!------- Floating -----------------------------------------------------------
1 ! Fl_n - Number of Fl_Kp gains in gain scheduling, optional with default of 1
Expand Down
16 changes: 14 additions & 2 deletions Examples/Test_Cases/IEA-15-240-RWT-UMaineSemi/DISCON-UMaineSemi.IN
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,20 @@
0.060 0.060 0.060 0.060 0.060 0.060 0.056 0.052 0.047 0.041 0.036 0.029 0.022 0.015 0.008 0.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.006 0.021 0.033 0.044 0.053 0.064 0.074 0.084 0.093 0.103 0.112 0.121 0.130 0.138 0.147 0.155 0.163 0.172 0.180 0.188 0.196 0.203 0.211 0.219 0.227 0.234 0.242 0.250 0.257 0.265 0.272 0.279 0.287 0.294 0.301 ! PS_BldPitchMin - Minimum blade pitch angles [rad]

!------- SHUTDOWN -----------------------------------------------------------
0.698100000000 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]
0.418880000000 ! SD_CornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle, [rad/s]
0 ! SD_EnablePitch - Shutdown when collective blade pitch exceeds a threshold, [-]​
0 ! SD_EnableYawError - Shutdown when yaw error exceeds a threshold, [-]​
0 ! SD_EnableGenSpeed - Shutdown when generator speed exceeds a threshold, [-]​
0 ! SD_EnableTime - Shutdown at a predefined time, [-]​
0.5236 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]​
0.4189 ! SD_PitchCornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle for shutdown, [rad/s]​
0.5236 ! SD_MaxYawError - Maximum yaw error to initiate shutdown, [rad]​
0.4189 ! SD_YawErrorCornerFreq - Cutoff Frequency for first order low-pass filter for yaw error for shutdown, [rad/s]
10.000 ! SD_MaxGenSpd - Maximum generator speed to initiate shutdown, [rad/s]​
0.4189 ! SD_GenSpdCornerFreq - Cutoff Frequency for first order low-pass filter for generator speed for shutdown, [rad/s] ​
9999.00 ! SD_Time - Shutdown time, [s]​
1 ! SD_Method - Shutdown method {1: Reduce generator torque and increase blade pitch},​ [-]​
4500000 ! SD_MaxTorqueRate - Maximum torque rate for shutdown, [Nm/s]​
0.03480 ! SD_MaxPitchRate - Maximum pitch rate used for shutdown, [rad/s]​

!------- Floating -----------------------------------------------------------
1 ! Fl_n - Number of Fl_Kp gains in gain scheduling, optional with default of 1
Expand Down
16 changes: 14 additions & 2 deletions Examples/Test_Cases/MHK_RM1/MHK_RM1_DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,20 @@
0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 ! PS_BldPitchMin - Minimum blade pitch angles [rad]

!------- SHUTDOWN -----------------------------------------------------------
0.436300000000 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]
0.418880000000 ! SD_CornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle, [rad/s]
0 ! SD_EnablePitch - Shutdown when collective blade pitch exceeds a threshold, [-]​
0 ! SD_EnableYawError - Shutdown when yaw error exceeds a threshold, [-]​
0 ! SD_EnableGenSpeed - Shutdown when generator speed exceeds a threshold, [-]​
0 ! SD_EnableTime - Shutdown at a predefined time, [-]​
0.5236 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]​
0.4189 ! SD_PitchCornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle for shutdown, [rad/s]​
0.5236 ! SD_MaxYawError - Maximum yaw error to initiate shutdown, [rad]​
0.4189 ! SD_YawErrorCornerFreq - Cutoff Frequency for first order low-pass filter for yaw error for shutdown, [rad/s]
10.000 ! SD_MaxGenSpd - Maximum generator speed to initiate shutdown, [rad/s]​
0.4189 ! SD_GenSpdCornerFreq - Cutoff Frequency for first order low-pass filter for generator speed for shutdown, [rad/s] ​
9999.00 ! SD_Time - Shutdown time, [s]​
1 ! SD_Method - Shutdown method {1: Reduce generator torque and increase blade pitch},​ [-]​
4500000 ! SD_MaxTorqueRate - Maximum torque rate for shutdown, [Nm/s]​
0.03480 ! SD_MaxPitchRate - Maximum pitch rate used for shutdown, [rad/s]​

!------- Floating -----------------------------------------------------------
1 ! Fl_n - Number of Fl_Kp gains in gain scheduling, optional with default of 1
Expand Down
16 changes: 14 additions & 2 deletions Examples/Test_Cases/NREL-5MW/DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,20 @@
0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.011 0.023 0.032 0.040 0.047 0.059 0.070 0.081 0.091 0.102 0.112 0.122 0.131 0.141 0.150 0.160 0.169 0.178 0.187 0.196 0.205 0.214 0.223 0.232 0.240 0.249 0.257 0.266 0.274 0.282 0.290 0.299 0.307 0.315 0.323 ! PS_BldPitchMin - Minimum blade pitch angles [rad]

!------- SHUTDOWN -----------------------------------------------------------
0.436300000000 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]
0.418880000000 ! SD_CornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle, [rad/s]
0 ! SD_EnablePitch - Shutdown when collective blade pitch exceeds a threshold, [-]​
0 ! SD_EnableYawError - Shutdown when yaw error exceeds a threshold, [-]​
0 ! SD_EnableGenSpeed - Shutdown when generator speed exceeds a threshold, [-]​
0 ! SD_EnableTime - Shutdown at a predefined time, [-]​
0.5236 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]​
0.4189 ! SD_PitchCornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle for shutdown, [rad/s]​
0.5236 ! SD_MaxYawError - Maximum yaw error to initiate shutdown, [rad]​
0.4189 ! SD_YawErrorCornerFreq - Cutoff Frequency for first order low-pass filter for yaw error for shutdown, [rad/s]
10.000 ! SD_MaxGenSpd - Maximum generator speed to initiate shutdown, [rad/s]​
0.4189 ! SD_GenSpdCornerFreq - Cutoff Frequency for first order low-pass filter for generator speed for shutdown, [rad/s] ​
9999.00 ! SD_Time - Shutdown time, [s]​
1 ! SD_Method - Shutdown method {1: Reduce generator torque and increase blade pitch},​ [-]​
4500000 ! SD_MaxTorqueRate - Maximum torque rate for shutdown, [Nm/s]​
0.03480 ! SD_MaxPitchRate - Maximum pitch rate used for shutdown, [rad/s]​

!------- Floating -----------------------------------------------------------
1 ! Fl_n - Number of Fl_Kp gains in gain scheduling, optional with default of 1
Expand Down
16 changes: 14 additions & 2 deletions Examples/Test_Cases/NREL_2p8_127/NREL-2p8-127_DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,20 @@
0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.019 0.031 0.041 0.050 0.058 0.066 0.074 0.086 0.096 0.107 0.117 0.127 0.137 0.147 0.156 0.165 0.174 0.183 0.192 0.201 0.210 0.218 0.227 0.236 0.244 0.253 0.262 0.270 0.279 0.287 0.295 0.303 0.312 0.320 0.328 0.337 0.345 ! PS_BldPitchMin - Minimum blade pitch angles [rad]

!------- SHUTDOWN -----------------------------------------------------------
0.436300000000 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]
0.418880000000 ! SD_CornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle, [rad/s]
0 ! SD_EnablePitch - Shutdown when collective blade pitch exceeds a threshold, [-]​
0 ! SD_EnableYawError - Shutdown when yaw error exceeds a threshold, [-]​
0 ! SD_EnableGenSpeed - Shutdown when generator speed exceeds a threshold, [-]​
0 ! SD_EnableTime - Shutdown at a predefined time, [-]​
0.5236 ! SD_MaxPit - Maximum blade pitch angle to initiate shutdown, [rad]​
0.4189 ! SD_PitchCornerFreq - Cutoff Frequency for first order low-pass filter for blade pitch angle for shutdown, [rad/s]​
0.5236 ! SD_MaxYawError - Maximum yaw error to initiate shutdown, [rad]​
0.4189 ! SD_YawErrorCornerFreq - Cutoff Frequency for first order low-pass filter for yaw error for shutdown, [rad/s]
10.000 ! SD_MaxGenSpd - Maximum generator speed to initiate shutdown, [rad/s]​
0.4189 ! SD_GenSpdCornerFreq - Cutoff Frequency for first order low-pass filter for generator speed for shutdown, [rad/s] ​
9999.00 ! SD_Time - Shutdown time, [s]​
1 ! SD_Method - Shutdown method {1: Reduce generator torque and increase blade pitch},​ [-]​
4500000 ! SD_MaxTorqueRate - Maximum torque rate for shutdown, [Nm/s]​
0.03480 ! SD_MaxPitchRate - Maximum pitch rate used for shutdown, [rad/s]​

!------- Floating -----------------------------------------------------------
1 ! Fl_n - Number of Fl_Kp gains in gain scheduling, optional with default of 1
Expand Down
10 changes: 5 additions & 5 deletions rosco/toolbox/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,18 @@ 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('{:<12d} ! SD_EnablePitch - Shutdown when collective blade pitch exceeds a threshold, [-]​\n'.format(rosco_vt['SD_EnablePitch']))
file.write('{:<12d} ! SD_EnableYawError - Shutdown when yaw error exceeds a threshold, [-]​\n'.format(rosco_vt['SD_EnableYawError']))
file.write('{:<12d} ! SD_EnableGenSpeed - Shutdown when generator speed exceeds a threshold, [-]​\n'.format(rosco_vt['SD_EnableGenSpeed']))
file.write('{:<12d} ! SD_EnableTime - Shutdown at a predefined time, [-]​\n'.format(rosco_vt['SD_EnableTime']))
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('{:<12d} ! SD_Method - Shutdown method {{1: Reduce generator torque and increase blade pitch}},​ [-]​\n'.format(rosco_vt['SD_Method']))
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')
Expand Down

0 comments on commit e5ba227

Please sign in to comment.