how to change flow visualization to not intercept the airfoil
12 views (last 30 days)
Show older comments
how do i change the flow to not intercept the airfoil even when i change the shape of airfoil flow,Here is my code.
U = 4;
alpha = 20; % angle of attack, deg
alpha = alpha*pi/180; % angle of attack in radians
beta = (alpha);
Ek = 0.3; % displacement of circle center in real axis. // velocity potential
Em = 0.1 ; % displacement of circle center in imaginary axis. // stream function
Z0 = -Ek/4 + 1i*(Em/4); % resultant displacement in the z plane
r = 0.45;
k = 2*r*U*sin(beta+alpha);
a = r-Z0;
tol = +5e-20;
[x y]= meshgrid(-5:.01:5);
z = x + 1i*y;
w = U * exp(-1i*alpha);
% grid tolerance check for flow visualization
for p = 1:length(x)
for q = 1:length(y)
if abs(z(p,q)-(Z0)) <= r - tol
z(p,q) = NaN;
end
end
end
for p = 1:length(x)
for q = 1:length(y)
f(p,q) = w*(z(p,q)-Z0) + (U*exp(1i*alpha)*r^2)./(z(p,q)-Z0) + 1i*k*log(z(p,q)-Z0);
J(p,q) = z(p,q)+a^2./z(p,q); % grid in the airfoil plane
end
end
phi = 0:.05:2*pi;
for p = 1:length(phi)
zcylin(p) = r*(exp(1i*phi(p))) + Z0;
zair(p) = zcylin(p)+(a^2./(zcylin(p)));
end
figure(2)
hold on
v2 = -100:1:100;
contourf(real(J),imag(J),imag(f),v2);
fill(-real(zair),imag(zair),'k')
axis equal
axis(2*[-1 1 -1 1])
title('Streamline around airfoil. ');
3 Comments
Answers (0)
See Also
Categories
Find more on Airfoil tools in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!