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

Update Main #37

Merged
merged 244 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
244 commits
Select commit Hold shift + click to select a range
913482a
Merge remote-tracking branch 'dzalkind/master' into f/testing
nikhar-abbas Jul 10, 2020
b94be5b
Update test cases
nikhar-abbas Jul 14, 2020
301a7a3
Create testing suite init
nikhar-abbas Jul 14, 2020
5e05be9
ROSCO testing as class, rename file
nikhar-abbas Jul 14, 2020
bf2a441
6 minute test time for lite testing
nikhar-abbas Jul 14, 2020
078e35f
clean up filepaths
nikhar-abbas Jul 14, 2020
6e6bb66
properly pass desired output channels
nikhar-abbas Jul 14, 2020
edb341f
error handling bug fixes
nikhar-abbas Jul 14, 2020
52b2406
Run Testing - initial commit
nikhar-abbas Jul 14, 2020
c635f7d
Move output variables to init
nikhar-abbas Jul 21, 2020
707e898
Typo
nikhar-abbas Jul 21, 2020
2bf1888
load binaries
ptrbortolotti Aug 6, 2020
446186d
fix previous commit
ptrbortolotti Aug 6, 2020
4d43650
fix previous commit with channel names
ptrbortolotti Aug 6, 2020
571baad
Merge branch 'develop' of https://github.com/NREL/ROSCO_toolbox into …
ptrbortolotti Aug 17, 2020
8c86a3b
Hardcode debug outname
nikhar-abbas Aug 28, 2020
bb91651
Rename license file
nikhar-abbas Jul 15, 2020
8ff621f
Update submodule
nikhar-abbas Jul 15, 2020
637c3a1
Increment version
nikhar-abbas Jul 15, 2020
2866ebd
Update ROSCO test, add to gitignore
dzalkind Jul 15, 2020
b29d62b
Add ROSCO Simulink Model and simple Matlab/Simulink run case
dzalkind Jul 15, 2020
4eb6466
Update ROSCO pointer
dzalkind Jul 15, 2020
3da66f1
Fix some Simulink initial condition issues
dzalkind Jul 20, 2020
077b8d5
Create README.md
dzalkind Jul 20, 2020
0a03336
Revert examples 6 and 8
dzalkind Jul 20, 2020
4159ba5
Update Pl_FastPlots.m
nikhar-abbas Jul 21, 2020
057de6d
Add checks for optional input files
nikhar-abbas Jul 21, 2020
3eb2b90
Load times from input files
nikhar-abbas Jul 21, 2020
f1de571
formatting
nikhar-abbas Jul 21, 2020
b6d4324
Dump outdata to structure and plot
nikhar-abbas Jul 21, 2020
2937b19
Delete old files
nikhar-abbas Jul 21, 2020
616bf27
readthedocs - initial commit
nikhar-abbas Aug 4, 2020
6e2be5a
Update project info
nikhar-abbas Aug 4, 2020
644861c
Compiling and DISCON generation - initial commit
nikhar-abbas Aug 4, 2020
dfc9c2a
Standard use descriptions
nikhar-abbas Aug 4, 2020
494a7ab
master doc as index
nikhar-abbas Aug 4, 2020
ac712ba
move scripts to source folder, typos fixes, cleanup
nikhar-abbas Aug 4, 2020
d0ee3cd
Update requirements
nikhar-abbas Aug 4, 2020
4892573
typo fixes
nikhar-abbas Aug 4, 2020
187c2e1
Minimum pitch setting minor bug fix
nikhar-abbas Aug 5, 2020
b946e20
Check for spectral in WISDEM
nikhar-abbas Aug 5, 2020
37a4a8b
More minimum pitch bug fixes
nikhar-abbas Aug 5, 2020
0653114
Increment version
nikhar-abbas Aug 5, 2020
46c42f8
Remove GBoxEff from rated torque
nikhar-abbas Aug 7, 2020
5d61c3c
Increment version
nikhar-abbas Aug 7, 2020
bd39933
ROSCO testing as class, rename file
nikhar-abbas Jul 14, 2020
17fbb65
Delete old test case run script
nikhar-abbas Aug 10, 2020
1c4650b
check for ROSCO path
nikhar-abbas Aug 19, 2020
12fbbd0
update path
nikhar-abbas Aug 19, 2020
b1fe191
Optional wind speed, TMax inputs
nikhar-abbas Aug 19, 2020
954ef1e
load binaries
ptrbortolotti Aug 6, 2020
457a725
fix previous commit
ptrbortolotti Aug 6, 2020
fbb5cbc
fix previous commit with channel names
ptrbortolotti Aug 6, 2020
d95631a
Update test cases
nikhar-abbas Jul 14, 2020
8d4b222
Create testing suite init
nikhar-abbas Jul 14, 2020
f402ff3
ROSCO testing as class, rename file
nikhar-abbas Jul 14, 2020
cf2c47b
6 minute test time for lite testing
nikhar-abbas Jul 14, 2020
ea8e9c0
clean up filepaths
nikhar-abbas Jul 14, 2020
0643792
properly pass desired output channels
nikhar-abbas Jul 14, 2020
686c8b0
error handling bug fixes
nikhar-abbas Jul 14, 2020
f53685e
Run Testing - initial commit
nikhar-abbas Jul 14, 2020
30c5d3c
Move output variables to init
nikhar-abbas Jul 21, 2020
a60e24e
Typo
nikhar-abbas Jul 21, 2020
eb8be72
Update ROSCO test, add to gitignore
dzalkind Jul 15, 2020
ffe3635
Update ROSCO pointer
dzalkind Jul 15, 2020
9c4db81
ROSCO testing as class, rename file
nikhar-abbas Jul 14, 2020
ec4c061
Delete old test case run script
nikhar-abbas Aug 10, 2020
75b9f48
check for ROSCO path
nikhar-abbas Aug 19, 2020
b48b9e2
update path
nikhar-abbas Aug 19, 2020
b6aa912
Optional wind speed, TMax inputs
nikhar-abbas Aug 19, 2020
b16aba3
Update ROSCO pointer
dzalkind Jul 15, 2020
f5b67db
load aeroelasticse from weis
nikhar-abbas Sep 22, 2020
23e44ea
Remove old testing script
nikhar-abbas Sep 25, 2020
3554fd7
Move testing to function for parallel processing, include __main__
nikhar-abbas Sep 25, 2020
7e8f0b1
Updates and cleanup for flexibility, include example in __main__
nikhar-abbas Sep 25, 2020
aa8a5f6
Update IEA-15MW model
nikhar-abbas Sep 25, 2020
7111606
Update Model
nikhar-abbas Sep 25, 2020
59a9cb1
change tmax to 330 in lite testing
nikhar-abbas Sep 25, 2020
41efacb
ROSCO testing as class, rename file
nikhar-abbas Jul 14, 2020
320d059
Pass IPC gains to DISCON.IN
nikhar-abbas Aug 27, 2020
27de7f1
Fix run dir for heavy testing
nikhar-abbas Sep 28, 2020
65d1870
Cleaner parameter surface plotting
nikhar-abbas Sep 28, 2020
4fcf73d
Move all blade parameter processing to load_blade_info
nikhar-abbas Sep 28, 2020
ac48684
Update paths and turbine
nikhar-abbas Sep 28, 2020
3e33f39
Clean up plotting function
nikhar-abbas Sep 28, 2020
8e05d67
make load_fast_out lowercase for consistency with plot_fast_out
nikhar-abbas Sep 28, 2020
57bd9fc
Update examples for newer models and test turbines
nikhar-abbas Sep 28, 2020
b6a6f87
Bug fixes for multiple airfoil tables
nikhar-abbas Sep 28, 2020
41034bc
Update for more modern numpy
nikhar-abbas Sep 28, 2020
0a40856
Update path
nikhar-abbas Sep 28, 2020
d6990d1
Add weis_dir to env variables in readme, update binary dir paths,
dzalkind Sep 29, 2020
4d4b7f9
Add GenSpeed to testing channels, run pCrunch in serial with only 1 core
dzalkind Sep 30, 2020
dac8177
Add waves to heavy testing
dzalkind Sep 30, 2020
9efb2ab
Set t0 = 100 to eliminate startup transients from analysis
dzalkind Sep 30, 2020
2040a26
shift max cp print out
nikhar-abbas Oct 8, 2020
bda9c55
Update ServoDyn params to prevent generator shutoff
nikhar-abbas Oct 8, 2020
9119b43
Merge branch 'f/testing' into weis
nikhar-abbas Oct 8, 2020
e6c7ca0
delete test_ROSCO.py
nikhar-abbas Oct 8, 2020
407931c
Force ccblade call
nikhar-abbas Oct 8, 2020
ec9336b
restructure plotting
nikhar-abbas Oct 8, 2020
3add3be
restructure load_blade_info call
nikhar-abbas Oct 8, 2020
2959a81
updatt openfast call
nikhar-abbas Oct 8, 2020
bca7e5f
remove hardcoded paths
nikhar-abbas Oct 8, 2020
6820d29
point to compiled rosco in rosco toolbox
nikhar-abbas Oct 8, 2020
0fa56ae
remove hardcoded paths
nikhar-abbas Oct 8, 2020
0c5fada
Update for v2.1.1
nikhar-abbas Oct 8, 2020
e33ec92
Saturate below rated TSR by rated rotor speed
nikhar-abbas Oct 29, 2020
a2ed63b
Fix bugs in DISCON testing
nikhar-abbas Nov 5, 2020
128488e
Merge branch 'weis' of https://github.com/nikhar-abbas/ROSCO_toolbox …
nikhar-abbas Nov 5, 2020
9ea2e13
Merge pull request #21 from nikhar-abbas/weis
dzalkind Nov 6, 2020
d6e7157
OpenFAST tools (aeroelasticse) initial commit
nikhar-abbas Nov 6, 2020
3c8ae31
remove weis dependencies
nikhar-abbas Nov 6, 2020
5d9ae83
Rename ofTools readme
nikhar-abbas Nov 6, 2020
06f4b28
comment cleanup
nikhar-abbas Nov 6, 2020
5689dbe
Check for conda-forge ROSCO distribution
nikhar-abbas Nov 6, 2020
b6295b3
Remove ROSCO submodule
nikhar-abbas Nov 6, 2020
47219d7
Restore ROSCO submodule, build it in setup.py
nikhar-abbas Nov 6, 2020
1854d89
Move fast output read and plot functions, remove class structure
nikhar-abbas Nov 9, 2020
fadd73f
load and plot fast outputs - initial commit
nikhar-abbas Nov 9, 2020
fbd8a72
Try for WISDEM master or dev versions of ccblade
nikhar-abbas Nov 9, 2020
12037fc
typo fix in comments
nikhar-abbas Nov 9, 2020
2069fcd
fix saturation points for gain schedule calculations
nikhar-abbas Nov 9, 2020
a54e898
cubic interpolation of Ct surface
nikhar-abbas Nov 9, 2020
2812c12
update comments
nikhar-abbas Nov 9, 2020
b599e3e
Update for restructured FAST i/o scripts
nikhar-abbas Nov 9, 2020
74e4771
Add descriptions of case_gen and fast_io capabilities
nikhar-abbas Nov 9, 2020
68aedc8
Add example 11
nikhar-abbas Nov 9, 2020
66432b7
rename to output_processing
nikhar-abbas Nov 9, 2020
1cee9d6
Add init options to output processing
nikhar-abbas Nov 9, 2020
f9ea5c6
remove ROSCO_utilities class structure
nikhar-abbas Nov 9, 2020
7c5ea21
Update for new install instructions
nikhar-abbas Nov 9, 2020
b2a3dd9
Merge remote-tracking branch 'upstream/develop' into refactor
nikhar-abbas Nov 9, 2020
a8a616a
remove repeted comment
nikhar-abbas Nov 10, 2020
be59f68
cleanup
nikhar-abbas Nov 12, 2020
0f5a8df
Update for ROSCO on windows
nikhar-abbas Nov 12, 2020
45ceb01
Fix ROSCO compiling bugs on windows
Nov 13, 2020
21acfd6
remove multiprocessing
Nov 13, 2020
f9e356a
add compiler install instructions
Nov 13, 2020
873108c
add init
nikhar-abbas Nov 13, 2020
abf83fc
Remove wisdem import
nikhar-abbas Nov 13, 2020
578de15
Only load ccblade if needed
nikhar-abbas Nov 13, 2020
0c71cef
Run examples from anywhere: 01-04
dzalkind Nov 18, 2020
28c249d
Increment major version, fix name
dzalkind Nov 18, 2020
7b5d46e
Merge remote-tracking branch 'nja/refactor' into refactor
dzalkind Nov 18, 2020
cb49073
Run examples from anywhere: 05-11
dzalkind Nov 18, 2020
a440623
Include BAR Model w/ Flaps
nikhar-abbas Dec 4, 2020
4f772cd
Change tuning precision
nikhar-abbas Dec 4, 2020
6b06077
Merge remote-tracking branch 'nja/refactor' into refactor
dzalkind Dec 4, 2020
1127b63
Take out pCrunch dependency and post processing, pp elsewhere
dzalkind Nov 18, 2020
57c51e5
Remove pCrunch dependency on ROSCO testing
dzalkind Dec 4, 2020
9f4e962
Updated walkthrough for latest modules
dzalkind Dec 4, 2020
e5a78b8
Update examples for running anywhere
dzalkind Dec 17, 2020
f1d06f2
Point to correct ccblade import, fix plot_performance max point
dzalkind Dec 17, 2020
dd39060
Merge pull request #22 from nikhar-abbas/refactor
dzalkind Dec 17, 2020
3aab5c8
Update tune_ROSCO.py script
dzalkind Dec 18, 2020
7cd186c
Move ofTools into ROSCO_toolbox folder for consistency
dzalkind Jan 6, 2021
9540362
Update ofTools imports
dzalkind Jan 6, 2021
3faadab
Add matlab scripts for running simulations
dzalkind Jan 6, 2021
f0355dd
Add temp simulink/matlab files to gitignore
dzalkind Jan 6, 2021
39aa822
Re-organize matlab scripts: remove Utilities from Matlab-Toolbox
dzalkind Jan 6, 2021
3f3ce49
Update simulink test case for OpenFAST 2.4.0, streamline inputs
dzalkind Jan 6, 2021
84c6aa7
Add ElastoDyn sensor channels for simulink simulations
dzalkind Jan 6, 2021
5940292
Update README.md
dzalkind Jan 6, 2021
af600fd
Set floating Kp based on v_rated + 0.5 m/s, not index
dzalkind Jan 6, 2021
ff4ec14
Merge pull request #27 from NREL/simulink
nikhar-abbas Jan 11, 2021
aa50b66
Merge remote-tracking branch 'upstream/develop' into develop
dzalkind Feb 1, 2021
68fc918
Add ROSCO_toolbox version to DISCON.IN header
dzalkind Feb 1, 2021
639a23f
Update ofTools for OpenFAST 2.5.0
dzalkind Feb 2, 2021
b492424
Update examples, testing for conda-installed openfast call
dzalkind Feb 2, 2021
607d07e
Update Test_Cases/ for OpenFAST 2.5.0
dzalkind Feb 2, 2021
65620c1
Merge pull request #26 from dzalkind/move_oftools
nikhar-abbas Feb 3, 2021
29e37cb
Merge remote-tracking branch 'upstream/develop' into openfast_250
dzalkind Feb 3, 2021
9b13daa
ignore compiled files
nikhar-abbas Nov 20, 2020
9b00496
cmake build directory in ROSCO folder
nikhar-abbas Nov 20, 2020
488d563
include --install-rosco flag
nikhar-abbas Nov 20, 2020
ff42543
Update readme for ROSCO install instructions
nikhar-abbas Nov 20, 2020
529183c
Update submodule branch
nikhar-abbas Feb 3, 2021
32a5f9d
install-rosco -> compile-rosco
nikhar-abbas Nov 20, 2020
8309615
Change Kp_float to interpolate at 5% above rated
dzalkind Feb 3, 2021
59a1464
initial commit
nikhar-abbas Feb 4, 2021
ebc4dd2
remove old docs
nikhar-abbas Feb 4, 2021
54ffd6f
update themes
nikhar-abbas Feb 4, 2021
268581c
Edit for new docs format
nikhar-abbas Feb 4, 2021
b6235f9
Add sphinx_rtd_theme
nikhar-abbas Feb 4, 2021
33b7a03
Fix cross references
nikhar-abbas Feb 4, 2021
78b274e
Include workflow image
nikhar-abbas Feb 4, 2021
63d4d48
Remove old architecture images
nikhar-abbas Feb 4, 2021
cabcd34
Cleanup for readthedocs
nikhar-abbas Feb 4, 2021
1c5c363
Some placeholder info
nikhar-abbas Feb 4, 2021
e9c56eb
Update Version
nikhar-abbas Feb 4, 2021
6ef5d52
Define windspeeds by 30 pts, not windspeed increments
nikhar-abbas Feb 5, 2021
f072f2e
Use generic full file paths
nikhar-abbas Feb 5, 2021
f516eb1
Updated example outputs
nikhar-abbas Feb 5, 2021
4a76068
Fix indexing
nikhar-abbas Feb 5, 2021
6742026
fix version number
nikhar-abbas Feb 5, 2021
08c9ae7
Merge pull request #31 from dzalkind/openfast_250
nikhar-abbas Feb 5, 2021
bd13c02
Merge pull request #32 from nikhar-abbas/f/compiling
nikhar-abbas Feb 5, 2021
ed019eb
Add significant digits to wind speed lookup tables
dzalkind Dec 22, 2020
df28b09
fix units in write_DISCON
nikhar-abbas Nov 20, 2020
c8e3f77
Merge pull request #34 from nikhar-abbas/f/DISCON_cleanup
nikhar-abbas Feb 5, 2021
86fadcb
Add units for system poles
nikhar-abbas Nov 20, 2020
d58d1ac
remove 0.7 from flpwise damping conversion
nikhar-abbas Jan 26, 2021
3257995
write kappa to self
nikhar-abbas Jan 26, 2021
7a26d5f
Merge pull request #35 from nikhar-abbas/f/flp_updates
nikhar-abbas Feb 5, 2021
6c2c37e
Move outputs of examples to folder
dzalkind Feb 9, 2021
7d181e6
Make pitch control GS points equal to where it's sampled
dzalkind Feb 9, 2021
b7439ad
Move example 08 output to folder
dzalkind Feb 9, 2021
3707cfe
Update example DISCON
dzalkind Feb 9, 2021
6497b50
Make IEA-15MW test in example 06 longer
dzalkind Feb 9, 2021
4c00d6b
Add run_examples script for doing that
dzalkind Feb 9, 2021
a916119
Separate examples into individual tests
dzalkind Feb 9, 2021
0e17b73
Merge pull request #36 from dzalkind/f/auto_test
nikhar-abbas Feb 9, 2021
d4e46ff
Add draft of workflow/standard use
dzalkind Feb 19, 2021
2825f74
Add mingw, fix capitalization
nikhar-abbas Feb 20, 2021
112b960
ROSCO toolbox specific intructions - initial commit
nikhar-abbas Feb 20, 2021
5a3db3e
Add ROSCO toolbox instruction to contents
nikhar-abbas Feb 20, 2021
0952950
Merge branch 'f/docs' of https://github.com/NREL/ROSCO_toolbox into f…
nikhar-abbas Feb 20, 2021
788173f
typo fix
nikhar-abbas Feb 26, 2021
d1fee5a
Toctree update, formatting
nikhar-abbas Feb 26, 2021
5900d63
Add ROSCO inputs
nikhar-abbas Feb 26, 2021
667b2c1
Table formatting
nikhar-abbas Feb 26, 2021
b70ca27
Add ROSCO page
nikhar-abbas Feb 26, 2021
d1ba1f1
formatting
nikhar-abbas Feb 26, 2021
97b36e5
Merge remote-tracking branch 'upstream/develop' into f/docs
nikhar-abbas Feb 26, 2021
bf3b3fd
Merge pull request #33 from NREL/f/docs
nikhar-abbas Feb 26, 2021
fb1a122
Update simulink model input channel names, running
dzalkind Feb 26, 2021
764fae0
Merge remote-tracking branch 'upstream/develop' into develop
dzalkind Feb 26, 2021
0032cdc
Point submodule to main
dzalkind Mar 1, 2021
72bbaf8
Update version and names in __init__.py
dzalkind Mar 1, 2021
f466822
Point Test_Cases/ to ROSCO in install/lib
dzalkind Mar 1, 2021
08d6044
Break lines up for readability, minor edits, re-organize TOC
dzalkind Mar 1, 2021
53ed6f0
Revise documentation
dzalkind Mar 3, 2021
d647d0a
Revise documentation 2
dzalkind Mar 3, 2021
b3ab9c6
Update gitignore, DISCON example
dzalkind Mar 4, 2021
bb5a8e2
ROSCO install path bug fix
nikhar-abbas Mar 5, 2021
d0d4165
Merge pull request #38 from nikhar-abbas/develop
nikhar-abbas Mar 5, 2021
96ec34d
Update IEA-15MW Tune and Test Cases
dzalkind Mar 5, 2021
5469f16
Merge remote-tracking branch 'upstream/develop' into develop
dzalkind Mar 5, 2021
8cd8388
Fix paths, print outputs to pdf, add submit script
dzalkind Mar 5, 2021
6d6fa78
Merge branch 'develop' of https://github.com/NREL/ROSCO_toolbox into …
dzalkind Mar 5, 2021
1a5e9ae
Point submodule to main branch of ROSCO
dzalkind Mar 10, 2021
b813a22
Clean up testing scripts
dzalkind Mar 10, 2021
07b46b6
Update version to 2.2.0
nikhar-abbas Mar 10, 2021
53343d1
Delete history file
nikhar-abbas Mar 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ _build
*.out
*.outb
*.dbg
*.vtp

