Modeling potential flow over rankine oval

조회 수: 17 (최근 30일)
Daniel Corrigan
Daniel Corrigan 2021년 12월 8일
There is no errors with the code, but when plotting a blacked out plot comes up. Not sure what the issue is but I appreciate any help.
clc;
clear all;
m=25;
U = 1;
a=5;
%Mesh for fourth quadrant and corresponding stream value function
[X1,Y1] = meshgrid(.05:.1:30,-30:.1:-.05);
psi1 = U*Y1*atan2(2*a*Y1, X1.^2+Y1.^2-a^2);
%Mesh for first quadrant and corresponding stream value function
[X2,Y2] = meshgrid(.05:.1:30,.05:.1:30);
psi2 = U*Y2*atan2(2*a*Y2, X2.^2+Y2.^2-a^2);
%Mesh for second quadrant and corresponding stream value function
[X3,Y3] = meshgrid(-30:.1:-.05,.05:.1:30);
psi3 = U*Y3*atan2(2*a*Y3, X3.^2+Y3.^2-a^2);
%Mesh for third quadrant and corresponding stream value function
[X4,Y4] = meshgrid(-30:.1:-.05,-30:.1:-.05);
psi4 = U*Y4*atan2(2*a*Y4, X4.^2+Y4.^2-a^2);
figure (1)
A='on';
B = 2;
C = 2.5;
contour(X1,Y1,psi1,'k','showtext',A,'textstep',B,'levelstep',C);
hold on;
contour(X2,Y2,psi2,'k','showtext',A,'textstep',B,'levelstep',C);
hold on;
contour(X3,Y3,psi3,'k','showtext',A,'textstep',B,'levelstep',C);
hold on;
contour(X4,Y4,psi4,'k','showtext',A,'textstep',B,'levelstep',C);
hold off;
xlim([-30 30]);ylim([-30 30]);
xlabel('X');ylabel('Y');
grid on;

답변 (0개)

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by