From fc20c7b4f290406a023e34c5fba084fce027ec89 Mon Sep 17 00:00:00 2001 From: Nikhar Abbas Date: Fri, 13 Sep 2019 10:12:16 -0600 Subject: [PATCH] Comment updates, read and save turbine name --- WTC_toolbox/turbine.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/WTC_toolbox/turbine.py b/WTC_toolbox/turbine.py index 3b18f348d..8451a3b3a 100644 --- a/WTC_toolbox/turbine.py +++ b/WTC_toolbox/turbine.py @@ -89,9 +89,9 @@ def load_from_fast(self, FAST_InputFile,FAST_directory,drivetrain_inertia, FAST_ FAST_directory: str Directory for primary fast model input file drivetrain_intertia: int - drivetrain intertia (kg-m^2) # nja - this might be able to be automated + drivetrain intertia (kg-m^2) # nja - this might be able to be automated, see aerodyn.out FAST_ver: string, optional - + fast version, usually OpenFAST dev_branch: bool dev_branch input to InputReader_OpenFAST, probably True rot_source: str @@ -106,6 +106,7 @@ def load_from_fast(self, FAST_InputFile,FAST_directory,drivetrain_inertia, FAST_ self.J = drivetrain_inertia print('Loading FAST model: %s ' % FAST_InputFile) + self.TurbineName = FAST_InputFile.strip('.fst') fast = InputReader_OpenFAST(FAST_ver=FAST_ver,dev_branch=dev_branch) fast.FAST_InputFile = FAST_InputFile fast.FAST_directory = FAST_directory @@ -243,14 +244,14 @@ def load_from_txt(self,fast,txt_filename): for tsr_i in range(len(TSR_initial)): Ct[tsr_i] = np.array([float(x) for x in pfile.readline().strip().split()]) - # Read Troque Coefficients + # Read Torque Coefficients if 'Torque' in line: pfile.readline() Cq = np.empty((len(TSR_initial),len(pitch_initial))) for tsr_i in range(len(TSR_initial)): Cq[tsr_i] = np.array([float(x) for x in pfile.readline().strip().split()]) - # Store necessary metrics for analysis + # Store necessary metrics for analysis and tuning self.pitch_initial_rad = pitch_initial_rad self.TSR_initial = TSR_initial self.Cp_table = Cp