Rankine Leading Edge Graph
Afficher commentaires plus anciens
m = 1;
V = 1;
disp('V m')
disp([V m])
disp('Velocity Potential:')
disp('Stream function:')
disp('psi=V*y+(m/2/pi * atan2(y,x)')
disp('The (x,y) components of velocity (u,v):')
disp('u = V + m/2pi*x/(x^2+y^2)')
disp('v = m/2pi * y/(x^2+y^2)')
xstg = -m/2/pi/V;
ystg = 0; %stagnation point locations
N = 1000;
xinf = 3;
xd = xstg:xinf/N:xinf;
for n = 1:length(xd)
if n ==1
yd(1) = 0;
else
yd(n) = m/2/V;
for it = 1:2000
yd(n) = (m/2/V)*(1-1/pi*atan2(yd(n),xd(n)));
end
end
end
xL(1) = xd(end);
yL = -yd(end);
for nn = 2:length(xd)-1
xL(nn) = xd(end-nn);
yL(nn) = -yd(end-nn);
end
plot([xd xL],[yd yL],'k',[-1 3],[0 0],'k'), axis([-1 3 -1 1])
u = V +(m/2*pi)*(xd./(xd.^2+yd.^2));
v = m/(2*pi)*(yd./(xd.^2+yd.^2));
Cp = 1 - (u.^2+v.^2)/V^2;
hold on
plot(xd,Cp); axis([-1 3 -1 1])
plot(0,m/V/4,'o')
plot(xstg,ystg,'o')
plot([1 3],[m/2/V],'--k')
[Cpmin ixd] = min(Cp);
xmin = xd(ixd);
ymin = yd(ixd);
plot(xmin,ymin,'+r')
Cpmin
phi = V*xd + (m/4/pi).*log(xd.^2+yd.^2);
dx = diff(xd);
dy = diff (yd);
ds = sqrt(dx.^2+dy);
dph = diff(phi);
ut = dph./ds;
xm = xd(1:end-1)+dx/2;
psi= V*yd + (m/2/pi).*atan2(yd,xd);
plot(xm,1-ut.^2/V^2,'r')
th = 0:pi/25:2*pi;
r = (m/2/pi/V)*(pi-th)./sin(th);
xb=r.*cos(th);
yb=r.*sin(th);
plot(xb,yb,'om')
thm = 0;
for nit = 1:1000
thm = atan2(pi-thm,pi-thm-1);
end
thdegrees = thm*180/pi;
rm=(m/2/pi/V)*(pi-thm)/sin(thm)
xm = rm*cos(thm);
ym = rm*sin(thm);
plot(xm,rm,'dk')
um = V +m/2/pi*xmin/(xmin^2+ymin^2);
vm = m/2/pi*ymin/(xmin^2+ymin^2);
Cpm = 1 - (um^2+vm^2)/V^2
title('Rankine Nose Outline')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Vector Fields dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

