Code:
function [a b gocdat]=hsdtheobk(U,R,landa,goctan)
omega=U*landa/R;
a(1)=0;
b(1)=0;
k=1;
ss=1e-7;
cl=0.8;
cd=0.012;
ha(1)=3;
hb(1)=3;
for x=0.1:0.05:1
while ((ha(k)>ss)&(hb(k)>ss))
phi(k+1)=atan((1-a(k))./((1+b(k))*landa*x));
t=((0.3)./(2*phi(k+1)*x));
Cx(k+1)=cl*cos(phi(k+1))+ cd*sin(phi(k+1));
Cy(k+1)=cl*sin(phi(k+1))- cd*cos(phi(k+1));
a(k+1)=1./(1+t*(Cx(k+1)-t*Cy(k+1)*Cy(k+1)./(4*sin(phi(k+1))*sin(phi(k+1))))./(4*sin(phi(k+1))*sin(phi(k+1))));
b(k+1)=1./(4*sin(phi(k+1))*sin(phi(k+1))*Cx(k+1)./(t*Cy(k+1)*Cy(k+1))-1);
ha(k+1)=a(k+1)-a(k);
hb(k+1)=b(k+1)-b(k);
k=k+1;
end
gocdat=(phi(end)-goctan)*180/pi;
a=a(end);
b=b(end);
end
kết quả sau khi chạy :
Code:
>> U=9; >> R=1.5; >> landa=6; >> goctan=4*pi/180; >> [a b gocdat]=hsdtheobk(U,R,landa,goctan) a = -5.7224e-004 b = -1.5842 gocdat = -0.1912

Comment