Skip to content

Commit

Permalink
Add significant digits to wind speed lookup tables
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind authored and nikhar-abbas committed Feb 5, 2021
1 parent bd13c02 commit ed019eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ROSCO_toolbox/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ def write_DISCON(turbine, controller, param_file='DISCON.IN', txt_filename='Cp_C
file.write( '"{}" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq)\n'.format(txt_filename))
file.write('{:<7d} {:<10d} ! PerfTableSize - Size of rotor performance tables, first number refers to number of blade pitch angles, second number referse to number of tip-speed ratios\n'.format(len(turbine.Cp.pitch_initial_rad),len(turbine.Cp.TSR_initial)))
file.write('{:<11d} ! WE_FOPoles_N - Number of first-order system poles used in EKF\n'.format(len(controller.A)))
file.write('{} ! WE_FOPoles_v - Wind speeds corresponding to first-order system poles [m/s]\n'.format(''.join('{:<4.2f} '.format(controller.v[i]) for i in range(len(controller.v)))))
file.write('{} ! WE_FOPoles - First order system poles\n'.format(''.join('{:<10.8f} '.format(controller.A[i]) for i in range(len(controller.A)))))
file.write('{} ! WE_FOPoles_v - Wind speeds corresponding to first-order system poles [m/s]\n'.format(''.join('{:<4.4f} '.format(controller.v[i]) for i in range(len(controller.v)))))
file.write('{} ! WE_FOPoles - First order system poles [1/s]\n'.format(''.join('{:<10.8f} '.format(controller.A[i]) for i in range(len(controller.A)))))
file.write('\n')
file.write('!------- YAW CONTROL ------------------------------------------------------\n')
file.write('{:<13.1f} ! Y_ErrThresh - Yaw error threshold. Turbine begins to yaw when it passes this. [rad^2 s]\n'.format(0.0))
Expand All @@ -162,7 +162,7 @@ def write_DISCON(turbine, controller, param_file='DISCON.IN', txt_filename='Cp_C
file.write('\n')
file.write('!------- MINIMUM PITCH SATURATION -------------------------------------------\n')
file.write('{:<11d} ! PS_BldPitchMin_N - Number of values in minimum blade pitch lookup table (should equal number of values in PS_WindSpeeds and PS_BldPitchMin)\n'.format(len(controller.ps_min_bld_pitch)))
file.write('{} ! PS_WindSpeeds - Wind speeds corresponding to minimum blade pitch angles [m/s]\n'.format(''.join('{:<4.2f} '.format(controller.v[i]) for i in range(len(controller.v)))))
file.write('{} ! PS_WindSpeeds - Wind speeds corresponding to minimum blade pitch angles [m/s]\n'.format(''.join('{:<4.4f} '.format(controller.v[i]) for i in range(len(controller.v)))))
file.write('{} ! PS_BldPitchMin - Minimum blade pitch angles [rad]\n'.format(''.join('{:<10.8f} '.format(controller.ps_min_bld_pitch[i]) for i in range(len(controller.ps_min_bld_pitch)))))
file.write('\n')
file.write('!------- SHUTDOWN -----------------------------------------------------------\n')
Expand Down

0 comments on commit ed019eb

Please sign in to comment.