Skip to content

Commit

Permalink
adjust paths when relative (path for turbsim exe and path for infloww…
Browse files Browse the repository at this point in the history
…ind are different) (#328)
  • Loading branch information
ptrbortolotti authored Dec 10, 2024
1 parent 02cfd94 commit dfea9e8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions weis/aeroelasticse/turbsim_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ def generate_wind_files(dlc_generator, FAST_namingOut, wind_directory, rotorD, h
turbsim_input_file_name = FAST_namingOut + '_' + dlc_generator.cases[i_case].IEC_WindType + (
'_U%1.6f'%dlc_generator.cases[i_case].URef +
'_Seed%1.1f'%dlc_generator.cases[i_case].RandSeed1) + '.in'
wind_file_path_InflowWind = os.path.join("wind", turbsim_input_file_name[:-3] + '.bts')
turbsim_input_file_path = os.path.join(wind_directory, turbsim_input_file_name)
wind_file_name = turbsim_input_file_path[:-3] + '.bts'


runTS = True
if os.path.exists(wind_file_name) and os.path.exists(turbsim_input_file_path):
runTS = False
Expand Down Expand Up @@ -272,9 +272,13 @@ def generate_wind_files(dlc_generator, FAST_namingOut, wind_directory, rotorD, h
gusts.TF = dlc_generator.cases[i_case].analysis_time + dlc_generator.cases[i_case].transient_time
gusts.Vert_Slope = dlc_generator.cases[i_case].VFlowAng
wind_file_name = gusts.execute(wind_directory, FAST_namingOut, dlc_generator.cases[i_case])
if not os.path.isabs(wind_file_name):
wind_file_path_InflowWind = os.path.join("wind", os.path.basename(wind_file_name))
else:
wind_file_path_InflowWind = wind_file_name
wind_file_type = 2
else:
wind_file_type = 1
wind_file_name = 'unused'
wind_file_path_InflowWind = 'unused'

return wind_file_type, wind_file_name
return wind_file_type, wind_file_path_InflowWind

0 comments on commit dfea9e8

Please sign in to comment.