# Fortran files
# ROSCO files
*.85
*.i90
*local*

# Binaries
*.dylib
Expand All @@ -46,7 +49,11 @@ examples/cp_ct_cq_lut.p
Examples/DISCON.IN
Examples/*.p

# Matlab Stuff
Matlab_Toolbox/*.slxc
# Exclude testing results
ROSCO_testing/results/

# Simulink/Matlab temp files
*.slxc
*.autosave
*.mat

3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "ROSCO"]
path = ROSCO
url = https://github.com/NREL/ROSCO.git
url = https://github.com/NREL/ROSCO
branch = main
1 change: 1 addition & 0 deletions Examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Cp_Ct_Cq.*.txt
*.p
examples_out/
165 changes: 0 additions & 165 deletions Examples/Cp_Ct_Cq.Ex03.txt

This file was deleted.

54 changes: 27 additions & 27 deletions Examples/DISCON.IN

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Examples/NREL5MW_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Turbine: NREL 5MW Reference Wind Turbine
# ------------------------------ OpenFAST PATH DEFINITIONS ------------------------------
path_params:
FAST_InputFile: '5MW_Land_DLL_WTurb.fst' # Name of *.fst file
FAST_directory: '../Test_Cases/5MW_Land_DLL_WTurb' # Main OpenFAST model directory, where the *.fst lives
FAST_InputFile: 'NREL-5MW.fst' # Name of *.fst file
FAST_directory: '../Test_Cases/NREL-5MW' # Main OpenFAST model directory, where the *.fst lives
# Optional
rotor_performance_filename: 'Cp_Ct_Cq.NREL5MW.txt' # Filename for rotor performance text file (if it has been generated by ccblade already)

Expand Down
Binary file removed Examples/NREL5MW_saved.p
Binary file not shown.
3 changes: 2 additions & 1 deletion Examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ Examples:
7. Load saved turbine, tune controller, plot minimum pitch schedule.
8. Plot some OpenFAST output data.
9. Run turbsim to compile binary.
10. Tune a controller for distributed aerodynamic control.
10. Tune a controller for distributed aerodynamic control.
11. Generate simplified linear models, save the parameters to a file.
96 changes: 43 additions & 53 deletions Examples/ROSCO_walkthrough.ipynb

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions Examples/example_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,33 @@
'''

# Python Modules
import yaml
import yaml, os
# ROSCO Modules
from ROSCO_toolbox import turbine as ROSCO_turbine

# Load yaml file
parameter_filename = 'NREL5MW_example.yaml'
this_dir = os.path.dirname(os.path.abspath(__file__))
parameter_filename = os.path.join(this_dir,'NREL5MW_example.yaml')
inps = yaml.safe_load(open(parameter_filename))
path_params = inps['path_params']
turbine_params = inps['turbine_params']

# 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,
rot_source='txt',txt_filename=os.path.join(this_dir,path_params['rotor_performance_filename'])
)

# Print some basic turbine info
print(turbine)

# Save the turbine model
turbine.save('NREL5MW_saved.p')
example_out_dir = os.path.join(this_dir,'examples_out')
if not os.path.isdir(example_out_dir):
os.makedirs(example_out_dir)

turbine.save(os.path.join(example_out_dir,'01_NREL5MW_saved.p'))
17 changes: 14 additions & 3 deletions Examples/example_02.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,29 @@
'''

# Python modules
import os
import matplotlib.pyplot as plt
# ROSCO toolbox modules
from ROSCO_toolbox import turbine as ROSCO_turbine

this_dir = os.path.dirname(os.path.abspath(__file__))
example_out_dir = os.path.join(this_dir,'examples_out')
if not os.path.isdir(example_out_dir):
os.makedirs(example_out_dir)

# Initialize a turbine class -- Don't need to instantiate!
turbine = ROSCO_turbine.Turbine

# Load quick from python pickle
turbine = turbine.load('NREL5MW_saved.p')
turbine = turbine.load(os.path.join(example_out_dir,'01_NREL5MW_saved.p'))

# plot rotor performance
print('Plotting Cp data')
turbine.Cp.plot_performance(turbine.Cp_table, turbine.pitch_initial_rad, turbine.TSR_initial)
plt.show()
turbine.Cp.plot_performance()



if False:
plt.show()
else:
plt.savefig(os.path.join(example_out_dir,'02_NREL5MW_Cp.png'))
23 changes: 16 additions & 7 deletions Examples/example_03.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,35 @@
- Write a text file with rotor performance properties
'''
# Python modules
import yaml
import yaml, os
# ROSCO toolbox modules
from ROSCO_toolbox import turbine as ROSCO_turbine
from ROSCO_toolbox import utilities as ROSCO_utilities
from ROSCO_toolbox.utilities import write_rotor_performance
# Initialize parameter dictionaries
turbine_params = {}
control_params = {}

this_dir = os.path.dirname(os.path.abspath(__file__))
example_out_dir = os.path.join(this_dir,'examples_out')
if not os.path.isdir(example_out_dir):
os.makedirs(example_out_dir)

# Load yaml file
parameter_filename = '../Tune_Cases/NREL5MW.yaml'
parameter_filename = os.path.join(this_dir,'NREL5MW_example.yaml')
inps = yaml.safe_load(open(parameter_filename))
path_params = inps['path_params']
turbine_params = inps['turbine_params']
controller_params = inps['controller_params']

# 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=None,txt_filename=None)
turbine.load_from_fast(
path_params['FAST_InputFile'],
os.path.join(this_dir,path_params['FAST_directory']),
dev_branch=True,
rot_source='cc-blade',
txt_filename=None)

# Write rotor performance text file
txt_filename = 'Cp_Ct_Cq.Ex03.txt'
file_processing = ROSCO_utilities.FileProcessing()
file_processing.write_rotor_performance(turbine,txt_filename=txt_filename)
txt_filename = os.path.join(example_out_dir,'03_Cp_Ct_Cq.Ex03.txt')
write_rotor_performance(turbine,txt_filename=txt_filename)
43 changes: 28 additions & 15 deletions Examples/example_04.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
'''
# Python modules
import matplotlib.pyplot as plt
import yaml
import yaml, os
# ROSCO toolbox modules
from ROSCO_toolbox import controller as ROSCO_controller
from ROSCO_toolbox import turbine as ROSCO_turbine
from ROSCO_toolbox import sim as ROSCO_sim
from ROSCO_toolbox import utilities as ROSCO_utilities
from ROSCO_toolbox.utilities import write_DISCON

# Load yaml file
parameter_filename = 'NREL5MW_example.yaml'
this_dir = os.path.dirname(os.path.abspath(__file__))
parameter_filename = os.path.join(this_dir,'NREL5MW_example.yaml')
inps = yaml.safe_load(open(parameter_filename))
path_params = inps['path_params']
turbine_params = inps['turbine_params']
Expand All @@ -29,27 +30,39 @@
# Instantiate turbine, controller, and file processing classes
turbine = ROSCO_turbine.Turbine(turbine_params)
controller = ROSCO_controller.Controller(controller_params)
file_processing = ROSCO_utilities.FileProcessing()

# Load turbine data from OpenFAST and rotor performance text file
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,
rot_source='txt',txt_filename=os.path.join(this_dir,path_params['rotor_performance_filename'])
)

# Tune controller
controller.tune_controller(turbine)

# Write parameter input file
param_file = 'DISCON.IN'
file_processing.write_DISCON(turbine,controller,param_file=param_file, txt_filename=path_params['rotor_performance_filename'])
write_DISCON(turbine,controller,param_file=param_file, txt_filename=path_params['rotor_performance_filename'])

# Plot gain schedule
plt.figure(0)
plt.plot(controller.v[len(controller.vs_gain_schedule.Kp):], controller.pc_gain_schedule.Kp)
plt.xlabel('Wind Speed')
plt.ylabel('Proportional Gain')
fig, ax = plt.subplots(1,2,constrained_layout=True)
ax[0].plot(controller.v[len(controller.v_below_rated)+1:], controller.pc_gain_schedule.Kp)
ax[0].set_xlabel('Wind Speed')
ax[0].set_ylabel('Proportional Gain')

plt.figure(1)
plt.plot(controller.v[len(controller.vs_gain_schedule.Ki):], controller.pc_gain_schedule.Ki)
plt.xlabel('Wind Speed')
plt.ylabel('Integral Gain')
ax[1].plot(controller.v[len(controller.v_below_rated)+1:], controller.pc_gain_schedule.Ki)
ax[1].set_xlabel('Wind Speed')
ax[1].set_ylabel('Integral Gain')

plt.show()
plt.suptitle('Pitch Controller Gains')

example_out_dir = os.path.join(this_dir,'examples_out')
if not os.path.isdir(example_out_dir):
os.makedirs(example_out_dir)

if False:
plt.show()
else:
plt.savefig(os.path.join(example_out_dir,'04_GainSched.png'))
31 changes: 22 additions & 9 deletions Examples/example_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,37 @@

Notes - You will need to have a compiled controller in ROSCO, and
properly point to it in the `lib_name` variable.
- The complex nature of the wind speed estimators implemented in ROSCO
make using them for simulations is known to cause problems for
the simple simulator. We suggesting using WE_Mode = 0 in DISCON.IN.
- Using wind speed estimators in this simple simulation is
known to cause problems. We suggesting using WE_Mode = 0 in DISCON.IN.
'''
# Python modules
import matplotlib.pyplot as plt
import numpy as np
import yaml
import yaml, os, platform
# ROSCO toolbox modules
from ROSCO_toolbox import controller as ROSCO_controller
from ROSCO_toolbox import turbine as ROSCO_turbine
from ROSCO_toolbox import sim as ROSCO_sim
from ROSCO_toolbox import utilities as ROSCO_utilities
from ROSCO_toolbox import control_interface as ROSCO_ci

# Specify controller dynamic library path and name
lib_name = '../ROSCO/build/libdiscon.dylib'
param_filename = 'DISCON.IN'
this_dir = os.path.dirname(os.path.abspath(__file__))
example_out_dir = os.path.join(this_dir,'examples_out')
if not os.path.isdir(example_out_dir):
os.makedirs(example_out_dir)

if platform.system() == 'Windows':
lib_name = os.path.join(this_dir, '../ROSCO/build/libdiscon.dll')
elif platform.system() == 'Darwin':
lib_name = os.path.join(this_dir, '../ROSCO/build/libdiscon.dylib')
else:
lib_name = os.path.join(this_dir, '../ROSCO/build/libdiscon.so')

param_filename = os.path.join(this_dir,'DISCON.IN')

# Load turbine model from saved pickle
turbine = ROSCO_turbine.Turbine
turbine = turbine.load('NREL5MW_saved.p')
turbine = turbine.load(os.path.join(example_out_dir,'01_NREL5MW_saved.p'))

# Load controller library
controller_int = ROSCO_ci.ControllerInterface(lib_name,param_filename=param_filename)
Expand All @@ -51,5 +60,9 @@

# Run simulator and plot results
sim.sim_ws_series(t,ws,rotor_rpm_init=4)
plt.show()

if False:
plt.show()
else:
plt.savefig(os.path.join(example_out_dir,'05_NREL5MW_SimpSim.png'))

21 changes: 13 additions & 8 deletions Examples/example_06.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
'''
# Python Modules
import yaml
import os
# ROSCO toolbox modules
from ROSCO_toolbox import controller as ROSCO_controller
from ROSCO_toolbox import turbine as ROSCO_turbine
from ROSCO_toolbox.utilities import write_DISCON, run_openfast
from ROSCO_toolbox import sim as ROSCO_sim
from ROSCO_toolbox import utilities as ROSCO_utilities

this_dir = os.path.dirname(os.path.abspath(__file__))

# Load yaml file
parameter_filename = 'NREL5MW_example.yaml'
parameter_filename = os.path.join(os.path.dirname(this_dir), 'Tune_Cases', 'IEA15MW.yaml')
inps = yaml.safe_load(open(parameter_filename))
path_params = inps['path_params']
turbine_params = inps['turbine_params']
Expand All @@ -28,22 +31,24 @@
# Instantiate turbine, controller, and file processing classes
turbine = ROSCO_turbine.Turbine(turbine_params)
controller = ROSCO_controller.Controller(controller_params)
file_processing = ROSCO_utilities.FileProcessing()
fast_io = ROSCO_utilities.FAST_IO()

# Load turbine data from OpenFAST and rotor performance text file
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,rot_source='txt',\
txt_filename=os.path.join(this_dir,path_params['FAST_directory'],path_params['rotor_performance_filename']))

# Tune controller
controller.tune_controller(turbine)

# Write parameter input file
param_file = 'DISCON.IN' # This must be named DISCON.IN to be seen by the compiled controller binary.
file_processing.write_DISCON(turbine,controller,param_file=param_file, txt_filename=path_params['rotor_performance_filename'])
param_file = os.path.join(this_dir,'DISCON.IN') # This must be named DISCON.IN to be seen by the compiled controller binary.
write_DISCON(turbine,controller,param_file=param_file, txt_filename=path_params['rotor_performance_filename'])

# Run OpenFAST
# --- May need to change fastcall if you use a non-standard command to call openfast
fast_io.run_openfast(path_params['FAST_directory'], fastcall='openfast_dev', fastfile=path_params['FAST_InputFile'],chdir=True)
fastcall = 'openfast'
run_openfast(path_params['FAST_directory'], fastcall=fastcall, fastfile=path_params['FAST_InputFile'], chdir=True)



Expand Down
Loading