Skip to content

Commit

Permalink
look for rotperf file as try except
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Jul 10, 2020
1 parent 4609eaf commit 57641c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ROSCO_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ def load_from_fast(self, FAST_InputFile,FAST_directory, FAST_ver='OpenFAST',dev_
txt_filename)
else: # Use text file from DISCON.in
if os.path.exists(os.path.join(FAST_directory, fast.fst_vt['ServoDyn']['DLL_InFile'])):
if os.path.exists(fast.fst_vt['DISCON_in']['PerfFileName']):
try:
self.pitch_initial_rad = fast.fst_vt['DISCON_in']['Cp_pitch_initial_rad']
self.TSR_initial = fast.fst_vt['DISCON_in']['Cp_TSR_initial']
self.Cp_table = fast.fst_vt['DISCON_in']['Cp_table']
self.Ct_table = fast.fst_vt['DISCON_in']['Ct_table']
self.Cq_table = fast.fst_vt['DISCON_in']['Cq_table']
else: # Load from cc-blade
print('No rotor performance data source available, running CC-Blade.')
self.load_from_ccblade()
except: # Load from cc-blade
print('No rotor performance data source available, running CC-Blade.')
self.load_from_ccblade()

# Parse rotor performance data
self.Cp = RotorPerformance(self.Cp_table,self.pitch_initial_rad,self.TSR_initial)
Expand Down

0 comments on commit 57641c0

Please sign in to comment.