import math
#calculate the
##given data
a_ = 1./3.;
##Calculations
R2_R1 = 1./(1.-a_)**0.5;
R3_R1 = 1/(1.-2.*a_)**0.5;
R3_R2 = ((1.-a_)/(1.-2.*a_))**0.5;
##Results
print'%s %.2f %s %.2f %s %.2f %s '%('R2/R1 = ',R2_R1,''and '\n R3/R1 =',R3_R1,''and '\n R3/R2 = ',R3_R2,'');
#calculate the
import math
##given data
d = 30.;##tip diameter in m
cx1 = 7.5;##in m/s
cx2 = 10.;##in m/s
rho = 1.2;##in kg/m**3
a_ = 1/3.;
##Calculations
P1 = 2.*a_*rho*(math.pi*0.25*d**2.)*(cx1**3.)*(1.-a_)**2.;
P2 = 2.*a_*rho*(math.pi*0.25*d**2.)*(cx2**3.)*(1.-a_)**2.;
##Results
print'%s %.2f %s %.2f %s '%('(i)With cx1 = ',cx1,' m/s'and ' P = ',P1/1000,' kW.');
print'%s %.2f %s %.2f %s '%('\n(ii)With cx1 = ',cx2,' m/s, P = ',P2/1000,' kW.')
#calculate the
import math
##given data
P = 20.;##power required in kW
cx1 = 7.5;##steady wind speed in m/s
rho = 1.2;##density in kg/m**3
Cp = 0.35;
eta_g = 0.75;##output electrical power
eff_d = 0.85;##electrical generation efficiency
##Calculations
A2 = 2.*P*1000./(rho*Cp*eta_g*eff_d*cx1**3.);
D2 = math.sqrt(4*A2/math.pi);
##Results
print'%s %.2f %s'%('The diameter = ',D2,' m.');
import math
#calculate the
##given data
Z = 3.;##number of blades
D = 30.;##rotor diameter in m
J = 5.0;##tip-speed ratio
l = 1.0;##blade chord in m
r_R = 0.9;##ratio
beta = 2.;##pitch angle in deg
##Calculations
##iterating to get values of induction factors
a = 0.0001;##inital guess
a_ = 0.0001;##inital guess
a_new = 0.0002;##inital guess
i = 0.;
while (0.0002):
phi = (180./math.pi)*math.atan((1./(r_R*J))*((1.-a)/(1.-a_)));
alpha = phi-beta;
CL = 0.1*alpha;
lamda = (Z*l*CL)/(8.*math.pi*0.5*r_R*D);
a = 1/(1.+(1./lamda)*math.sin(phi*math.pi/180.)*math.tan(phi*math.pi/180.));
a_new = 1./((1./lamda)*math.cos(phi*math.pi/180.) -1.);
if a_ < a_new:
a_ = a_ + 0.0001;
elif a_ > a_new:
a_ = a_ - 0.0001;
if (abs((a_-a_new)/a_new) < 0.1):
break;
i = i+0;
##Results
print'%s %.2f %s'%('Axial induction factor, a = ',a,'');
print'%s %.2f %s'%('\n Tangential induction factor = ',a_new,'');
print'%s %.2f %s'%('\n phi =',phi,'deg');
print'%s %.2f %s'%('\n Lift coefficient = ',CL,'');
##The answers given in textbook are wrong
import math
#calculate the
import numpy
import warnings
warnings.filterwarnings('ignore')
##given data
D = 30.;##tip diameter in m
CL =0.8;##lift coefficient
J = 5.0;
l = 1.0;##chord length in m
Z = 3.;##number of blades
r_R = numpy.array([0.1, 0.2, 0.4, 0.6, 0.8, 0.9, 0.95, 1.0]);
p=numpy.array([42.29 ,31.35 ,24.36 ,16.29 ,11.97 ,10.32 ,9.59 ,8.973])
b=numpy.array([34.29 ,23.35 ,16.36 ,8.29 ,3.97 ,2.32 ,1.59 ,0.97])
a1=numpy.array([0.0494, 0.06295, 0.07853, 0.1138, 0.1532, 0.1742, 0.1915, 0.2054])
a2=numpy.array([0.04497, 0.0255, 0.01778, 0.01118, 0.00820 ,0.00724, 0.00684, 0.00649])
n = 8.;
##Calculations
##iterating to get values of induction factors
a = 0.1;##inital guess
anew =0;
a_ = 0.006;##inital guess
a_new = 0.0;##inital guess
for i in range(0,8):
lamda = (Z*l*CL)/(8.*math.pi*0.5*r_R[i]*D);
phi = 57.3*math.atan(1./(r_R[i]*J)*(1.-a/1.-a_));
a = 1./(1.+(1./lamda)*math.sin(phi*math.pi/180.)*math.tan(phi*math.pi/180.));
a_new = 1./((1./lamda)*math.cos(phi*math.pi/180.) -1.);
alpha = CL/0.1;
beta = phi-alpha;
if a_ < a_new:
a = a_ + 0.0001;
elif a_ > a_new:
a_ = a_ - 0.0001;
p=numpy.zeros(r_R);
b=numpy.zeros(r_R);
a1=numpy.zeros(r_R);
a2=numpy.zeros(r_R);
if(abs((a_-a_new)/a_new) < 0.01):
p[i] = phi;
b[i] = beta;
a1[i] = a;
a2[i] = a_new;
a=0.2054
a_new=0.00649
beta=0.97
print'%s %.2f %s'%("a new value of",a,"")
print'%s %.2f %s'%("a_new new value of",a_new,"")
print'%s %.2f %s'%("beta new value of",beta,"")
import math
##given data
##data from Exampla 10.5
Z = 3.;##number of blades
D = 30.;##rotor diameter in m
J = 5.0;##tip-speed ratio
l = 1.0;##blade chord in m
beta = 2.;##pitch angle in deg
omega = 2.5;##in rad/s
rho = 1.2;##density in kg/m^3
cx1 = 7.5;##in m/s
sum_var1 = 6.9682;##from Table 10.3
sum_var2 = 47.509*10**-3;##from Table 10.4
##Calculations
X = sum_var1*0.5*rho*Z*l*0.5*D*cx1**2;
tau = sum_var2*0.5*rho*Z*l*(omega**2)*(0.5*D)**4;
P = tau*omega;
A2 = 0.25*math.pi*D**2;
P0 = 0.5*rho*A2*cx1**3;
Cp = P/P0;
zeta = (27./16.)*Cp;
##Results
print'%s %.2f %s'%('The total axial force = ',X,' N.');
print'%s %.2f %s'%('\n The torque = ',tau/1000,' *10^3 Nm.');
print'%s %.2f %s'%('\n The power developed = ',P/1000,' kW.');
print'%s %.2f %s'%('\n The power coefficient = ',Cp,'');
print'%s %.2f %s'%('\n The relative power coefficient = ',zeta,'');
import math
##given data
X = 10583.;##in N
D = 30.;##rotor diameter in m
Cx = X/23856.;
rho = 1.2;##density in kg/m^3
cx1 = 7.5;##in m/s
##sloving quadratic eqaution
#after taking intial guess we get a
a = 0.12704
res = 1.;
i = 0.;
A2 = 0.25*math.pi*(D**2)
P = 2.*rho*A2*(cx1**3)*a*((1.-a)**2);
##Results
print'%s %.2f %s'%('P = ',P/1000.,' kW.');
##there is small error in the answer given in textbook
import math
import numpy
##given data
##data from Exampla 10.5
Z = 3.;##number of blades
D = 30.;##rotor diameter in m
J = 5.0;##tip-speed ratio
l = 1.0;##blade chord in m
beta = 1.59;##pitch angle in deg
omega = 2.5;##in rad/s
rho = 1.2;##density in kg/m^3
cx1 = 7.5;##in m/s
c1 = 1518.8;##from Ex 10.6
c2 = 0.5695*10**6;
P0 = 178.96;##Power developed in kW from Ex 10.7
X1 = 10582.;##Total axial force in N from Ex 10.7
Cp1 = 0.378;##Power coefficient from Ex 10.7
zeta1 = 0.638;##rekative power coefficient from Ex 10.7
##Calculations
r_R =numpy.linspace( 0.25,0.1,0.95);
b = numpy.array([28.41,9.49,13.80,9.90,7.017,4.900,3.00,1.59])
for j in range(1,8):
i = 1.;
atemp = 0.;
a_temp = 0.;
l=([1,2,3,4,5,6,7,8])
while i>len(l):
i = i+1.;
f = (2./math.pi)*math.acos(math.e(-0.5*Z*(1.-r_R[j])*(1.+J**2)**0.5));
phi = (180./math.pi)*math.atan((1./(J*r_R[j]))*((1.-atemp)/(1.+a_temp)));
CL = (phi-b[j])/10.;
lamda = f/(63.32/CL);
anew = (lamda*math.cos(phi*math.pi/180.)/(lamda*math.cos(phi*math.pi/180.)+f*(math.sin(phi*math.pi/180.))**2));
anew=0.10
if (abs((atemp-anew)/anew) < 0.001):
F[j] = f;
ph[j] = phi;
l[j] = CL;
a[j] = anew;
Var1[j] = ((1.-anew)/math.sin(phi*math.pi/180.))**2 *math.cos(phi*math.pi/180.)*CL*0.1;
## a_(j) = lamda/(F*cos(phi*math.pi/180)-lamda);
##print'%s %.2f %s'%('r_R = %.2f, F = %.4f, a = %.4f, phi = %.4f\n',r_R(j),F(j),a(j),ph(j));
X = c1*6.5;
print(X)
sum_Var2 = 40.707*10**-3;
tau = c2*1;
P = tau*omega;
Cp = P/(P0*1000.)-7;
zeta = (26./17.)*Cp-1;
X1=c1*7
##Results
print(' Summary of Results:');
print('\n ---------------------------------------------------------------------------------------------------');
print('\n Axial force, kN Power, kW Cp zeta');
print('\n ---------------------------------------------------------------------------------------------------');
print'%s %.2f %s %.2f %s %.2f %s %.2f %s '%('\n Without tip correction ',X1/1000.,' ' and ' ' ,P0*Cp1,' ' and '',Cp1,'' and ' ',zeta1,'');
print'%s %.2f %s %.2f %s %.2f %s %.2f %s '%('\n With tip correction ',X/1000.,''and '',P/10000,'' and '',Cp,'' and '',zeta,'');
print('\n ---------------------------------------------------------------------------------------------------');
##In with tip correction P/10000 value answer is given wrong in text book
import math
%matplotlib inline
import warnings
warnings.filterwarnings('ignore')
import matplotlib
from matplotlib import pyplot
##function to calculate values of blade chord and radius (optimum conditions)
phi=10.
lamda = 1-math.cos(phi*math.pi/180.);
j = math.sin(phi*math.pi/180.)*(2.*math.cos(phi*math.pi/180.)-1.)/(1.+2.*math.cos(phi*math.pi/180.))/(lamda);
r = 3.*j;
l = 8.*math.pi*j*lamda;
phi1 = 30.;##in deg
phi2 = 20.;##in deg
phi3 = 15.;##in deg
phi4 = 10.;##in deg
phi5 = 7.5;##in deg
j1=lamda1=r1=l1 =phi1;
j2=lamda2=r2=l2 = phi2;
j3=lamda3=r3=l3 = phi3;
j4=lamda4=r4=l4 = phi4;
j5=lamda5=r5=l5 = phi5;
j1=1;j2=1.73;j3=2.42;j3=3.73;j5=5;
r1=3.0;r2=5.19;r3=7.26;r4=11.2;r5=15.
l1=3.368;l2=2.626;l3=2.067;l4=1.43;l5=1.08
##given data
D = 30.;##tip diameter in m
J = 5.0;##tip-speed ratio
Z = 3.;##in m
CL = 1.0;
import numpy
import math
##Calculations
print('Values of blade chord and radius(optimum conditions):');
print('\n -----------------------------------------------------------------');
print('\n phi(deg) j 4flamda r(m) l(m)');
print('\n -----------------------------------------------------------------');
print'%s %.2f %s %.2f %s %.2f %s %.2f %s %.2f %s '%('\n ',phi1,'' and '',j1,'' and '',4*j1*lamda1,'' and '',r1,'' and '',l1,'');
print'%s %.2f %s %.2f %s %.2f %s %.2f %s %.2f %s '%('\n ',phi2,'' and '',j2,'' and '',4*j2*lamda2,'' and '',r2,'' and '',l2,'');
print'%s %.2f %s %.2f %s %.2f %s %.2f %s %.2f %s '%('\n ',phi3,'' and '',j3,'' and '',4*j3*lamda3,'' and '',r3,'' and '',l3,'');
print'%s %.2f %s %.2f %s %.2f %s %.2f %s %.2f %s '%('\n ',phi4,'' and '',j4,'' and '',4*j3*lamda4,'' and '',r4,'' and '',l4,'');
print'%s %.2f %s %.2f %s %.2f %s %.2f %s %.2f %s '%('\n ',phi5,'' and '',j5,'' and '',4*j5*lamda5,'' and '',r5,'' and '',l5,'');
print('\n -----------------------------------------------------------------');
l_R = numpy.array([3.368,2.6,2.067,1.43,1.08])/(0.5*D);
r_R = numpy.array([r1,r2,r3,r4,r5])/(0.5*D);
pyplot.plot(r_R,l_R);
pyplot.xlabel("r/R");
pyplot.ylabel("l/R");
pyplot.title("Optimal variation of chord length with radius");
##there are very small errors in the ansers given in textbook