Fix startup routine to add gearbox ratio to calculations#489
Fix startup routine to add gearbox ratio to calculations#489dzalkind merged 5 commits intoNatLabRockies:mainfrom
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.
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.
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.
Ah, you might be correct. Have you tested this on a geared system?
There was a problem hiding this comment.
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: https://github.com/NREL/ROSCO/blob/fc11f43984876559c8b355e5070dd8147c4225da/rosco/toolbox/utilities.py#L773.
The example runs fine with numpy=1.26.4.
There was a problem hiding this comment.
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