plot stream lines over sphere near to rigid wall

2 visualizzazioni (ultimi 30 giorni)
Shreen El-Sapa
Shreen El-Sapa il 7 Ago 2021
Commentato: DGM il 8 Ago 2021
%subplot(2,2,1)
A=[ -0.02351
0.06333
-0.00366
0.00064
-0.00012
0.00002
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000];
B=[ 0.15421
0.00965
-0.00025
0.00001
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
.00000E+00
.00000E+00
.00000E+00
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000
0.00000];
a = 1 ; %RADIUS
L=.2;
c =-a/L;
b =a/L;
m =a*100; % NUMBER OF INTERVALS
[x,y]=meshgrid([c+.2:(b-c)/m:b],[c:(b-c)/m:b]');
[I J]=find(sqrt(x.^2+y.^2)<(a-.1));
if ~isempty(I)
x(I,J) = 0;
y(I,J) = 0;
end
r=sqrt(x.^2+y.^2);
syms t real
theta=atan2(y,x);
warning off
chi=1;alpha=1;ab1=1;n=30;
k=real(sqrt(1i.*chi.^2+alpha.^2));
h=@(t)(t-sqrt(t.^2+k.^2)).^(-1).* (t.*(exp(-sqrt(t.^2+k.^2).*(r.*cos(theta)+ab1))-exp(-t.*(r.*cos(theta)+ab1))).*(((-1).^(n-1).*t.^(n-1).*exp(-ab1.*t)./factorial( n ))+((-1).^(n).*sqrt(pi.*k./2./t.^2).*exp(-ab1.*sqrt(t.^2+k.^2)).*gegenbauerC(n,-1./2, sqrt(t.^2+k.^2)./k))).*t.*besselj(1,t.*r.*sin(theta)));
hint = integral(h, 0, inf, 'ArrayValued', true)
v=@(t)(t-sqrt(t.^2+k.^2)).^(-1).* ((-t.*exp(-sqrt(t.^2+k.^2).*(r.*cos(theta)+ab1))+sqrt(t.^2+k.^2).*exp(-t.*(r.*cos(theta)+ab1))).*(((-1).^(n).*t.^(n-1).*exp(-ab1.*t)./factorial( n))+((-1).^(n-1).*sqrt(pi.*k./2./sqrt(t.^2+k.^2).^2).*exp(-ab1.*sqrt(t.^2+k.^2)).*gegenbauerC(n,-1./2, sqrt(t.^2+k.^2)./k))).*t.*besselj(1,t.*r.*sin(theta)));
hinv = integral(v, 0, inf, 'ArrayValued', true)
psi1=0;
for i=2:10
Ai=A(i-1);Bi=B(i-1);
psi1=psi1+(Ai.*(r.^(-i+1)+hint)+(r.^(1./2).*besselk(i-1./2,r.*k)+hinv).*Bi).*gegenbauerC(i,-1./2, cos(theta));
end
[DH,h2]=contour(x,y,psi1,5,'-k');
%clabel(CH,h1,'FontSize',8);clabel(DH,h2,'FontSize',8)
hold on
m1=50;
r1=ones(1,m1+1)*a;
th=[0:2*pi/m1:2*pi];
set(polar(th,r1,'-k'),'LineWidth',1.1);
title('$\quad \frac{a_1}{a_2}=0.01, \quad \alpha=0.1$','Interpreter','latex','FontSize',10,'FontName','Times New Roman','FontWeight','Normal')
ylabel({'$\eta=1\quad\quad$'},'Interpreter','latex','FontSize',10,'rot',360,'FontName','Times New Roman','FontWeight','Normal');
%title('Happel$^\prime$s model','Interpreter','latex','FontSize',10,'FontName','Times New Roman','FontWeight','Normal')
axis square
axis on
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1 Commento
DGM
DGM il 8 Ago 2021
I suspect those values in A and B used to be meaningful, nonzero values. It looks like you copypasted them from a console display, which would mean they've been truncated. If so, all that information is gone.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by