how to change flow visualization to not intercept the airfoil

12 Ansichten (letzte 30 Tage)
Matthew
Matthew am 7 Jul. 2023
Kommentiert: Matthew am 8 Sep. 2023
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 Kommentare
Matthew
Matthew am 8 Sep. 2023
Hey Karan, My problem is when i change number of Ek and Em the shape of airfoil is change too .but some of the streamline that stay around the airfoil is intercept airfoil and flow seem not smooth so i wonder what code do i need to change or adapt.
Matthew
Matthew am 8 Sep. 2023
for example when i change value of both Ek,Em to 0.1 and change the alpha to 50 deg ,the figure will show that airfoil is intercept with streamline

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Airfoil tools finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by