Skip to content

Commit

Permalink
Add initial condition option for ramp dlc and add some ramp dlcs in e…
Browse files Browse the repository at this point in the history
…xample 19
  • Loading branch information
abhineet-gupta committed Jan 16, 2025
1 parent 5e4ed8e commit fc03532
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 19 deletions.
59 changes: 41 additions & 18 deletions examples/19_controller_test_bench/testbench_options.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
General:
openfast_configuration:
save_iterations: True
save_timeseries: True

Testbench_Options:
output_directory: outputs/9_test_ramp # relative to this file
output_filebase: testbench
Expand Down Expand Up @@ -56,22 +61,40 @@ DLC_driver:
- DLC: "AEP"
TI_factor: 0.5
wind_speed: [12]
- DLC: "Ramp" # Up
- DLC: "Ramp" # 0 to cutin+1
turbine_status: parked-still
wind_speed: [0]
transient_time: 20
analysis_time: 200.
ramp_speeddelta: 6
ramp_duration: 200.
rot_speed_initial: 0
pitch_initial: 90
- DLC: "Ramp" # Cutin-1 to cutin+1
turbine_status: parked-still
wind_speed: [4]
transient_time: 20
analysis_time: 200.
ramp_speeddelta: 2
ramp_duration: 200.
rot_speed_initial: 0
pitch_initial: 90
- DLC: "Ramp" # Cutin to rated
wind_speed: [5]
analysis_time: 1000.
ramp_speeddelta: 20
ramp_duration: 1000.
- DLC: "Ramp" # Down
wind_speed: [25]
analysis_time: 1000.
ramp_speeddelta: -20
ramp_duration: 1000.
- DLC: "Step" # Down
wind_speed: [18]
analysis_time: 100.
step_speeddelta: 2.0
step_time: 50.0
# - DLC: "Steady"
# wind_speed: [8]
# analysis_time: 10.
# transient_time: 5.0
transient_time: 20
analysis_time: 200.
ramp_speeddelta: 6.4
ramp_duration: 200.
- DLC: "Ramp" # Rated-2 to rated+2
wind_speed: [9.4]
transient_time: 20
analysis_time: 400.
ramp_speeddelta: 13.4
ramp_duration: 400.
- DLC: "Ramp" # Rated to Cutout + 2
wind_speed: [11.4]
transient_time: 20
analysis_time: 400.
ramp_speeddelta: 27
ramp_duration: 400.

13 changes: 12 additions & 1 deletion weis/dlc_driver/dlc_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,10 +870,21 @@ def generate_Ramp(self, dlc_options):
else:
dlc_options['gust_wait_time'] = 0

generic_case_inputs = []

# Add initial conditions
# Note that for initial conditions to not be overwritten, turbine_status should be parked (still or idling)
group0 = ['total_time','transient_time','wake_mod','wave_model']
if 'pitch_initial' in dlc_options:
group0.extend(['pitch_initial'])
if 'rot_speed_initial' in dlc_options:
group0.extend(['rot_speed_initial'])


# DLC-specific: define groups
# These options should be the same length and we will generate a matrix of all cases
generic_case_inputs = []
generic_case_inputs.append(['total_time','transient_time','wake_mod','wave_model']) # group 0, (usually constants) turbine variables, DT, aero_modeling
generic_case_inputs.append(group0) # group 0, (usually constants) turbine variables, DT, aero_modeling
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
generic_case_inputs.append(['yaw_misalign']) # group 2

Expand Down

0 comments on commit fc03532

Please sign in to comment.