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

RAAW Controller #84

Merged
merged 14 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ROSCO_toolbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def tune_controller(self, turbine):
for i in range(len(TSR_op)):
# Find pitch angle as a function of expected operating CP for each TSR
Cp_TSR = np.ndarray.flatten(turbine.Cp.interp_surface(turbine.pitch_initial_rad, TSR_op[i])) # all Cp values for a given tsr
Cp_op[i] = np.clip(Cp_op[i], np.min(Cp_TSR), np.max(Cp_TSR)) # saturate Cp values to be on Cp surface
Cp_maxidx = Cp_TSR.argmax() # Find maximum Cp value for this TSR
Cp_maxidx = Cp_TSR.argmax()
Cp_op[i] = np.clip(Cp_op[i], np.min(Cp_TSR[Cp_maxidx:]), np.max(Cp_TSR[Cp_maxidx:])) # saturate Cp values to be on Cp surface # Find maximum Cp value for this TSR
f_cp_pitch = interpolate.interp1d(Cp_TSR[Cp_maxidx:],pitch_initial_rad[Cp_maxidx:]) # interpolate function for Cp(tsr) values
# expected operation blade pitch values
if v[i] <= turbine.v_rated and isinstance(self.min_pitch, float): # Below rated & defined min_pitch
Expand Down
4 changes: 2 additions & 2 deletions ROSCO_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ def load_from_ccblade(self):
self.load_blade_info()

# Generate the look-up tables, mesh the grid and flatten the arrays for cc_rotor aerodynamic analysis
TSR_initial = np.arange(3, 15,0.5)
pitch_initial = np.arange(-1,25,0.5)
TSR_initial = np.arange(2, 15,0.5)
pitch_initial = np.arange(-5,25,0.5)
pitch_initial_rad = pitch_initial * deg2rad
ws_array = np.ones_like(TSR_initial) * self.v_rated # evaluate at rated wind speed
omega_array = (TSR_initial * ws_array / self.rotor_radius) * RadSec2rpm
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dependencies:
- pandas
- wisdem
- cmake
- pyparsing==2.4.7