채택된 답변

VBBV
VBBV 2023년 7월 2일
편집: VBBV 2023년 7월 2일

1 개 추천

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

VBBV
VBBV 2023년 7월 2일
편집: VBBV 2023년 7월 2일
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 2023년 7월 2일
thank you very much!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

제품

릴리스

R2022b

태그

질문:

2023년 7월 2일

편집:

2023년 7월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by