-
Notifications
You must be signed in to change notification settings - Fork 117
Fix startup routine to add gearbox ratio to calculations #489
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
base: main
Are you sure you want to change the base?
Conversation
| ! 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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:
ROSCO/rosco/toolbox/utilities.py
Line 773 in fc11f43
| y = float(x) |
The example runs fine with numpy=1.26.4.
There was a problem hiding this comment.
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.

Description and Purpose
Fix startup routine to add gearbox ratio to calculations
Type of change
What types of change is it?
TODO Items General:
TODO Items API Change:
Github issues addressed, if one exists
Addresses #488
Examples/Testing, if applicable
N/A