Skip to content

Commit

Permalink
Move dlc_option check
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Jan 16, 2025
1 parent a295ce1 commit e5697d8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions weis/dlc_driver/dlc_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,6 @@ def generate_cases(self,generic_case_inputs,dlc_options):
idlc.turbulent_wind = False
elif dlc_options['IEC_WindType'] == 'Ramp':
idlc.turbulent_wind = False
if 'ramp_speeddelta' not in dlc_options:
raise Exception('ramp_speeddelta must be set for the Ramp DLC')
if 'ramp_duration' not in dlc_options:
raise Exception('ramp_duration must be set for the Ramp DLC')
if dlc_options['ramp_duration'] > dlc_options['analysis_time']:
raise Exception('ramp_duration must be smaller than analysis_time')
idlc.ramp_speeddelta = dlc_options['ramp_speeddelta']
idlc.ramp_duration = dlc_options['ramp_duration']
idlc.gust_wait_time = 0.0
Expand Down Expand Up @@ -859,6 +853,14 @@ def generate_Ramp(self, dlc_options):
else: # default
dlc_options['yaw_misalign'] = [0]

# Check options
if 'ramp_speeddelta' not in dlc_options:
raise Exception('ramp_speeddelta must be set for the Ramp DLC')
if 'ramp_duration' not in dlc_options:
raise Exception('ramp_duration must be set for the Ramp DLC')
if dlc_options['ramp_duration'] > dlc_options['analysis_time']:
raise Exception('ramp_duration must be smaller than analysis_time')

# DLC-specific: define groups
# These options should be the same length and we will generate a matrix of all cases
generic_case_inputs = []
Expand Down

0 comments on commit e5697d8

Please sign in to comment.