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

Add Startup procedure #424

Open
wants to merge 333 commits into
base: develop
Choose a base branch
from
Open

Conversation

abhineet-gupta
Copy link
Collaborator

Description and Purpose

Add startup procedure in ROSCO

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

TODO Items General:

  • Add example/test for new feature
  • Update registry
  • Run testing

TODO Items API Change:

  • [-] Update docs with API change
  • [-] Run update_rosco_discons.py in Test_Cases/
  • Update DISCON schema

Github issues addressed, if one exists

Examples/Testing, if applicable

Add Example-31 to demonstrate startup

jfrederik-nrel and others added 30 commits March 16, 2023 16:31
Added AWC inputs
Update 20_active_wake_control.py
* AWC First Version, collected changes

* Add AWC parameters to registry, regenerate types

* Apply DbKi to COMPLEX

* Re-organize AWC pitch contribution, before actuator

* Separate contribution to PitCom from mode calculation

* Make AWC_complexangle a LocalVar for logging

* Removed duplicate pitch assignment and removed MinPitch mods for AWC

* Fixes to readsetparams and awc location

* Adding NREL 2.8 127 for AWC testing

* Add case generation updates

* Add initial AWC example, needs OF3.4

* Add AWC_Mode and move AWC into subroutine

* Update example to point to correct inputs

* Remove LocalVar%PC_MinPit = CntrPar%PC_MinPit, breaking setpoint smoother

* Set min pitch for AWC

* Tidy up input additions

* Update other DISCONs

* Add AWC to toolbox schema

* Tidy example

* Update AWC example with instructions/theory

* Formatting fixes

* Prep for more modes

* Update 20_active_wake_control.py

* Fix units in schema

* Test all AWC cases in example 20

* Tidy up DISCON file writing

* Revert setup directory

* Update 20_active_wake_control.py

Documentation update:
-added type of input, either integer or float
-added suggested ranges for input variables (only one of these ranges is a hard rule that might break something if not followed, which is that AWC_NumModes>=0)
-added more description of what the azimuthal mode number is

Note to Dan: I didn't follow exactly if the units in the code changed between rad and deg - can you check that the units in rows 14-16 are correct? Also, let's have Lawrence review these additions.

* Update NREL-2p8-127_DISCON.IN

Updating units.

* Update Controllers.f90

Update units.

* Update ROSCO_Types.f90

Update units.

* Update ReadSetParameters.f90

Update units.

* Update 20_active_wake_control.py

Update units and documentation.

* Update toolbox_schema.yaml

Update units.

* Update utilities.py

Update AWC descriptions and units.

* Update rosco_types.yaml

Update AWC units.

* Added NREL-developed AWC-implementation

* Undo unintentional changes to wrie_registry.py

* Fix file writing in AWC section

* Update all DISCONs

* Add 20_awc to test_examples

* Add 2.8 to update_discons, regenerate DISCON
Should match closely to original DISCON

* Update AWC_Mode descriptions

* Updated Coleman Transformation based AWC

* Tidy print statements, file writing

* Remove duplicate PF_Offsets input read

* Rename methods in readme

* Tidy input writing, remove `future` references

* Force AWC_n into int

* Force AWC_n into int better

* Make AWC_n a list, too

* Fix input file writing, force into int in write_array

* Run ROSCO_testing from anywhere

* Dylib -> so in Test_Cases

* Updated AWC input parameters.

* Added checks for AWC inputs.

* Fixed bug in added AWC input checks.

* Update error message

* Tidy up IPC, allow AWC and IPC with warning

* Remove AWC references from IPC

* Remove lingering comment

* Tidy file writing

* Clean up comments

* Allow more than 99 local variables in dbg2

* Update api_change.rst

Added AWC inputs

* Update 20_active_wake_control.py

---------

Co-authored-by: Nathaniel deVelder <[email protected]>
Co-authored-by: kbrown1snl <[email protected]>
Co-authored-by: jfrederik-nrel <[email protected]>
Co-authored-by: jfrederik-nrel <[email protected]>
* Allow optional UAStart/EndRad

* Re-wind file read if the input is not there

* Set avrSWAP(79) to 4 to follow Bladed API

* Update documentation with new example names
Stage 1: Free-Wheeling (PRC_R_Torque is set to 0 and blade pitch is set to SU_FW_Pitch)
Stage 2 - (SU_LoadStages_N+1): PRC_R_Torque is set to values in SU_LoadStages

TODO: Can you explain all the parameters here and show an illustrative timeseries?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we expand the documentation here to include all the parameters and an illustrative timeseries? Something we think is realistic, even if long.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll update this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 9fdd36a

@@ -535,6 +536,16 @@ SUBROUTINE ReadControlParameterFileSub(CntrPar, LocalVar, accINFILE, accINFILE_s
CALL ParseAry( FileLines, 'PS_WindSpeeds', CntrPar%PS_WindSpeeds, CntrPar%PS_BldPitchMin_N, accINFILE(1), ErrVar, CntrPar%PS_Mode == 0, UnEc)
CALL ParseAry( FileLines, 'PS_BldPitchMin', CntrPar%PS_BldPitchMin, CntrPar%PS_BldPitchMin_N, accINFILE(1), ErrVar, CntrPar%PS_Mode == 0, UnEc)
IF (ErrVar%aviFAIL < 0) RETURN

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have any checks on these values?

Durations > 0, speed > 0, frequency > 0, Load stages increasing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I'll add these as well.
I think we don't strictly need the loads to be in the increasing order. The code should work just fine without it if we want to give user more freedom.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 2e9adcb
I did not include a check for load stages to be in an increasing order but they have to be positive.

description: Shutdown method {Only 1 supported for now}
type: number
default: 1
# su_fw_pitch:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these controller parameters no longer needed? Or are they just set in the DISCON directly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to the SD_* variables were meant from another pull request to fix some of the shutdown related code issues. I'll revert the unnecessary sections from this PR and put these in another.

But yes, I had duplicates of these variables under controller_params and DISCON and was only using the DISCON ones. I can discuss these in the new PR fixing code issues. The fixes would not change any functionality of the code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in eaaf6fc

@dzalkind
Copy link
Collaborator

dzalkind commented Mar 5, 2025

Overall, this looks great. Thanks!

Pending a few minor additions to the documentation and input checks, let's merge this and start on v2.10.

@abhineet-gupta
Copy link
Collaborator Author

Overall, this looks great. Thanks!

Pending a few minor additions to the documentation and input checks, let's merge this and start on v2.10.

Agreed, I'll address these today and we can merge the two PRs tomorrow.

@abhineet-gupta
Copy link
Collaborator Author

Should be ready to merge now (pending checks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants