Skip to content

Commit

Permalink
ROSCO v2.8.0 (NREL#237)
Browse files Browse the repository at this point in the history
* Adding pitch actuator fault (#163)

* FOCAL Updates (#64)

* Update headers

* fix bullets

* make uppercase

* Update turbine.py (#56)

* Update turbine.py

This add several lines for fixing the problem of repeated maximum values in the performance tables. This will cause the error (' the length of x and y is different.') of 'interpolate.interp1d.'

* Add comments and catch when there are multiple optimal pitch angles

Co-authored-by: dzalkind <[email protected]>

* increment version

* Update for OpenFAST v3.0.0

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* Update Testing (#58)

* Update scripts to run on eagle

* Update IEA-15MW semi example: use peak shaving w/ ps_percen=0.8

* Add comparison plots to testing scripts

* Update submit script for testing

* Update for latest eagle runs

* Add future to install dependencies

* add TMax to self, define tmin in print_results

* run tests in CI

* generic ROSCO path

* default to overwrite

* fix path

* import platform

* separate run_testing

* cleanup, specify lite test

* don't run testing in after examples, oops.

Co-authored-by: nikhar-abbas <[email protected]>
Co-authored-by: Nikhar Abbas <[email protected]>

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* Increment Version, OF3.0 (#57)

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* add ROSCO without submodule

* move ROSCO source to ROSCO folder

* Move cmake-related files to ROSCO

* Add back pesky ErrVar

* Remove parameters_files

* Merge ROSCO and _toolbox gitignore

* Fix .gitignore

* Remove Examples/DISCON.IN from git

* Fix and point example_01 to Tune_Cases/

* Update verbiage around using ofTools vs. weis

* Fix and point example_04 to Tune_Cases/

* Clean up example_06

* Clean up example_07

* Only check FlpCornerFreq if using Flp control, fixes example 05

* Make example_04 consistent with others

* Let example_05 run independently from 04

* Clean up example_05, wind files

* Add schema and update empty tuning yaml inputs, not connected yet

* Integrate schema into turbine, controller, and examples

* Only check Fl filter parameters if Fl_Mode > 0, fix example_05

* bump version to 2.3

* Compile ROSCO from ROSCO dir

* Rename to CI_rosco

* Add omega vs. windspeed functionality

* Fix tests: 5MW U_pc and 06 example dir

* Make _Toolbox vs_minspeed in rotor frame to match ROSCO

* Revert ServoDyn change

* change rotor speed constraint to be epsilon

* rename for clarity

* docs major refresh

* fix FA_AccF units in debug file

* docs that build locally

* Deallocate arrays in ROSCO, check in example_05

* Clean up comments

* remove gitmodules

* furo theme

* furo in requirements

* move readthedocs config file, remove furo import in conf.py

* add docs requirements file

* typo

* move index out of source folder

* trying to get furo to work

* import date

* fix versions and titles, cleanup readthedocs requirements

* typo fix, remove extras

* more cleanup

* bump version

* no furo extension, "hack" to load RT version

* proper toctree paths

* specify method

* add mock modules

* fix typos

* update python install requirements

* running locally

* move index to main docs dir again

* update to build locally

* error during warnings

* automated version

* cleanup

* remove old docs

* re-add docs

* simplify

* fix figure path

* try alabaster

* remove archived docs

* Add omega vs. windspeed functionality

* Fix tests: 5MW U_pc and 06 example dir

* more detailed sp.optimize settings

* run MBC3 in parallel

* restructure driver, run initialization doe for tuning

* Try new dlclose function

* Update example_05 to run simple simulation twice and check result

* Revert deallocation stuff

* Close discon library after every sim run

* Test examples on macOS and windows

* Run examples instead of testing on other platforms

* Skip examples in windows for now

* update paths and yaml load funciton

* Skip mac testing of examples

* provide default U_pc for single omega/zeta case

* allow for float or list-like pc tuning inputs

* Change name in setup.py

* WE_Vw unit fix

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* cleeanup for improved stability

* check for doe_logs as string in load_DOE

* major restructure for rsched_driver class

* cleanup verbosity

* run serial by default

* load_parallel as linturb_option

* specific IEA15MW yaml for multi omega

* remove unused module imports

* fix error message types

* lin_file as input

* add comments on inputs to LinearTurbineModel init method

* remove relative file paths

* provide OpenFAST linearizations for IEA15MW UMaineSemi

* put plotting in specific function

* fix WE_lambda units

* add self in on a few necessary variables

* creaete example 12 for robust scheduling

* try a few mbc3 locations for import

* allow list-like or numpy arrays for omega_pc and zeta_pc schedules

* create and use recorder setup function

* Pass Through Kp_float (#57)

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* fix setup_recorder to work for optimization driver too

* Allow pass through of Kp_float = 0

* cleanup om problems, update om0 calc

* doe levels as input

* negative k_float to account for OF conventions

* cleanup print statements

* variable name cleanup, use calculated k_float

* Add defaults to omega_,zeta_ pc and vs, allow to be numbers

* use standard tuning k_float as IC

* formatting update

* update problem setup methods

* cleanup add_dv, enable adding design variables after problem is setup

* change optimization step size

* more setup restructure

* update verbosity

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* Mostly a docs update (#61)

* rename for clarity

* docs major refresh

* fix FA_AccF units in debug file

* docs that build locally

* remove gitmodules

* furo theme

* furo in requirements

* move readthedocs config file, remove furo import in conf.py

* add docs requirements file

* typo

* move index out of source folder

* trying to get furo to work

* import date

* fix versions and titles, cleanup readthedocs requirements

* typo fix, remove extras

* more cleanup

* bump version

* no furo extension, "hack" to load RT version

* proper toctree paths

* specify method

* add mock modules

* fix typos

* update python install requirements

* running locally

* move index to main docs dir again

* update to build locally

* error during warnings

* automated version

* cleanup

* remove old docs

* re-add docs

* simplify

* fix figure path

* try alabaster

* remove archived docs

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* Pass through Kp_float = 0 (#59)

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* Allow pass through of Kp_float = 0

* Add flp parameters to schema

* Change Fl_Mode default to 0

* Add defaults to omega_,zeta_ pc and vs, allow to be numbers

* Allow single pitch tuning values in code, default U_pc to 0

* use nac acceleration for floating feedback

* Fix TSR saturation for region 2.5operation

* Modify system for constant power operation

* Only modify pole for constant power above-rated

* Remove GenEff from K calc

* Update tuning, use constant power

* use load_rosco_yaml

* constant power

* Fix broken tests

* Include Fl_Mode=2 for nacelle pitching feedback

* Add FOCAL inputs
- hpf on floating feedback
- lpf on wind speed estimator
- associated schema updates

* Set notch and check frequencies when Fl_Mode = 1 (fixes bug)

* Skip filter step if there's an error

* Update IEA-15MW test case DISCON with focal inputs

* Allow Fl_Mode = 2 in ROSCO

* Pass through lpf frequency

* Add FOCAL tuning yaml

* Set Cp contour number of levels

* Add FOCAL params to various writers

* Update/tune focal yaml

* Add scripts for running FAST, tuning various parameters and cases

* Add notebook for FAST plotting

* Set up step case for testing

* Change doubles to C_doubles

* Define real and integer kinds, assign to all of ROSCO

* Add ADJUSTL to DISCON error message

* Fix Fl_Mode == 2

* Fix Fl_Mode == 2 again

* Call yaw, flap, and debug only if enabled in DISOCN.IN

* Make avrSWAP a ReKi and set constant kinds

* Add DISCONs for testing - revert this later

* Fix DISCON comparison, before DISCON's were overwritten by model

* Rename DEBUG2.dbg to RootName.dbg2

* Update TestCase DISCONs to new input file

* Add API change page in docs

* Add link to API change on main page

* Fix table headers

* Fix title underlines

* Fix tables again

* Fix tables again

* Fix version numbering in docs

* Simplify FAST_directory in run_FAST

* Versioning (#65)

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* remove git versioning from cmake

* use hard coded rosco_version

* update intro write method

* set nowrap for intel compilers

* Add transfer of error message and clear message after each call

* update install instructions

* Catch nans in ROSCO at end of WSE

* fix conda install typo

* cleanup docs

* Rename DEBUG2.dbg to RootName.dbg2

* Fix Fl_Mode == 2

* Fix Fl_Mode == 2 again

* Allow Fl_Mode = 2 in ROSCO

* Set notch and check frequencies when Fl_Mode = 1 (fixes bug)

* Update FOCAL tuning yaml

* Update TSR

* Clean up and doc fix

* Remove publish to pypi

* Define all constant inputs to functions with kind typing

* Generate Test_Case/ inputs automatically

* Fix IEA15 DISCON path

* Fix example 11 paths

* Auto-generate tuning input yaml using schema

* Add toolbox_input to doc index

* Add toctree

* Re-name title of toolbox_input

Co-authored-by: Nikhar Abbas <[email protected]>
Co-authored-by: Xianping Du <[email protected]>
Co-authored-by: nikhar-abbas <[email protected]>

* update listcheck method for numpy arrays

* Open Loop Control (#98)

* create rosco types yaml

* Add more descriptions, add integer_c default, cleanup

* updates for allocatability and shapes

* python scripts to write ROSCO_types.f90

* reemove superfulous modules

* use types from ROSCO registry

* create rosco types yaml

* Add more descriptions, add integer_c default, cleanup

* updates for allocatability and shapes

* python scripts to write ROSCO_types.f90

* reemove superfulous modules

* use types from ROSCO registry

* Saturate inputs to WSE.  Needs some TLC, but seems to work

* Reduce saturation limits on speed, torque

* Re-organize, set saturation limits.  Working at 3 m/s

* Initial add of OL control to ROSCO: builds

* Update DISCONs with open loop inputs

* Fix file reading for OL_Filename

* Add open loop control generation and file writing

* Use DISCON_dict for more manageable DISCON file writing

* Add open loop example, fix constant timeseries

* Make open loop example generate power

* Handle relative paths and calling from outside the run directory:
- Some helper functions borrowed from OpenFAST, f/ext_control
- Updated file writing

* Clean up: versions, print statements

* Fix SysFiles paths in CMakeLists

* Tidy up Ext_DLL names

* More Ext_DLL name tidying

* Test write_registry.py

* Update for OL Control

* Move preprocessor lines

* add zenodo DOI

* Regenerated Types

* fix shape

* revert filepath change

* give all  types a size, ProcAddr size = 3

* update types

* test registry in compile step

* specify default shell

* update write_registry path

* remove default shell

* Document API changes, provide OL input example

* Fix example 14 (yaw input)

* Add error catching to yaw control

* Tidy up OL_Input Reading: error catching, generalize

* More yaw control fixes, to model

* Checkout develop CMakeLists for ROSCO

* Update DISCON.INs for TestCases/

* Revert "Checkout develop CMakeLists for ROSCO"

This reverts commit 87a491359d73806e3aaa59b4cfdc00f2838875df.

* Revert windows cmake stuff to develop

* Fix CMake again

* Revert "Revert windows cmake stuff to develop"

This reverts commit 39df122449b0e2055f2e12e3ce38a0c010c7bd91.

* Make last cmake fix - hopefully

Co-authored-by: Nikhar Abbas <[email protected]>

* Convert WE saved variables to WE type

* Put restart flag in localvars

* Use saved filter params from LocalVar

* save pitcomt last

* Move IPC saved variables to localvars

* Saved pi controller variables to localvar

* Save RootMyb_Last to localvar

* ROSCO_IO - initial commit. Include restart and debug functions

* Use ROSCO IO and call restart functions

* Remove debug from function.f90

* Save ACC Infile info

* update for restart capabilities

* add rosco_io with restart and debug functions

* cleanup debug call

* use registry generate types and IO

* delete DFController

* fix timestep mismatch

* remove unnecessaray istatus check

* close files

* add reg test for restart

* add restart option to run_openfast

* add testing to CI, ignore generate files

* fix fastcall

* remove extra commas

* specify gfortran-10

* testing flag cleanup

* Use lv_strings to generate debug output

* Revert "testing flag cleanup"

This reverts commit 6f295563832413e96347acd82716f9aadac6d46c.

* Revert "specify gfortran-10"

This reverts commit 4c3154491523bcd542133ca2bce5803cdc94523f.

* minor cleanup

* Use kind from constants

* Add some comments for clarity

* put debug in if statements

* separate reg tests from oother tests

* Fl_Mode>0

* Remove hard coded values

* Add filtered signals and WE_Vw to debug varrs

* cd for regtest

* Check logging level before calling debug

* add fl_pitcom and pc_minpit to debugvars

* Turn runFAST into a class

* Refactor/simplify CaseLibrary

* Restart & registry (#99)

* Convert WE saved variables to WE type

* Put restart flag in localvars

* Use saved filter params from LocalVar

* save pitcomt last

* Move IPC saved variables to localvars

* Saved pi controller variables to localvar

* Save RootMyb_Last to localvar

* ROSCO_IO - initial commit. Include restart and debug functions

* Use ROSCO IO and call restart functions

* Remove debug from function.f90

* Save ACC Infile info

* update for restart capabilities

* add rosco_io with restart and debug functions

* cleanup debug call

* use registry generate types and IO

* delete DFController

* fix timestep mismatch

* remove unnecessaray istatus check

* close files

* add reg test for restart

* add restart option to run_openfast

* add testing to CI, ignore generate files

* fix fastcall

* remove extra commas

* specify gfortran-10

* testing flag cleanup

* Use lv_strings to generate debug output

* Revert "testing flag cleanup"

This reverts commit 6f295563832413e96347acd82716f9aadac6d46c.

* Revert "specify gfortran-10"

This reverts commit 4c3154491523bcd542133ca2bce5803cdc94523f.

* minor cleanup

* Use kind from constants

* Add some comments for clarity

* put debug in if statements

* separate reg tests from oother tests

* Fl_Mode>0

* Remove hard coded values

* Add filtered signals and WE_Vw to debug varrs

* cd for regtest

* Check logging level before calling debug

* add fl_pitcom and pc_minpit to debugvars

Co-authored-by: dzalkind <[email protected]>

* Implement initial pitch actuator

* Set up steps case

* Break up if statement in open loop pitch (#100)

* Break up if statement in open loop pitch

* Make torque and yaw consistent with pitch: can start after some time

* add bld edgewise freq to robust dict_inputs

* Add actuator variable

* Print first time step in debug outs

* Fix FOCAL yaml

* Set actuator to 0.25 Hz bandwidth

* Fix ccrotor inputs (#104)

* remove interpolation of blade chord and twist

* rename aerodynblade inputs

* Update surface and DISCON.INs

* Fix performance table paths

* Allow default inputs (#110)

* Allow defaults for AeroDyn inputs

* Allow AeroDyn inputs to be floats, too

* ipc (#105)

* remove interpolation of blade chord and twist

* rename aerodynblade inputs

* Update surface and DISCON.INs

* Fix performance table paths

* Add proportional control and cleanup IPC

* Add IPC and filtered RootMyc to registry

* Better logic for filtering RootMOOP and fix notch filter slopes bug

* Add cyclic flap conrol

* Fix comments in ColemanTransformInverse

* Addd IPC_KP to DISCON.IN

* Error checking foro flp or ipc

* add mutichannel plotting with tuples

* add CMakeFiles to gitignore

* Add IPC_KP to api changes

* numerical qualifiers for error handling

* add IPC gains to schema for pass-through ability

* fix variable names

* fix ipc gain printing bug

* make sure IPC_KP is positive

* Update Polars to point to coord files

* ignore dbg2 files

* Add IEA15MW_OL.yaml

* update coord reader/writer

* expand pitch_initial to 30 degrees

* Add example 13 for IPC

* Update cp surfaces and DISCONS

* add examples to readme

* cleanup and streaamline run_examples

* Add IPC tuning vars

* Allow IPC to command pitch value below peak shaving saturation limit

* shorten simulation time

* Fix Material parameter path

* Update DISCONs again

* Fix OL_Input reading

* Set wind speed, rotor speed IC in example 14

* Debug OL reading

* Add more debugging lines

* Add more debugging lines 2

* Clean up, hone in on debug call

* Disable logging level

* Update discons - resolve conflict

* Print when finished with ROSCO

* add control packageg

* Use PriPath and RootName to name dbg files

* Print AvrSWAP

* Revert "Use PriPath and RootName to name dbg files"

This reverts commit 062fcaa55b3bf42d44f8a3f163aa883ab9552412.

* Disable other examples

* Print OL inputs

* Allow logging level 3

* Print OL inputs

* Make example shorter

* Print more stuf

* Print shape

* Revert "Print OL inputs"

This reverts commit 8e2a642bb35e46850f579ca4e69ca6d6fc93f4cc.

* Update ROSCO Simulink model with IPC example

* refactor flap tuning for normalization methods

* improved flap controller filtering

* delete extra F_FlpCornerFrerq

* Update inputs, reader, and writer for OF 3.1.0

* Make sigma default interp type for multi_sigma

* Use openfast 3.1.0 in CI

* Fix leak...maybe

* Use OF 3.1.0 in testing

* Use gfotran for compile

* Clean up print statements

* Re-enable all examples

* Update NREL-5MW AD file

* Only check airfoil controls if more than one table

* Update BAR models

* Revert "Use gfotran for compile"

This reverts commit 5a6e2b7e30287a09a09781e2ba12f9b578132e1f.

* Install pyFAST for CI

* Fix some paths in ex12

* Disable example 12

* Fix example 12 linear path, re-enable

* Skip compilers install for mac

* Try gfortran-9, no compilers

* Try gfortran-10, no compilers

* Skip windows compile in pytools

* Re-enable windows, use gfortran as FC

* Unset FC in windows

* Set environment for windows when dependencies installed

* Try setting environment in installation

* Put conditional env setting in correct place

* Try in setup again

* Break up tasks: Windows vs. not

* Update DISCONs

* Update docs with new variables

* Add example documentation

* Update ROSCO Simulink model for 3.1.0

* Make IEA model float again

* Reduce IEA timestep

* Match DT to checkpoint time

Co-authored-by: dzalkind <[email protected]>

* Increment version number

* Bladed docs (#116)

* Added image of Bladed control screen setup

* Delete Bladed control screen.png

* Adding image of Bladed control screen

* Add files via upload

* Minor edit 1

* Minor change 2

* Minor change 3

* Minor change 4

* Change 6

* Change 7

* Change 8

* Minor change 9

Co-authored-by: nikhar-abbas <[email protected]>
Co-authored-by: WillC-DNV <[email protected]>

* Update version in API change docs

* Bladed readthedocs (#117)

* Added image of Bladed control screen setup

* Delete Bladed control screen.png

* Adding image of Bladed control screen

* Add files via upload

* Minor edit 1

* Minor change 2

* Minor change 3

* Minor change 4

* Change 6

* Change 7

* Change 8

* Minor change 9

* Tinker with characters in bladed instructions

* Add bladed instructions to index

* Change bladed toctree label

* Do underline stuff

* Make toctree label same as file

* Remove colons from headers

Co-authored-by: nikhar-abbas <[email protected]>
Co-authored-by: WillC-DNV <[email protected]>

* Update docs to reflect CI process

* Regenerate types, IO with registry

* Update registry so first timestep is printed

* Update inverted notch to move frequency properly

* Saturate inv notch corner frequency at 0

* Add tower damper mode flag

* Add Azimuth tracking controller in Simulink

* Always enable GenDOF, add options for simp_step

* Add sweep for IPC gains and FA damper

* Fix NumCoords in FAST_writer

* sigma + ipc (#125)

* cleanup api change table

* Update inverted notch to move frequency properly

* Saturate inv notch corner frequency at 0

* add sigma function

* Use IPC_Vramp for IPC cut-in

* Add IPC_Vramp DISCON inputs

* update registry

* Update DISCONs

* Update docs for API change

* Fix IPC_Vramp data type

* update comments

Co-authored-by: dzalkind <[email protected]>

* Add turbulent case to runFAST/CaseLibrary

* Add peak shaving sweep function

* Increase default IPC_IntSat, make input parameter in future

* Flip Ct and Cq table allocation

* Flip Ct and Cq table allocation (#130)

* Regen types

* Remove print statements used for debugging

* Update input files: IEA model has pitch actuator

* Add back flap control (no idea when it was deleted)

* Update discons, docs with API change

* Add user-defined hh case

* Fix AddF0 and RayleighDamp in FAST_reader

* Pitch Actuator and IPC updates (#123)

* Convert WE saved variables to WE type

* Put restart flag in localvars

* Use saved filter params from LocalVar

* save pitcomt last

* Move IPC saved variables to localvars

* Saved pi controller variables to localvar

* Save RootMyb_Last to localvar

* ROSCO_IO - initial commit. Include restart and debug functions

* Use ROSCO IO and call restart functions

* Remove debug from function.f90

* Save ACC Infile info

* update for restart capabilities

* add rosco_io with restart and debug functions

* cleanup debug call

* use registry generate types and IO

* delete DFController

* fix timestep mismatch

* remove unnecessaray istatus check

* close files

* add reg test for restart

* add restart option to run_openfast

* add testing to CI, ignore generate files

* fix fastcall

* remove extra commas

* specify gfortran-10

* testing flag cleanup

* Use lv_strings to generate debug output

* Revert "testing flag cleanup"

This reverts commit 6f295563832413e96347acd82716f9aadac6d46c.

* Revert "specify gfortran-10"

This reverts commit 4c3154491523bcd542133ca2bce5803cdc94523f.

* minor cleanup

* Use kind from constants

* Add some comments for clarity

* put debug in if statements

* separate reg tests from oother tests

* Fl_Mode>0

* Remove hard coded values

* Add filtered signals and WE_Vw to debug varrs

* cd for regtest

* Check logging level before calling debug

* add fl_pitcom and pc_minpit to debugvars

* Turn runFAST into a class

* Refactor/simplify CaseLibrary

* Implement initial pitch actuator

* Set up steps case

* Add actuator variable

* Print first time step in debug outs

* Fix FOCAL yaml

* Set actuator to 0.25 Hz bandwidth

* ROSCO 2.5.0 (#115)

* FOCAL Updates (#64)

* Update headers

* fix bullets

* make uppercase

* Update turbine.py (#56)

* Update turbine.py

This add several lines for fixing the problem of repeated maximum values in the performance tables. This will cause the error (' the length of x and y is different.') of 'interpolate.interp1d.'

* Add comments and catch when there are multiple optimal pitch angles

Co-authored-by: dzalkind <[email protected]>

* increment version

* Update for OpenFAST v3.0.0

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* Update Testing (#58)

* Update scripts to run on eagle

* Update IEA-15MW semi example: use peak shaving w/ ps_percen=0.8

* Add comparison plots to testing scripts

* Update submit script for testing

* Update for latest eagle runs

* Add future to install dependencies

* add TMax to self, define tmin in print_results

* run tests in CI

* generic ROSCO path

* default to overwrite

* fix path

* import platform

* separate run_testing

* cleanup, specify lite test

* don't run testing in after examples, oops.

Co-authored-by: nikhar-abbas <[email protected]>
Co-authored-by: Nikhar Abbas <[email protected]>

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* Increment Version, OF3.0 (#57)

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* add ROSCO without submodule

* move ROSCO source to ROSCO folder

* Move cmake-related files to ROSCO

* Add back pesky ErrVar

* Remove parameters_files

* Merge ROSCO and _toolbox gitignore

* Fix .gitignore

* Remove Examples/DISCON.IN from git

* Fix and point example_01 to Tune_Cases/

* Update verbiage around using ofTools vs. weis

* Fix and point example_04 to Tune_Cases/

* Clean up example_06

* Clean up example_07

* Only check FlpCornerFreq if using Flp control, fixes example 05

* Make example_04 consistent with others

* Let example_05 run independently from 04

* Clean up example_05, wind files

* Add schema and update empty tuning yaml inputs, not connected yet

* Integrate schema into turbine, controller, and examples

* Only check Fl filter parameters if Fl_Mode > 0, fix example_05

* bump version to 2.3

* Compile ROSCO from ROSCO dir

* Rename to CI_rosco

* Add omega vs. windspeed functionality

* Fix tests: 5MW U_pc and 06 example dir

* Make _Toolbox vs_minspeed in rotor frame to match ROSCO

* Revert ServoDyn change

* change rotor speed constraint to be epsilon

* rename for clarity

* docs major refresh

* fix FA_AccF units in debug file

* docs that build locally

* Deallocate arrays in ROSCO, check in example_05

* Clean up comments

* remove gitmodules

* furo theme

* furo in requirements

* move readthedocs config file, remove furo import in conf.py

* add docs requirements file

* typo

* move index out of source folder

* trying to get furo to work

* import date

* fix versions and titles, cleanup readthedocs requirements

* typo fix, remove extras

* more cleanup

* bump version

* no furo extension, "hack" to load RT version

* proper toctree paths

* specify method

* add mock modules

* fix typos

* update python install requirements

* running locally

* move index to main docs dir again

* update to build locally

* error during warnings

* automated version

* cleanup

* remove old docs

* re-add docs

* simplify

* fix figure path

* try alabaster

* remove archived docs

* Add omega vs. windspeed functionality

* Fix tests: 5MW U_pc and 06 example dir

* more detailed sp.optimize settings

* run MBC3 in parallel

* restructure driver, run initialization doe for tuning

* Try new dlclose function

* Update example_05 to run simple simulation twice and check result

* Revert deallocation stuff

* Close discon library after every sim run

* Test examples on macOS and windows

* Run examples instead of testing on other platforms

* Skip examples in windows for now

* update paths and yaml load funciton

* Skip mac testing of examples

* provide default U_pc for single omega/zeta case

* allow for float or list-like pc tuning inputs

* Change name in setup.py

* WE_Vw unit fix

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* cleeanup for improved stability

* check for doe_logs as string in load_DOE

* major restructure for rsched_driver class

* cleanup verbosity

* run serial by default

* load_parallel as linturb_option

* specific IEA15MW yaml for multi omega

* remove unused module imports

* fix error message types

* lin_file as input

* add comments on inputs to LinearTurbineModel init method

* remove relative file paths

* provide OpenFAST linearizations for IEA15MW UMaineSemi

* put plotting in specific function

* fix WE_lambda units

* add self in on a few necessary variables

* creaete example 12 for robust scheduling

* try a few mbc3 locations for import

* allow list-like or numpy arrays for omega_pc and zeta_pc schedules

* create and use recorder setup function

* Pass Through Kp_float (#57)

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* fix setup_recorder to work for optimization driver too

* Allow pass through of Kp_float = 0

* cleanup om problems, update om0 calc

* doe levels as input

* negative k_float to account for OF conventions

* cleanup print statements

* variable name cleanup, use calculated k_float

* Add defaults to omega_,zeta_ pc and vs, allow to be numbers

* use standard tuning k_float as IC

* formatting update

* update problem setup methods

* cleanup add_dv, enable adding design variables after problem is setup

* change optimization step size

* more setup restructure

* update verbosity

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* Mostly a docs update (#61)

* rename for clarity

* docs major refresh

* fix FA_AccF units in debug file

* docs that build locally

* remove gitmodules

* furo theme

* furo in requirements

* move readthedocs config file, remove furo import in conf.py

* add docs requirements file

* typo

* move index out of source folder

* trying to get furo to work

* import date

* fix versions and titles, cleanup readthedocs requirements

* typo fix, remove extras

* more cleanup

* bump version

* no furo extension, "hack" to load RT version

* proper toctree paths

* specify method

* add mock modules

* fix typos

* update python install requirements

* running locally

* move index to main docs dir again

* update to build locally

* error during warnings

* automated version

* cleanup

* remove old docs

* re-add docs

* simplify

* fix figure path

* try alabaster

* remove archived docs

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* Pass through Kp_float = 0 (#59)

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* Allow pass through of Kp_float = 0

* Add flp parameters to schema

* Change Fl_Mode default to 0

* Add defaults to omega_,zeta_ pc and vs, allow to be numbers

* Allow single pitch tuning values in code, default U_pc to 0

* use nac acceleration for floating feedback

* Fix TSR saturation for region 2.5operation

* Modify system for constant power operation

* Only modify pole for constant power above-rated

* Remove GenEff from K calc

* Update tuning, use constant power

* use load_rosco_yaml

* constant power

* Fix broken tests

* Include Fl_Mode=2 for nacelle pitching feedback

* Add FOCAL inputs
- hpf on floating feedback
- lpf on wind speed estimator
- associated schema updates

* Set notch and check frequencies when Fl_Mode = 1 (fixes bug)

* Skip filter step if there's an error

* Update IEA-15MW test case DISCON with focal inputs

* Allow Fl_Mode = 2 in ROSCO

* Pass through lpf frequency

* Add FOCAL tuning yaml

* Set Cp contour number of levels

* Add FOCAL params to various writers

* Update/tune focal yaml

* Add scripts for running FAST, tuning various parameters and cases

* Add notebook for FAST plotting

* Set up step case for testing

* Change doubles to C_doubles

* Define real and integer kinds, assign to all of ROSCO

* Add ADJUSTL to DISCON error message

* Fix Fl_Mode == 2

* Fix Fl_Mode == 2 again

* Call yaw, flap, and debug only if enabled in DISOCN.IN

* Make avrSWAP a ReKi and set constant kinds

* Add DISCONs for testing - revert this later

* Fix DISCON comparison, before DISCON's were overwritten by model

* Rename DEBUG2.dbg to RootName.dbg2

* Update TestCase DISCONs to new input file

* Add API change page in docs

* Add link to API change on main page

* Fix table headers

* Fix title underlines

* Fix tables again

* Fix tables again

* Fix version numbering in docs

* Simplify FAST_directory in run_FAST

* Versioning (#65)

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* remove git versioning from cmake

* use hard coded rosco_version

* update intro write method

* set nowrap for intel compilers

* Add transfer of error message and clear message after each call

* update install instructions

* Catch nans in ROSCO at end of WSE

* fix conda install typo

* cleanup docs

* Rename DEBUG2.dbg to RootName.dbg2

* Fix Fl_Mode == 2

* Fix Fl_Mode == 2 again

* Allow Fl_Mode = 2 in ROSCO

* Set notch and check frequencies when Fl_Mode = 1 (fixes bug)

* Update FOCAL tuning yaml

* Update TSR

* Clean up and doc fix

* Remove publish to pypi

* Define all constant inputs to functions with kind typing

* Generate Test_Case/ inputs automatically

* Fix IEA15 DISCON path

* Fix example 11 paths

* Auto-generate tuning input yaml using schema

* Add toolbox_input to doc index

* Add toctree

* Re-name title of toolbox_input

Co-authored-by: Nikhar Abbas <[email protected]>
Co-authored-by: Xianping Du <[email protected]>
Co-authored-by: nikhar-abbas <[email protected]>

* update listcheck method for numpy arrays

* Open Loop Control (#98)

* create rosco types yaml

* Add more descriptions, add integer_c default, cleanup

* updates for allocatability and shapes

* python scripts to write ROSCO_types.f90

* reemove superfulous modules

* use types from ROSCO registry

* create rosco types yaml

* Add more descriptions, add integer_c default, cleanup

* updates for allocatability and shapes

* python scripts to write ROSCO_types.f90

* reemove superfulous modules

* use types from ROSCO registry

* Saturate inputs to WSE.  Needs some TLC, but seems to work

* Reduce saturation limits on speed, torque

* Re-organize, set saturation limits.  Working at 3 m/s

* Initial add of OL control to ROSCO: builds

* Update DISCONs with open loop inputs

* Fix file reading for OL_Filename

* Add open loop control generation and file writing

* Use DISCON_dict for more manageable DISCON file writing

* Add open loop example, fix constant timeseries

* Make open loop example generate power

* Handle relative paths and calling from outside the run directory:
- Some helper functions borrowed from OpenFAST, f/ext_control
- Updated file writing

* Clean up: versions, print statements

* Fix SysFiles paths in CMakeLists

* Tidy up Ext_DLL names

* More Ext_DLL name tidying

* Test write_registry.py

* Update for OL Control

* Move preprocessor lines

* add zenodo DOI

* Regenerated Types

* fix shape

* revert filepath change

* give all  types a size, ProcAddr size = 3

* update types

* test registry in compile step

* specify default shell

* update write_registry path

* remove default shell

* Document API changes, provide OL input example

* Fix example 14 (yaw input)

* Add error catching to yaw control

* Tidy up OL_Input Reading: error catching, generalize

* More yaw control fixes, to model

* Checkout develop CMakeLists for ROSCO

* Update DISCON.INs for TestCases/

* Revert "Checkout develop CMakeLists for ROSCO"

This reverts commit 87a491359d73806e3aaa59b4cfdc00f2838875df.

* Revert windows cmake stuff to develop

* Fix CMake again

* Revert "Revert windows cmake stuff to develop"

This reverts commit 39df122449b0e2055f2e12e3ce38a0c010c7bd91.

* Make last cmake fix - hopefully

Co-authored-by: Nikhar Abbas <[email protected]>

* Restart & registry (#99)

* Convert WE saved variables to WE type

* Put restart flag in localvars

* Use saved filter params from LocalVar

* save pitcomt last

* Move IPC saved variables to localvars

* Saved pi controller variables to localvar

* Save RootMyb_Last to localvar

* ROSCO_IO - initial commit. Include restart and debug functions

* Use ROSCO IO and call restart functions

* Remove debug from function.f90

* Save ACC Infile info

* update for restart capabilities

* add rosco_io with restart and debug functions

* cleanup debug call

* use registry generate types and IO

* delete DFController

* fix timestep mismatch

* remove unnecessaray istatus check

* close files

* add reg test for restart

* add restart option to run_openfast

* add testing to CI, ignore generate files

* fix fastcall

* remove extra commas

* specify gfortran-10

* testing flag cleanup

* Use lv_strings to generate debug output

* Revert "testing flag cleanup"

This reverts commit 6f295563832413e96347acd82716f9aadac6d46c.

* Revert "specify gfortran-10"

This reverts commit 4c3154491523bcd542133ca2bce5803cdc94523f.

* minor cleanup

* Use kind from constants

* Add some comments for clarity

* put debug in if statements

* separate reg tests from oother tests

* Fl_Mode>0

* Remove hard coded values

* Add filtered signals and WE_Vw to debug varrs

* cd for regtest

* Check logging level before calling debug

* add fl_pitcom and pc_minpit to debugvars

Co-authored-by: dzalkind <[email protected]>

* Break up if statement in open loop pitch (#100)

* Break up if statement in open loop pitch

* Make torque and yaw consistent with pitch: can start after some time

* add bld edgewise freq to robust dict_inputs

* Fix ccrotor inputs (#104)

* remove interpolation of blade chord and twist

* rename aerodynblade inputs

* Update surface and DISCON.INs

* Fix performance table paths

* Allow default inputs (#110)

* Allow defaults for AeroDyn inputs

* Allow AeroDyn inputs to be floats, too

* ipc (#105)

* remove interpolation of blade chord and twist

* rename aerodynblade inputs

* Update surface and DISCON.INs

* Fix performance table paths

* Add proportional control and cleanup IPC

* Add IPC and filtered RootMyc to registry

* Better logic for filtering RootMOOP and fix notch filter slopes bug

* Add cyclic flap conrol

* Fix comments in ColemanTransformInverse

* Addd IPC_KP to DISCON.IN

* Error checking foro flp or ipc

* add mutichannel plotting with tuples

* add CMakeFiles to gitignore

* Add IPC_KP to api changes

* numerical qualifiers for error handling

* add IPC gains to schema for pass-through ability

* fix variable names

* fix ipc gain printing bug

* make sure IPC_KP is positive

* Update Polars to point to coord files

* ignore dbg2 files

* Add IEA15MW_OL.yaml

* update coord reader/writer

* expand pitch_initial to 30 degrees

* Add example 13 for IPC

* Update cp surfaces and DISCONS

* add examples to readme

* cleanup and streaamline run_examples

* Add IPC tuning vars

* Allow IPC to command pitch value below peak shaving saturation limit

* shorten simulation time

* Fix Material parameter path

* Update DISCONs again

* Fix OL_Input reading

* Set wind speed, rotor speed IC in example 14

* Debug OL reading

* Add more debugging lines

* Add more debugging lines 2

* Clean up, hone in on debug call

* Disable logging level

* Update discons - resolve conflict

* Print when finished with ROSCO

* add control packageg

* Use PriPath and RootName to name dbg files

* Print AvrSWAP

* Revert "Use PriPath and RootName to name dbg files"

This reverts commit 062fcaa55b3bf42d44f8a3f163aa883ab9552412.

* Disable other examples

* Print OL inputs

* Allow logging level 3

* Print OL inputs

* Make example shorter

* Print more stuf

* Print shape

* Revert "Print OL inputs"

This reverts commit 8e2a642bb35e46850f579ca4e69ca6d6fc93f4cc.

* Update ROSCO Simulink model with IPC example

* refactor flap tuning for normalization methods

* improved flap controller filtering

* delete extra F_FlpCornerFrerq

* Update inputs, reader, and writer for OF 3.1.0

* Make sigma default interp type for multi_sigma

* Use openfast 3.1.0 in CI

* Fix leak...maybe

* Use OF 3.1.0 in testing

* Use gfotran for compile

* Clean up print statements

* Re-enable all examples

* Update NREL-5MW AD file

* Only check airfoil controls if more than one table

* Update BAR models

* Revert "Use gfotran for compile"

This reverts commit 5a6e2b7e30287a09a09781e2ba12f9b578132e1f.

* Install pyFAST for CI

* Fix some paths in ex12

* Disable example 12

* Fix example 12 linear path, re-enable

* Skip compilers install for mac

* Try gfortran-9, no compilers

* Try gfortran-10, no compilers

* Skip windows compile in pytools

* Re-enable windows, use gfortran as FC

* Unset FC in windows

* Set environment for windows when dependencies installed

* Try setting environment in installation

* Put conditional env setting in correct place

* Try in setup again

* Break up tasks: Windows vs. not

* Update DISCONs

* Update docs with new variables

* Add example documentation

* Update ROSCO Simulink model for 3.1.0

* Make IEA model float again

* Reduce IEA timestep

* Match DT to checkpoint time

Co-authored-by: dzalkind <[email protected]>

* Increment version number

* Bladed docs (#116)

* Added image of Bladed control screen setup

* Delete Bladed control screen.png

* Adding image of Bladed control screen

* Add files via upload

* Minor edit 1

* Minor change 2

* Minor change 3

* Minor change 4

* Change 6

* Change 7

* Change 8

* Minor change 9

Co-authored-by: nikhar-abbas <[email protected]>
Co-authored-by: WillC-DNV <[email protected]>

* Update version in API change docs

* Bladed readthedocs (#117)

* Added image of Bladed control screen setup

* Delete Bladed control screen.png

* Adding image of Bladed control screen

* Add files via upload

* Minor edit 1

* Minor change 2

* Minor change 3

* Minor change 4

* Change 6

* Change 7

* Change 8

* Minor change 9

* Tinker with characters in bladed instructions

* Add bladed instructions to index

* Change bladed toctree label

* Do underline stuff

* Make toctree label same as file

* Remove colons from headers

Co-authored-by: nikhar-abbas <[email protected]>
Co-authored-by: WillC-DNV <[email protected]>

* Update docs to reflect CI process

Co-authored-by: Nikhar Abbas <[email protected]>
Co-authored-by: Xianping Du <[email protected]>
Co-authored-by: nikhar-abbas <[email protected]>
Co-authored-by: WillC-DNV <[email protected]>

* Fixed wrong formatting of list items (#122)

extra newline required between list elements

* Regenerate types, IO with registry

* Update registry so first timestep is printed

* Update inverted notch to move frequency properly

* Saturate inv notch corner frequency at 0

* Add tower damper mode flag

* Flip Ct and Cq table allocation

* Regen types

* Remove print statements used for debugging

* Update input files: IEA model has pitch actuator

* Add back flap control (no idea when it was deleted)

* Update discons, docs with API change

Co-authored-by: nikhar-abbas <[email protected]>
Co-authored-by: Nikhar Abbas <[email protected]>
Co-authored-by: Xianping Du <[email protected]>
Co-authored-by: WillC-DNV <[email protected]>
Co-authored-by: Gustavo Hylander <[email protected]>

* Add max_torque_factor for constant power control, flexible upper limit

* Make update discons relative to tuning yaml

* Update AddF0 and NumCoords in FAST_reader/writer

* Add OpenFAST channels that Simulink reads (#135)

* RAAW Updates (#133)

* Convert WE saved variables to WE type

* Put restart flag in localvars

* Use saved filter params from LocalVar

* save pitcomt last

* Move IPC saved variables to localvars

* Saved pi controller variables to localvar

* Save RootMyb_Last to localvar

* ROSCO_IO - initial commit. Include restart and debug functions

* Use ROSCO IO and call restart functions

* Remove debug from function.f90

* Save ACC Infile info

* update for restart capabilities

* add rosco_io with restart and debug functions

* cleanup debug call

* use registry generate types and IO

* delete DFController

* fix timestep mismatch

* remove unnecessaray istatus check

* close files

* add reg test for restart

* add restart option to run_openfast

* add testing to CI, ignore generate files

* fix fastcall

* remove extra commas

* specify gfortran-10

* testing flag cleanup

* Use lv_strings to generate debug output

* Revert "testing flag cleanup"

This reverts commit 6f295563832413e96347acd82716f9aadac6d46c.

* Revert "specify gfortran-10"

This reverts commit 4c3154491523bcd542133ca2bce5803cdc94523f.

* minor cleanup

* Use kind from constants

* Add some comments for clarity

* put debug in if statements

* separate reg tests from oother tests

* Fl_Mode>0

* Remove hard coded values

* Add filtered signals and WE_Vw to debug varrs

* cd for regtest

* Check logging level before calling debug

* add fl_pitcom and pc_minpit to debugvars

* Turn runFAST into a class

* Refactor/simplify CaseLibrary

* Implement initial pitch actuator

* Set up steps case

* Add actuator variable

* Print first time step in debug outs

* Fix FOCAL yaml

* Set actuator to 0.25 Hz bandwidth

* ROSCO 2.5.0 (#115)

* FOCAL Updates (#64)

* Update headers

* fix bullets

* make uppercase

* Update turbine.py (#56)

* Update turbine.py

This add several lines for fixing the problem of repeated maximum values in the performance tables. This will cause the error (' the length of x and y is different.') of 'interpolate.interp1d.'

* Add comments and catch when there are multiple optimal pitch angles

Co-authored-by: dzalkind <[email protected]>

* increment version

* Update for OpenFAST v3.0.0

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* Update Testing (#58)

* Update scripts to run on eagle

* Update IEA-15MW semi example: use peak shaving w/ ps_percen=0.8

* Add comparison plots to testing scripts

* Update submit script for testing

* Update for latest eagle runs

* Add future to install dependencies

* add TMax to self, define tmin in print_results

* run tests in CI

* generic ROSCO path

* default to overwrite

* fix path

* import platform

* separate run_testing

* cleanup, specify lite test

* don't run testing in after examples, oops.

Co-authored-by: nikhar-abbas <[email protected]>
Co-authored-by: Nikhar Abbas <[email protected]>

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* Increment Version, OF3.0 (#57)

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* add ROSCO without submodule

* move ROSCO source to ROSCO folder

* Move cmake-related files to ROSCO

* Add back pesky ErrVar

* Remove parameters_files

* Merge ROSCO and _toolbox gitignore

* Fix .gitignore

* Remove Examples/DISCON.IN from git

* Fix and point example_01 to Tune_Cases/

* Update verbiage around using ofTools vs. weis

* Fix and point example_04 to Tune_Cases/

* Clean up example_06

* Clean up example_07

* Only check FlpCornerFreq if using Flp control, fixes example 05

* Make example_04 consistent with others

* Let example_05 run independently from 04

* Clean up example_05, wind files

* Add schema and update empty tuning yaml inputs, not connected yet

* Integrate schema into turbine, controller, and examples

* Only check Fl filter parameters if Fl_Mode > 0, fix example_05

* bump version to 2.3

* Compile ROSCO from ROSCO dir

* Rename to CI_rosco

* Add omega vs. windspeed functionality

* Fix tests: 5MW U_pc and 06 example dir

* Make _Toolbox vs_minspeed in rotor frame to match ROSCO

* Revert ServoDyn change

* change rotor speed constraint to be epsilon

* rename for clarity

* docs major refresh

* fix FA_AccF units in debug file

* docs that build locally

* Deallocate arrays in ROSCO, check in example_05

* Clean up comments

* remove gitmodules

* furo theme

* furo in requirements

* move readthedocs config file, remove furo import in conf.py

* add docs requirements file

* typo

* move index out of source folder

* trying to get furo to work

* import date

* fix versions and titles, cleanup readthedocs requirements

* typo fix, remove extras

* more cleanup

* bump version

* no furo extension, "hack" to load RT version

* proper toctree paths

* specify method

* add mock modules

* fix typos

* update python install requirements

* running locally

* move index to main docs dir again

* update to build locally

* error during warnings

* automated version

* cleanup

* remove old docs

* re-add docs

* simplify

* fix figure path

* try alabaster

* remove archived docs

* Add omega vs. windspeed functionality

* Fix tests: 5MW U_pc and 06 example dir

* more detailed sp.optimize settings

* run MBC3 in parallel

* restructure driver, run initialization doe for tuning

* Try new dlclose function

* Update example_05 to run simple simulation twice and check result

* Revert deallocation stuff

* Close discon library after every sim run

* Test examples on macOS and windows

* Run examples instead of testing on other platforms

* Skip examples in windows for now

* update paths and yaml load funciton

* Skip mac testing of examples

* provide default U_pc for single omega/zeta case

* allow for float or list-like pc tuning inputs

* Change name in setup.py

* WE_Vw unit fix

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* cleeanup for improved stability

* check for doe_logs as string in load_DOE

* major restructure for rsched_driver class

* cleanup verbosity

* run serial by default

* load_parallel as linturb_option

* specific IEA15MW yaml for multi omega

* remove unused module imports

* fix error message types

* lin_file as input

* add comments on inputs to LinearTurbineModel init method

* remove relative file paths

* provide OpenFAST linearizations for IEA15MW UMaineSemi

* put plotting in specific function

* fix WE_lambda units

* add self in on a few necessary variables

* creaete example 12 for robust scheduling

* try a few mbc3 locations for import

* allow list-like or numpy arrays for omega_pc and zeta_pc schedules

* create and use recorder setup function

* Pass Through Kp_float (#57)

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* fix setup_recorder to work for optimization driver too

* Allow pass through of Kp_float = 0

* cleanup om problems, update om0 calc

* doe levels as input

* negative k_float to account for OF conventions

* cleanup print statements

* variable name cleanup, use calculated k_float

* Add defaults to omega_,zeta_ pc and vs, allow to be numbers

* use standard tuning k_float as IC

* formatting update

* update problem setup methods

* cleanup add_dv, enable adding design variables after problem is setup

* change optimization step size

* more setup restructure

* update verbosity

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* Mostly a docs update (#61)

* rename for clarity

* docs major refresh

* fix FA_AccF units in debug file

* docs that build locally

* remove gitmodules

* furo theme

* furo in requirements

* move readthedocs config file, remove furo import in conf.py

* add docs requirements file

* typo

* move index out of source folder

* trying to get furo to work

* import date

* fix versions and titles, cleanup readthedocs requirements

* typo fix, remove extras

* more cleanup

* bump version

* no furo extension, "hack" to load RT version

* proper toctree paths

* specify method

* add mock modules

* fix typos

* update python install requirements

* running locally

* move index to main docs dir again

* update to build locally

* error during warnings

* automated version

* cleanup

* remove old docs

* re-add docs

* simplify

* fix figure path

* try alabaster

* remove archived docs

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* Pass through Kp_float = 0 (#59)

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* Allow pass through of Kp_float = 0

* Add flp parameters to schema

* Change Fl_Mode default to 0

* Add defaults to omega_,zeta_ pc and vs, allow to be numbers

* Allow single pitch tuning values in code, default U_pc to 0

* use nac acceleration for floating feedback

* Fix TSR saturation for region 2.5operation

* Modify system for constant power operation

* Only modify pole for constant power above-rated

* Remove GenEff from K calc

* Update tuning, use constant power

* use load_rosco_yaml

* constant power

* Fix broken tests

* Include Fl_Mode=2 for nacelle pitching feedback

* Add FOCAL inputs
- hpf on floating feedback
- lpf on wind speed estimator
- associated schema updates

* Set notch and check frequencies when Fl_Mode = 1 (fixes bug)

* Skip filter step if there's an error

* Update IEA-15MW test case DISCON with focal inputs

* Allow Fl_Mode = 2 in ROSCO

* Pass through lpf frequency

* Add FOCAL tuning yaml

* Set Cp contour number of levels

* Add FOCAL params to various writers

* Update/tune focal yaml

* Add scripts for running FAST, tuning various parameters and cases

* Add notebook for FAST plotting

* Set up step case for testing

* Change doubles to C_doubles

* Define real and integer kinds, assign to all of ROSCO

* Add ADJUSTL to DISCON error message

* Fix Fl_Mode == 2

* Fix Fl_Mode == 2 again

* Call yaw, flap, and debug only if enabled in DISOCN.IN

* Make avrSWAP a ReKi and set constant kinds

* Add DISCONs for testing - revert this later

* Fix DISCON comparison, before DISCON's were overwritten by model

* Rename DEBUG2.dbg to RootName.dbg2

* Update TestCase DISCONs to new input file

* Add API change page in docs

* Add link to API change on main page

* Fix table headers

* Fix title underlines

* Fix tables again

* Fix tables again

* Fix version numbering in docs

* Simplify FAST_directory in run_FAST

* Versioning (#65)

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* remove git versioning from cmake

* use hard coded rosco_version

* update intro write method

* set nowrap for intel compilers

* Add transfer of error message and clear message after each call

* update install instructions

* Catch nans in ROSCO at end of WSE

* fix conda install typo

* cleanup docs

* Rename DEBUG2.dbg to RootName.dbg2

* Fix Fl_Mode == 2

* Fix Fl_Mode == 2 again

* Allow Fl_Mode = 2 in ROSCO

* Set notch and check frequencies when Fl_Mode = 1 (fixes bug)

* Update FOCAL tuning yaml

* Update TSR

* Clean up and doc fix

* Remove publish to pypi

* Define all constant inputs to functions with kind typing

* Generate Test_Case/ inputs automatically

* Fix IEA15 DISCON path

* Fix example 11 paths

* Auto-generate tuning input yaml using schema

* Add toolbox_input to doc index

* Add toctree

* Re-name title of toolbox_input

Co-authored-by: Nikhar Abbas <[email protected]>
Co-authored-by: Xianping Du <[email protected]>
Co-authored-by: nikhar-abbas <[email protected]>

* update listcheck method for numpy arrays

* Open Loop Control (#98)

* create rosco types yaml

* Add more descriptions, add integer_c default, cleanup

* updates for allocatability and shapes

* python scripts to write ROSCO_types.f90

* reemove superfulous modules

* use types from ROSCO registry

* create rosco types yaml

* Add more descriptions, add integer_c default, cleanup

* updates for allocatability and shapes

* python scripts to write ROSCO_types.f90

* reemove superfulous modules

* use types from ROSCO registry

* Saturate inputs to WSE.  Needs some TLC, but seems to work

* Reduce saturation limits on speed, torque

* Re-organize, set saturation limits.  Working at 3 m/s

* Initial add of OL control to ROSCO: builds

* Update DISCONs with open loop inputs

* Fix file reading for OL_Filename

* Add open loop control generation and file writing

* Use DISCON_dict for more manageable DISCON file writing

* Add open loop example, fix constant timeseries

* Make open loop example generate power

* Handle relative paths and calling from outside the run directory:
- Some helper functions borrowed from OpenFAST, f/ext_control
- Updated file writing

* Clean up: versions, print statements

* Fix SysFiles paths in CMakeLists

* Tidy up Ext_DLL names

* More Ext_DLL name tidying

* Test write_registry.py

* Update for OL Control

* Move preprocessor lines

* add zenodo DOI

* Regenerated Types

* fix shape

* revert filepath change

* give all  types a size, ProcAddr size = 3

* update types

* test registry in compile step

* specify default shell

* update write_registry path

* remove default shell

* Document API changes, provide OL input example

* Fix example 14 (yaw input)

* Add error catching to yaw control

* Tidy up OL_Input Reading: error catching, generalize

* More yaw control fixes, to model

* Checkout develop CMakeLists for ROSCO

* Update DISCON.INs for TestCases/

* Revert "Checkout develop CMakeLists for ROSCO"

This reverts commit 87a491359d73806e3aaa59b4cfdc00f2838875df.

* Revert windows cmake stuff to develop

* Fix CMake again

* Revert "Revert windows cmake stuff to develop"

This reverts commit 39df122449b0e2055f2e12e3ce38a0c010c7bd91.

* Make last cmake fix - hopefully

Co-authored-by: Nikhar Abbas <[email protected]>

* Restart & registry (#99)

* Convert WE saved variables to WE type

* Put restart flag in localvars

* Use saved filter params from LocalVar

* save pitcomt last

* Move IPC saved variables to localvars

* Saved pi controller variables to localvar

* Save RootMyb_Last to localvar

* ROSCO_IO - initial commit. Include restart and debug functions

* Use ROSCO IO and call restart functions

* Remove debug from function.f90

* Save ACC Infile info

* update for restart capabilities

* add rosco_io with restart and debug functions

* cleanup debug call

* use registry generate types and IO

* delete DFController

* fix timestep mismatch

* remove unnecessaray istatus check

* close files

* add reg test for restart

* add restart option to run_openfast

* add testing to CI, ignore generate files

* fix fastcall

* remove extra commas

* specify gfortran-10

* testing flag cleanup

* Use lv_strings to generate debug output

* Revert "testing flag cleanup"

This reverts commit 6f295563832413e96347acd82716f9aadac6d46c.

* Revert "specify gfortran-10"

This reverts commit 4c3154491523bcd542133ca2bce5803cdc94523f.

* minor cleanup

* Use kind from constants

* Add some comments for clarity

* put debug in if statements

* separate reg tests from oother tests

* Fl_Mode>0

* Remove hard coded values

* Add filtered signals and WE_Vw to de…
  • Loading branch information
16 people authored Apr 11, 2023
1 parent 41f2c00 commit e3b7db7
Show file tree
Hide file tree
Showing 134 changed files with 19,226 additions and 2,128 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Examples/*.p

# Exclude testing results
ROSCO_testing/results/
ROSCO_testing/testing

# Simulink/Matlab temp files
*.slxc
Expand Down
2 changes: 1 addition & 1 deletion Examples/01_turbine_model.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_01 --------------
----------- 01_turbine_model --------------
Load and save a turbine model
-------------------------------------
In this example:
Expand Down
2 changes: 1 addition & 1 deletion Examples/02_ccblade.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_03 --------------
----------- 02_ccblade --------------
Run CCblade, save a rotor performance text file
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Examples/03_tune_controller.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_04 --------------
----------- 03_tune_controller --------------
Load a turbine model and tune the controller
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Examples/04_simple_sim.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_05 --------------
----------- 04_simple_sim --------------
Run and plot a simple simple step wind simulation
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Examples/05_openfast_sim.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_06 --------------
----------- 05_openfast_sim --------------
Load a turbine, tune a controller, run OpenFAST simulation
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Examples/06_peak_shaving.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_07 --------------
----------- 06_peak_shavings --------------
Load saved turbine, tune controller, plot minimum pitch schedule
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Examples/07_openfast_outputs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_08 --------------
----------- 07_openfast_outputss --------------
Plot some OpenFAST output data
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Examples/08_run_turbsim.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_09 --------------
----------- 08_run_turbsim --------------
Run TurbSim to create wind field binary
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Examples/09_distributed_aero.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_10 --------------
----------- 09_distributed_aero --------------
Tune a controller for distributed aerodynamic control
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Examples/10_linear_params.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_11 --------------
----------- 10_linear_params --------------
Load a turbine, tune a controller, export linear model
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Examples/11_robust_tuning.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
----------- Example_12 --------------
----------- 11_robust_tuning --------------
Controller tuning to satisfy a robustness criteria
-------------------------------------
NOTE: This example necessitates the mbc3 through either pyFAST or WEIS
Expand Down
153 changes: 53 additions & 100 deletions Examples/12_tune_ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,105 +14,58 @@
import matplotlib.pyplot as plt

# ROSCO toolbox modules
from ROSCO_toolbox import controller as ROSCO_controller
from ROSCO_toolbox import turbine as ROSCO_turbine
from ROSCO_toolbox.utilities import DISCON_dict
from ROSCO_toolbox.ofTools.fast_io import output_processing
from ROSCO_toolbox.inputs.validation import load_rosco_yaml
from ROSCO_toolbox.ofTools.case_gen.CaseLibrary import set_channels
from ROSCO_toolbox.ofTools.case_gen.runFAST_pywrapper import runFAST_pywrapper_batch
from ROSCO_toolbox.ofTools.case_gen.CaseGen_General import CaseGen_General



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')
example_name = '12_ipc_sim'
run_dir = os.path.join(example_out_dir, example_name)

# Load yaml file (Open Loop Case)
parameter_filename = os.path.join(rosco_dir,'Tune_Cases/BAR.yaml')

inps = load_rosco_yaml(parameter_filename)
path_params = inps['path_params']
turbine_params = inps['turbine_params']
controller_params = inps['controller_params']

# Turn flaps off and IPC on
controller_params['Flp_Mode'] = 0
controller_params['IPC_ControlMode'] = 1

# Instantiate turbine, and controller
turbine = ROSCO_turbine.Turbine(turbine_params)
controller = ROSCO_controller.Controller(controller_params)

# Load turbine data from OpenFAST and rotor performance text file
turbine.load_from_fast(
path_params['FAST_InputFile'],
os.path.join(this_dir, path_params['FAST_directory'])
)
# Tune controller
controller.tune_controller(turbine)

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

case_inputs = {}
case_inputs[('ServoDyn','DLL_FileName')] = {'vals': [rosco_dll], 'group': 0}
case_inputs[('ServoDyn','Ptch_Cntrl')] = {'vals': [1], 'group': 0}

# Apply all discon variables as case inputs
discon_vt = DISCON_dict(
turbine,
controller,
txt_filename=os.path.join(this_dir,path_params['FAST_directory'],path_params['rotor_performance_filename'])
)

for discon_input in discon_vt:
case_inputs[('DISCON_in',discon_input)] = {'vals': [discon_vt[discon_input]], 'group': 0}

# Generate cases
if not os.path.exists(run_dir):
os.makedirs(run_dir)

case_list, case_name_list = CaseGen_General(case_inputs, dir_matrix=run_dir, namebase='ipc_example')
channels = set_channels()
channels['BldPitch2'] = True
channels['BldPitch3'] = True

# Run FAST cases
fastBatch = runFAST_pywrapper_batch()

fastBatch.FAST_directory = os.path.realpath(os.path.join(rosco_dir,'Tune_Cases',path_params['FAST_directory']))
fastBatch.FAST_InputFile = path_params['FAST_InputFile']
fastBatch.channels = channels
fastBatch.FAST_runDirectory = run_dir
fastBatch.case_list = case_list
fastBatch.case_name_list = case_name_list
fastBatch.debug_level = 2
fastBatch.FAST_exe = 'openfast'

fastBatch.run_serial()


# # Define Plot cases
cases = {}
cases['Baseline'] = ['Wind1VelX', ('BldPitch1', 'BldPitch2', 'BldPitch3'), 'RootMyc1', 'RotSpeed']

out_file = os.path.join(example_out_dir,example_name,'ipc_example_0.outb')
op = output_processing.output_processing()
fastout = op.load_fast_out(out_file, tmin=0)
fig, ax = op.plot_fast_out(cases=cases,showplot=False)
if False:
plt.show()
else:
fig[0].savefig(os.path.join(example_out_dir,'13_ipc_FAST_Out.png'))


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

def main():
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')
example_name = '12_ipc_sim'
run_dir = os.path.join(example_out_dir, example_name)

# Load yaml file (Open Loop Case)
parameter_filename = os.path.join(rosco_dir,'Tune_Cases/NREL2p8.yaml')

case_inputs = {}
case_inputs[('ServoDyn','Ptch_Cntrl')] = {'vals': [1], 'group': 0}
case_inputs[('DISCON_in','IPC_SatMode')] = {'vals': [0,1,2,3], 'group': 1}



# simulation set up
r = run_FAST_ROSCO()
r.tuning_yaml = parameter_filename
r.wind_case_fcn = cl.ramp # single step wind input
r.wind_case_opts = {
'U_start': 11, # from 10 to 15 m/s
'U_end': 9,
't_start': 100,
't_end': 400,
'both_dir': True,
'vert_shear': 0.2
}
r.case_inputs = case_inputs
r.save_dir = run_dir
r.rosco_dir = rosco_dir
r.n_cores = 4
r.run_FAST()


# # Define Plot cases
cases = {}
cases['Baseline'] = ['Wind1VelX', 'BldPitch1', 'RootMyc1', 'RotSpeed']

out_files = [os.path.join(example_out_dir,example_name,f'NREL2p8/ramp/base/NREL2p8_{i_case}.outb') for i_case in range(4)]
op = output_processing.output_processing()
fastout = op.load_fast_out(out_files, tmin=0)
fig, ax = op.plot_fast_out(cases=cases,showplot=False)
if False:
plt.show()
else:
fig[0].savefig(os.path.join(example_out_dir,'12_ipc_FAST_Out.png'))

if __name__=="__main__":
main()

Loading

0 comments on commit e3b7db7

Please sign in to comment.