Skip to content

Commit

Permalink
Set thrust shaving to false by default
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjasa committed Feb 12, 2021
1 parent 6460595 commit dfc2a2d
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions wisdem/rotorse/rotor_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"""

import numpy as np
from openmdao.api import Group, ExplicitComponent
from scipy.optimize import brentq, minimize, minimize_scalar
from scipy.interpolate import PchipInterpolator

from openmdao.api import Group, ExplicitComponent
from wisdem.ccblade.ccblade import CCBlade, CCAirfoil
from wisdem.commonse.utilities import smooth_abs, smooth_min, linspace_with_deriv
from wisdem.commonse.distribution import RayleighCDF, WeibullWithMeanCDF
Expand Down Expand Up @@ -218,28 +219,6 @@ def setup(self):
)
self.add_discrete_input("usecd", val=True, desc="use drag coefficient in computing induction factors")

# self.add_discrete_input('airfoils', val=[0]*n_span, desc='CCAirfoil instances')
self.add_input("airfoils_cl", val=np.zeros((n_span, n_aoa, n_Re, n_tab)), desc="lift coefficients, spanwise")
self.add_input("airfoils_cd", val=np.zeros((n_span, n_aoa, n_Re, n_tab)), desc="drag coefficients, spanwise")
self.add_input("airfoils_cm", val=np.zeros((n_span, n_aoa, n_Re, n_tab)), desc="moment coefficients, spanwise")
self.add_input("airfoils_aoa", val=np.zeros((n_aoa)), units="deg", desc="angle of attack grid for polars")
self.add_input("airfoils_Re", val=np.zeros((n_Re)), desc="Reynolds numbers of polars")
self.add_discrete_input("nBlades", val=0, desc="number of blades")
self.add_input("rho", val=1.225, units="kg/m**3", desc="density of air")
self.add_input("mu", val=1.81e-5, units="kg/(m*s)", desc="dynamic viscosity of air")
self.add_input("shearExp", val=0.0, desc="shear exponent")
self.add_discrete_input(
"nSector", val=4, desc="number of sectors to divide rotor face into in computing thrust and power"
)
self.add_discrete_input("tiploss", val=True, desc="include Prandtl tip loss model")
self.add_discrete_input("hubloss", val=True, desc="include Prandtl hub loss model")
self.add_discrete_input(
"wakerotation",
val=True,
desc="include effect of wake rotation (i.e., tangential induction factor is nonzero)",
)
self.add_discrete_input("usecd", val=True, desc="use drag coefficient in computing induction factors")

# outputs
self.add_output("V", val=np.zeros(self.n_pc), units="m/s", desc="wind vector")
self.add_output("Omega", val=np.zeros(self.n_pc), units="rpm", desc="rotor rotational speed")
Expand Down Expand Up @@ -596,7 +575,7 @@ def rated_power_dist(pitch_i, Uhub_i, Omega_rpm_i):
Cm_aero[i_3:] = 0

# Optional correction of pitch for peak thrust shaving
peak_thrust_shaving = True
peak_thrust_shaving = False
if peak_thrust_shaving:
max_T = 0.8 * np.max(T)
identify_new_rated = True
Expand Down

0 comments on commit dfc2a2d

Please sign in to comment.