Skip to content

Commit

Permalink
Comment updates, read and save turbine name
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Sep 13, 2019
1 parent 722bd9c commit fc20c7b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions WTC_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fc20c7b

Please sign in to comment.