Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass through #136

Merged
merged 97 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
9646dbd
Merge pull request #90 from NREL/develop
nikhar-abbas Nov 10, 2021
337ecf6
Convert WE saved variables to WE type
nikhar-abbas Dec 17, 2021
ab46545
Put restart flag in localvars
nikhar-abbas Dec 17, 2021
9d67547
Use saved filter params from LocalVar
nikhar-abbas Dec 17, 2021
ed81a23
save pitcomt last
nikhar-abbas Dec 17, 2021
3bbaf86
Move IPC saved variables to localvars
nikhar-abbas Dec 17, 2021
30e98d6
Saved pi controller variables to localvar
nikhar-abbas Dec 17, 2021
38dff08
Save RootMyb_Last to localvar
nikhar-abbas Dec 17, 2021
fc1c9ec
ROSCO_IO - initial commit. Include restart and debug functions
nikhar-abbas Dec 17, 2021
2025565
Use ROSCO IO and call restart functions
nikhar-abbas Dec 17, 2021
915922a
Remove debug from function.f90
nikhar-abbas Dec 17, 2021
6800344
Save ACC Infile info
nikhar-abbas Dec 17, 2021
92e27bb
update for restart capabilities
nikhar-abbas Dec 17, 2021
3ff3800
add rosco_io with restart and debug functions
nikhar-abbas Dec 21, 2021
15eb73d
cleanup debug call
nikhar-abbas Dec 21, 2021
5e2eb07
use registry generate types and IO
nikhar-abbas Dec 21, 2021
24fa6b7
delete DFController
nikhar-abbas Dec 21, 2021
9149b12
fix timestep mismatch
nikhar-abbas Dec 21, 2021
3c9c89d
remove unnecessaray istatus check
nikhar-abbas Dec 21, 2021
492348c
close files
nikhar-abbas Dec 21, 2021
7897a83
add reg test for restart
nikhar-abbas Dec 21, 2021
969beb6
add restart option to run_openfast
nikhar-abbas Dec 21, 2021
ace827d
add testing to CI, ignore generate files
nikhar-abbas Dec 21, 2021
1347767
fix fastcall
nikhar-abbas Dec 21, 2021
67ada29
remove extra commas
nikhar-abbas Dec 21, 2021
4c31544
specify gfortran-10
nikhar-abbas Dec 21, 2021
6f29556
testing flag cleanup
nikhar-abbas Dec 21, 2021
3e43206
Use lv_strings to generate debug output
dzalkind Dec 21, 2021
b1607e0
Revert "testing flag cleanup"
nikhar-abbas Dec 21, 2021
24e5daf
Revert "specify gfortran-10"
nikhar-abbas Dec 21, 2021
76caca3
minor cleanup
nikhar-abbas Dec 21, 2021
4b6041a
Use kind from constants
nikhar-abbas Dec 22, 2021
878b143
Add some comments for clarity
nikhar-abbas Dec 22, 2021
59519a1
put debug in if statements
nikhar-abbas Dec 22, 2021
8749713
separate reg tests from oother tests
nikhar-abbas Dec 22, 2021
b5ac62d
Fl_Mode>0
nikhar-abbas Dec 22, 2021
3fdbdad
Remove hard coded values
nikhar-abbas Dec 22, 2021
52492d3
Add filtered signals and WE_Vw to debug varrs
nikhar-abbas Dec 22, 2021
7cb1151
cd for regtest
nikhar-abbas Dec 22, 2021
a2d6de4
Check logging level before calling debug
nikhar-abbas Dec 22, 2021
2ab7de6
add fl_pitcom and pc_minpit to debugvars
nikhar-abbas Dec 22, 2021
1f68bd5
Turn runFAST into a class
dzalkind Dec 22, 2021
1b0b1c3
Refactor/simplify CaseLibrary
dzalkind Dec 22, 2021
7fec13b
Implement initial pitch actuator
dzalkind Jan 5, 2022
a034086
Set up steps case
dzalkind Jan 5, 2022
3d696e6
Add actuator variable
dzalkind Jan 7, 2022
7042b49
Print first time step in debug outs
dzalkind Jan 7, 2022
8c7949e
Fix FOCAL yaml
dzalkind Jan 7, 2022
1a0e59a
Set actuator to 0.25 Hz bandwidth
dzalkind Jan 7, 2022
ad15bcd
ROSCO 2.5.0 (#115)
dzalkind Apr 1, 2022
5d20185
Fixed wrong formatting of list items (#122)
ghylander Apr 5, 2022
f53a49e
Merge remote-tracking branch 'upstream/main' into develop
dzalkind Apr 7, 2022
31d7250
Merge branch 'develop' into f/pitch_act
dzalkind Apr 7, 2022
eab381a
Regenerate types, IO with registry
dzalkind Apr 7, 2022
ad36ab9
Update registry so first timestep is printed
dzalkind Apr 7, 2022
d15bc7c
Update inverted notch to move frequency properly
dzalkind Apr 8, 2022
5a9b44d
Saturate inv notch corner frequency at 0
dzalkind Apr 8, 2022
a898f9d
Add tower damper mode flag
dzalkind Apr 14, 2022
c965339
Add Azimuth tracking controller in Simulink
dzalkind Apr 22, 2022
bdbc940
Always enable GenDOF, add options for simp_step
dzalkind Apr 22, 2022
6bb9c6b
Add sweep for IPC gains and FA damper
dzalkind Apr 22, 2022
c2ec84d
Fix NumCoords in FAST_writer
dzalkind Apr 22, 2022
97aae35
Add turbulent case to runFAST/CaseLibrary
dzalkind Apr 25, 2022
899750a
Merge remote-tracking branch 'upstream/develop' into raaw
dzalkind Apr 25, 2022
2ab0190
Add peak shaving sweep function
dzalkind Apr 26, 2022
e33631d
Increase default IPC_IntSat, make input parameter in future
dzalkind Apr 26, 2022
77278f5
Flip Ct and Cq table allocation (#129)
dzalkind Apr 27, 2022
1b00cca
Flip Ct and Cq table allocation
dzalkind Apr 26, 2022
3f059d1
Merge remote-tracking branch 'origin/develop' into f/pitch_act
dzalkind Apr 27, 2022
379b6d2
Regen types
dzalkind Apr 27, 2022
747fcaa
Remove print statements used for debugging
dzalkind Apr 27, 2022
bba2816
Update input files: IEA model has pitch actuator
dzalkind Apr 27, 2022
5db820e
Merge branch 'develop' into f/pitch_act
dzalkind Apr 29, 2022
5612797
Merge remote-tracking branch 'origin/f/pitch_act' into f/pitch_act
dzalkind Apr 29, 2022
f6643b9
Add back flap control (no idea when it was deleted)
dzalkind Apr 29, 2022
7051a99
Update discons, docs with API change
dzalkind Apr 29, 2022
0eff188
Merge branch 'f/pitch_act' into raaw
dzalkind May 2, 2022
1ff7c11
Add user-defined hh case
dzalkind May 3, 2022
d8724f4
Fix AddF0 and RayleighDamp in FAST_reader
dzalkind May 4, 2022
155c132
Merge remote-tracking branch 'upstream/main' into raaw
dzalkind May 10, 2022
fc44a4a
Merge remote-tracking branch 'upstream/develop' into raaw
dzalkind May 10, 2022
f4094ea
Add max_torque_factor for constant power control, flexible upper limit
dzalkind May 11, 2022
f8c1dbe
Make update discons relative to tuning yaml
dzalkind May 11, 2022
97e2fe7
Update AddF0 and NumCoords in FAST_reader/writer
dzalkind May 11, 2022
e2bca61
Remove matlab/rotor position control stuff
dzalkind May 13, 2022
d128bb3
Add initial DISCON pass through schema
dzalkind May 17, 2022
2072532
Add TODO items for pull requests
dzalkind May 17, 2022
f140f6b
Add initial pass through capability, example
dzalkind May 17, 2022
7d3c2af
Add PassThrough example yaml
dzalkind May 17, 2022
bfc788b
Make cp filename relative to FAST_directory throughout
dzalkind May 17, 2022
6dd9f20
Remove brackets, regen input docs
dzalkind May 18, 2022
6e0d0f3
Add to PassThrough example yaml
dzalkind May 18, 2022
dbf1e83
Add example 15 to testing, fix yaml
dzalkind May 18, 2022
739d70e
Tidy comments in CaseLibrary
dzalkind May 20, 2022
3b97e4c
Merge remote-tracking branch 'upstream/develop' into raaw
dzalkind May 20, 2022
0711318
Merge remote-tracking branch 'upstream/develop' into pass_through
dzalkind May 20, 2022
29605a1
Merge branch 'raaw' into pass_through
dzalkind May 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ _Select the appropriate type(s) that describe this PR_
- [ ] Maintenance update
- [ ] Other (please describe)

TODO Items General:
- [ ] Add example/test for new feature
- [ ] Update registry
- [ ] Run testing

TODO Items API Change:
- [ ] Update docs with API change
- [ ] Run update_discons.py
- [ ] Update DISCON schema

## Github issues addressed, if one exists

## Examples/Testing, if applicable
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
path_params['FAST_InputFile'],
os.path.join(tune_dir,path_params['FAST_directory']),
dev_branch=True,
rot_source='txt',txt_filename=os.path.join(tune_dir,path_params['rotor_performance_filename'])
rot_source='txt',txt_filename=os.path.join(tune_dir,path_params['FAST_directory'],path_params['rotor_performance_filename'])
)

# Print some basic turbine info
Expand Down
8 changes: 6 additions & 2 deletions Examples/example_04.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,23 @@
controller = ROSCO_controller.Controller(controller_params)

# Load turbine data from OpenFAST and rotor performance text file
cp_filename = os.path.join(tune_dir,path_params['FAST_directory'],path_params['rotor_performance_filename'])
turbine.load_from_fast(
path_params['FAST_InputFile'],
os.path.join(tune_dir,path_params['FAST_directory']),
dev_branch=True,
rot_source='txt',txt_filename=os.path.join(tune_dir,path_params['rotor_performance_filename'])
rot_source='txt',txt_filename= cp_filename
)

# Tune controller
controller.tune_controller(turbine)

# Write parameter input file
param_file = os.path.join(this_dir,'DISCON.IN')
write_DISCON(turbine,controller,param_file=param_file, txt_filename=os.path.join(tune_dir,path_params['rotor_performance_filename']))
write_DISCON(turbine,controller,
param_file=param_file,
txt_filename=cp_filename
)

# Plot gain schedule
fig, ax = plt.subplots(2,2,constrained_layout=True,sharex=True)
Expand Down
9 changes: 7 additions & 2 deletions Examples/example_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@
# controller = ROSCO_controller.Controller(controller_params)

# Load turbine data from OpenFAST and rotor performance text file
cp_filename = os.path.join(tune_dir,path_params['FAST_directory'],path_params['rotor_performance_filename'])
turbine.load_from_fast(
path_params['FAST_InputFile'],
os.path.join(tune_dir,path_params['FAST_directory']),
dev_branch=True,
rot_source='txt',txt_filename=os.path.join(tune_dir,path_params['rotor_performance_filename'])
rot_source='txt',txt_filename=cp_filename
)

# Tune controller
Expand All @@ -68,7 +69,11 @@

# Write parameter input file
param_filename = os.path.join(this_dir,'DISCON.IN')
write_DISCON(turbine,controller,param_file=param_filename, txt_filename=os.path.join(tune_dir,path_params['rotor_performance_filename']))
write_DISCON(
turbine,controller,
param_file=param_filename,
txt_filename=cp_filename
)


# Load controller library
Expand Down
2 changes: 1 addition & 1 deletion Examples/example_07.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
path_params['FAST_InputFile'],
os.path.join(tune_dir,path_params['FAST_directory']),
dev_branch=True,
rot_source='txt',txt_filename=os.path.join(tune_dir,path_params['rotor_performance_filename'])
rot_source='txt',txt_filename=os.path.join(tune_dir,path_params['FAST_directory'],path_params['rotor_performance_filename'])
)
# Tune controller
controller.tune_controller(turbine)
Expand Down
1 change: 0 additions & 1 deletion Examples/example_10.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

# Load turbine data from openfast model
turbine = ROSCO_turbine.Turbine(turbine_params)
# turbine.load_from_fast(path_params['FAST_InputFile'],path_params['FAST_directory'],dev_branch=True,rot_source='txt',txt_filename=path_params['rotor_performance_filename'])
turbine.load_from_fast(path_params['FAST_InputFile'], \
os.path.join(this_dir,path_params['FAST_directory']),dev_branch=True)

Expand Down
2 changes: 1 addition & 1 deletion Examples/example_11.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
os.path.join(this_dir,path_params['FAST_directory']),
dev_branch=True,
rot_source='txt',
txt_filename=os.path.join(tune_dir,path_params['rotor_performance_filename'])
txt_filename=os.path.join(tune_dir,path_params['FAST_directory'],path_params['rotor_performance_filename'])
)

