%
%  code14.m -- vorticity diffusion
%

%  initialize workspace & set constants

clear;  clf;



nu_time = [0.25 1.0 4]; 

for j =1:size(nu_time,2)
  y  = (0:0.1:5);
  eta = y/sqrt(nu_time(j));
  
%  plot velocity profile
  subplot(1,2,1)
  plot(erfc(eta/2),y,'k.')
  hold on
  plot(erfc(eta/2),y,'b')
  ttext = ['\nu t=' num2str(nu_time(j))];
%  text(erfc(eta(15)/2)+0.05,y(15),ttext)

%  plot vorticity profile
  subplot(1,2,2)
  plot(exp(-eta.^2/4)/sqrt(pi*nu_time(j)),y,'k.')
  hold on
  plot(exp(-eta.^2/4)/sqrt(pi*nu_time(j)),y,'r')
  ttext = ['\nu t=' num2str(nu_time(j))];
end

subplot(1,2,1)
axis([0 1 0 5])
title('\bf shear velocity profile: u(y)')
xlabel('\bf u(\eta)/U^{wall} (dimensionless)')
ylabel(['\bf y (at \nu t=' num2str(nu_time) ')'])

subplot(1,2,2)
axis([0 1.2 0 5])
title('\bf vorticity profile: \omega(y)')
xlabel('\bf \omega(y)/U^{wall} (units = length^{-1})')
ylabel(['\bf y (at \nu t=' num2str(nu_time) ')'])

