Plot a animated streamline with a stream function
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I am trying to plot animated streamline with a stream function. I used below code and its work and plot the function but I need to make it animate
% syms R r Y y a a_bar pi Gamma;
k=((4*r*R)/((y-Y)^2+(r+R)^2));
k_bar=((4*r*R)/((y+Y)^2+(r+R)^2));
[K1,E1]=ellipke(k);
[K2,E2]=ellipke(k_bar);
U=Gamma*(((R*r)^(1/2)/(2*pi*(sqrt(k))))*(((2-k)*(K1))-(2*E1))-((R*r)^(1/2)/(2*pi*sqrt(k_bar)))*(((2-k_bar)*(K2))-(2*E2)));
Ur=(1/r)*(diff(U,y));
Uy=(-1/r)*(diff(U,r));
Gamma = 1 ;
R= 1;
Y= 1;
pi= 4.*atan(1.);
[r,y] = meshgrid(0:0.2:2.5,0:0.2:2.5);
u = eval(Ur);
v = eval(Uy);
figure
startx = 0:0.2:2.5;
starty = 0:0.2:2.5;
streamline(r,y,u,v,startx,starty)
xlabel('r')
ylabel('y')
Thanks
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Vector Fields dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!