# Tune controller
Expand Down
47 changes: 47 additions & 0 deletions Examples/example_15.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
'''
----------- Example_15 --------------
Use the runFAST scripts to set up an example, use pass through in yaml
-------------------------------------

In this example:
- use run_FAST_ROSCO class to set up a test case

'''

import os
from ROSCO_toolbox.ofTools.case_gen.run_FAST import run_FAST_ROSCO
from ROSCO_toolbox.ofTools.case_gen import CaseLibrary as cl


#directories
this_dir = os.path.dirname(os.path.abspath(__file__))
rosco_dir = os.path.dirname(this_dir)
example_out_dir = os.path.join(this_dir,'examples_out')
os.makedirs(example_out_dir,exist_ok=True)


def main():
# Simulation config
sim_config = 7

r = run_FAST_ROSCO()

parameter_filename = os.path.join(rosco_dir,'Tune_Cases/NREL5MW_PassThrough.yaml')
run_dir = os.path.join(example_out_dir,'15_PassThrough')
os.makedirs(run_dir,exist_ok=True)

# RAAW FAD set up
r.tuning_yaml = parameter_filename
r.wind_case_fcn = cl.simp_step
r.wind_case_opts = {
'U_start': [10],
'U_end': [15],
'wind_dir': run_dir
}
r.save_dir = run_dir

r.run_FAST()


if __name__=="__main__":
main()
3 changes: 2 additions & 1 deletion Examples/run_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
'example_11',
'example_12',
'example_13',
'example_14'
'example_14',
'example_15',
]

def execute_script(fscript):
Expand Down
Loading