Skip to content

Commit

Permalink
DLC: Add yaw error as an option for fault cases
Browse files Browse the repository at this point in the history
  • Loading branch information
abhineet-gupta committed Oct 27, 2024
1 parent b547d48 commit 8537c13
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions weis/dlc_driver/dlc_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@

logger = logging.getLogger("wisdem/weis")






class DLCInstance(object):

def __init__(self, options=None):
Expand Down Expand Up @@ -127,14 +122,15 @@ class DLCGenerator(object):
("ServoDyn","BlPitchF(3)"),

],

'pitchfault_time1': ("ServoDyn","TPitManS1"),
'pitchfault_time2': ("ServoDyn","TPitManS2"),
'pitchfault_time3': ("ServoDyn","TPitManS3"),
'pitchfault_blade1': ("ServoDyn","BlPitchF(1)"),
'pitchfault_blade2': ("ServoDyn","BlPitchF(2)"),
'pitchfault_blade3': ("ServoDyn","BlPitchF(3)"),
'pitchfault_blade1pos': ("ServoDyn","BlPitchF(1)"),
'pitchfault_blade2pos': ("ServoDyn","BlPitchF(2)"),
'pitchfault_blade3pos': ("ServoDyn","BlPitchF(3)"),
'genfault_time': ("ServoDyn","TimGenOf"),
'yawfault_time': ("ServoDyn","TYawManS"),
'yawfault_yawpos': ("ServoDyn","NacYawF"),

'aero_mod': ("AeroDyn15","AFAeroMod"),
'wake_mod': ("AeroDyn15","WakeMod"),
Expand Down Expand Up @@ -778,11 +774,13 @@ def generate_2p1(self, dlc_options):
group0 = ['total_time','transient_time','wake_mod','wave_model']

if 'pitchfault_time1' in dlc_options:
group0.extend(['pitchfault_time1','pitchfault_blade1'])
group0.extend(['pitchfault_time1','pitchfault_blade1pos'])
if 'pitchfault_time2' in dlc_options:
group0.extend(['pitchfault_time2','pitchfault_blade2'])
group0.extend(['pitchfault_time2','pitchfault_blade2pos'])
if 'pitchfault_time3' in dlc_options:
group0.extend(['pitchfault_time3','pitchfault_blade3'])
group0.extend(['pitchfault_time3','pitchfault_blade3pos'])
if 'yawfault_time' in dlc_options:
group0.extend(['yawfault_time','yawfault_yawpos'])
if 'genfault_time' in dlc_options:
group0.extend(['genfault_time'])

Expand Down Expand Up @@ -1095,13 +1093,15 @@ def generate_7p1(self, dlc_options):
'rot_speed_initial','shutdown_time','final_blade_pitch'] # group 0, (usually constants) turbine variables, DT, aero_modeling

if 'pitchfault_time1' in dlc_options:
group0.extend(['pitchfault_time1','pitchfault_blade1'])
group0.extend(['pitchfault_time1','pitchfault_blade1pos'])
if 'pitchfault_time2' in dlc_options:
group0.extend(['pitchfault_time2','pitchfault_blade2'])
group0.extend(['pitchfault_time2','pitchfault_blade2pos'])
if 'pitchfault_time3' in dlc_options:
group0.extend(['pitchfault_time3','pitchfault_blade3'])
group0.extend(['pitchfault_time3','pitchfault_blade3pos'])
if 'yawfault_time' in dlc_options:
group0.extend(['yawfault_time','yawfault_yawpos'])
if 'genfault_time' in dlc_options:
group0.extend(['genfault_time'])
group0.extend(['genfault_time'])

generic_case_inputs.append(group0)
generic_case_inputs.append(['wind_speed','wave_height','wave_period', 'wind_seed', 'wave_seed']) # group 1, initial conditions will be added here, define some method that maps wind speed to ICs and add those variables to this group
Expand Down

0 comments on commit 8537c13

Please sign in to comment.