Skip to content

Conversation

@abhineet-gupta
Copy link
Collaborator

Description and Purpose

Fix startup routine to add gearbox ratio to calculations

Type of change

What types of change is it?

  • 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

Addresses #488

Examples/Testing, if applicable

N/A

! Set PRC_R_Speed, SU_PrevLoad based on SU_Stage
IF (LocalVar%SU_Stage == 1) THEN
LocalVar%PRC_R_Speed = CntrPar%SU_RotorSpeedThresh / CntrPar%PC_RefSpd
LocalVar%PRC_R_Speed = CntrPar%SU_RotorSpeedThresh / CntrPar%PC_RefSpd * CntrPar%WE_GearboxRatio
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be CntrPar%SU_RotorSpeedThresh * CntrPar%WE_GearboxRatio / CntrPar%PC_RefSpd

PC_RefSpd is a generator value.

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 think fortran calculates CntrPar%SU_RotorSpeedThresh / CntrPar%PC_RefSpd * CntrPar%WE_GearboxRatio same as CntrPar%SU_RotorSpeedThresh * CntrPar%WE_GearboxRatio / CntrPar%PC_RefSpd (unless I am mistaken).
I'll push a fix based on your suggestion as it is better for readability anyways.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, you might be correct. Have you tested this on a geared system?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tested it with NREL-5MW with two load staged of 0.2 and 1:
image
Seem to be working.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looked into why regression test is failing.
Example 11_robust_tuning.py fails becuase "self.controller.Kp_float" is a 1-d numpy array which causes error when using numpy=2.4.1 (current) here:

y = float(x)
.
The example runs fine with numpy=1.26.4.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!! I've seen similar errors over in WEIS. I can fix this to work with new versions of numpy that are now being used.

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.

2 participants