what way do i remove the flow

8 views (last 30 days)
Matthew
Matthew on 2 Jul 2023
Edited: Matthew on 3 Jul 2023
what function do i need to remove the flow .

Accepted Answer

VBBV
VBBV on 2 Jul 2023
Edited: VBBV on 2 Jul 2023
syms alpha beta theta
U = 8; % Uniform flow velocity
z0 = 0.6; % Center of the cylinder
R = 2; % Radius of the cylinder
alpha = pi/10; % Angle of complex potential term
beta = pi/10; % Angle for additional term
xmin = -5;
xmax = 5;
ymin = -5;
ymax = 5;
npoints = 100;
tol = +2e-2; % geometric grid tolerance for flow visualization
sx = 0.5; % displacement of circle center in real axis. // velocity potential
sy = 0.1 ; % displacement of circle center in imaginary axis. // stream function
s = sx + i*sy; % resultant displacement in the z plane
[x, y] = meshgrid(linspace(xmin, xmax, npoints), linspace(ymin, ymax, npoints));
z = x + 1i*y;
% grid tolerance check for flow visualization
for p = 1:length(x)
for q = 1:length(y)
if abs(z(p,q)-s) <= R - tol
z(p,q) = NaN;
end
end
end
f = U*((z-z0).*exp(-1i*alpha) + R^2.*exp(1i*alpha)./(z-z0)) + 1i*2*R*U*sin(alpha+beta)*log(z-z0);
figure;
contourf(x, y, imag(f), 40);
hold on;
theta = linspace(0, 2*pi, 100);
xc = real(z0) + R * cos(linspace(0, 2*pi, 100))-0.1;
yc = imag(z0) + R * sin(linspace(0, 2*pi, 100))+0.1;
plot(xc, yc, 'k', 'LineWidth', 2);
axis equal;
  2 Comments
VBBV
VBBV on 2 Jul 2023
Edited: VBBV on 2 Jul 2023
Add goemetric grid tolerance as shwon above, for the streamlines flow around the cylinder defined by the Jukouskwi aerodynamic potential function.
According to Jukouskwi method, apply also the offset displacement for the cylinder along the x and y directions along the real and imaginary axis which represent the velocity potential & streamline functions.
Matthew
Matthew on 2 Jul 2023
thank you very much!!

Sign in to comment.

More Answers (0)

Categories

Find more on Numerical Integration and Differential Equations in Help Center and File Exchange

Tags

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!