what way do i remove the flow

8 ビュー (過去 30 日間)
Matthew
Matthew 2023 年 7 月 2 日
編集済み: Matthew 2023 年 7 月 3 日
what function do i need to remove the flow .

採用された回答

VBBV
VBBV 2023 年 7 月 2 日
編集済み: VBBV 2023 年 7 月 2 日
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 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by