def conferenceWakeOverlap_tune(X, Y, R, boundAngle):
n = np.size(X)
boundAngle = boundAngle*np.pi/180.0
# theta = np.zeros((n, n), dtype=np.float) # angle of wake from fulcrum
f_theta = np.zeros((n, n), dtype=np.float) # smoothing values for smoothing
q = np.pi/boundAngle # factor inside the cos term of the smooth Jensen (see Jensen1983 eq.(3))
# print 'boundAngle = %s' %boundAngle, 'q = %s' %q
for i in range(0, n):
for j in range(0, n):
if X[i] < X[j]:
# z = R/tan(0.34906585)
z = R/np.tan(boundAngle) # distance from fulcrum to wake producing turbine
# print z
theta = np.arctan((Y[j] - Y[i]) / (X[j] - X[i] + z))
# print 'theta =', theta
if -boundAngle < theta < boundAngle:
f_theta[i][j] = (1. + np.cos(q*theta))/2.
# print f_theta
# print z
# print f_theta
return f_theta
评论列表
文章目录