Professional Documents
Culture Documents
This Program Solves Hover Performance of A Two
This Program Solves Hover Performance of A Two
This Program Solves Hover Performance of A Two
k1=-.25*(ct/sigma);
k2=-sqrt(ct);
n=n1*n2;
dpsi=2.*pi/n1;
ddpsi=2.*pi/b;
psi=0;
psi0=0;
rv0=1.0;
zv0=0.0;
for i=1:M
v(i)=0.0;
end
for j=1:n
psi=j*dpsi;
rv=a+(1-a)*exp(-lambda*psi);
if(psi<2.*pi/b)
zv=k1*psi;
else
zv=k1 * 2.*pi/b+ k2 *(psi-2.*pi/b);
end
for k=1:b
psi1 = j*dpsi + (k-1)* 2*pi/b;
psi0 = psi1 - dpsi;
xv0=rv0*cos(psi0);
yv0 = - rv0*sin(psi0);
xv = rv * cos(psi1);
yv =- rv * sin(psi1);
for i = 1:M
x0 = r(i);
x1=xv0;
y1=yv0;
z1=zv0;
x2=xv;
y2=yv;
z2=zv;
r1cr2z=y1*(x0-x2)-y2*(x0-x1);
r12=(x0-x1)^2+y1*y1+z1*z1;
r22=(x0-x2)^2+y2*y2+z2*z2;
r1=(r12)^0.5;
r2=(r22)^0.5;
r1r2=r1*r2;
r1pr2=(x0-x1)*(x0-x2)+y1*y2+z1*z2;
coef1=(r1+r2)*(1.-r1pr2/r1r2);
coef2=r12*r22-r1pr2^2+rc*rc*(r12+r22-2.*r1pr2);
coef=coef1/coef2;
w=r1cr2z*coef;
v(i)=v(i)+w;
end
rv0=rv;
zv0=zv;
end
end
vi0=0.0;
plot(r,v);
% iterate on gama
for itn=1:5
for i=1:M
vi = -0.25 * gamam * v(i)/pi;
vinf=r(i);
theta=theta0+r(i)*theta1;
alpha=theta-alpha0-vi/vinf;
cl(i)=ainf*alpha;
gama(i)=0.5*vinf*c*cl(i);
if(r(i)>a)
if(vi > vi0)
gaman=gama(i);
end
end
vi0=vi;
end
gaman
err_in_gama=gaman-gamam
gamam=0.5*(gamam+gaman);
end
ct0=ct;
ct=0.0;
cq=0.0;
for i=1:M
v(i)=-0.25 * gaman * v(i)/pi;
vinf=r(i);
theta=theta0+r(i)*theta1;
alpha=theta-alpha0-vi/vinf;
cl(i)=ainf*alpha;
cd=d0+d1*alpha+d2*alpha^2;
cq=cq+.5*sigma*vinf*(v(i)*cl(i)+vinf*cd)*r(i)*dr(i);
if(r(i) < BTIP)
if(r(i)>r0)
ct=ct+0.5*sigma*vinf*vinf*cl(i)*dr(i);
end
end
end
ct
err_ct=ct-ct0;
ct=0.5*(ct+ct0);
end
%
plot(r,v);
% plot(r,gama);
ct
cq