From ed019ebbe17cb4695c49f637f188b6a261f7ff20 Mon Sep 17 00:00:00 2001 From: dzalkind Date: Tue, 22 Dec 2020 10:51:20 -0700 Subject: [PATCH] Add significant digits to wind speed lookup tables --- ROSCO_toolbox/utilities.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ROSCO_toolbox/utilities.py b/ROSCO_toolbox/utilities.py index ec31411c5..ab595d843 100644 --- a/ROSCO_toolbox/utilities.py +++ b/ROSCO_toolbox/utilities.py @@ -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)) @@ -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')