%  Translation flow around cylinder.
%	Domain is between theta = 0 and theta = 2*pi for 1 < r < beta
%  Movie of nframes contour plots of streamlines
clear all
clf reset
beta=input('beta = ');
nframes=input('nframes = ');
u=load('u.dat');
v=load('v.dat');
JMAX=size(u);
del=1/(JMAX(1)-1);
z=0:del:1;
gamma=1/log(beta);
[th,r]=meshgrid(0:del*2*pi:2*pi,exp(z./gamma));
[x,y]=pol2cart(th,r);
%	View value of arrays
M=moviein(nframes);
V=linspace(-.5,.5,20);
for nframe=1:nframes
clf reset
fname=['s',num2str(nframe),'.dat'];
array=load(fname);
contour(x,y,array',V,'k')
title(['Flow Past Cylinder'])
hold on
contour(x,y,array',[0 0],'r:')
plot(x(1,:)', y(1,:)','k')% Plot of boundary
axis image
M(:,nframe)=getframe;
end
movie(M,3,4)
