Plot  the "data" from EZM

This notebook makes the pretty plots of the EZM model output, as seen in the treatise An Unstable Parallel Flow.

Initialization

in=65;

jn=65;

dx=Pi/(in-1)//N

dz=2/(jn-1)//N

(*path="Power HD:5123 notebooks:ezm:"*)
path="ezm/"

stream[u_,jn_,in_]:=Module[
		{psi},
		psi=Table[0,{j,1,jn},{i,1,in}];
		Do[psi[[j,i]]=psi[[j-1,i]]-
			.5*(u[[j-1,i]]+u[[j,i]])*dz,
			{j,2,jn},{i,1,in}];
		psi]

vort[u_,w_,jn_,in_]:=Module[
		{vort},
		vort=Table[0,{j,1,jn-1},{i,1,in-1}];
		Do[vort[[j,i]]=
		-.5*(u[[j+1,i]]+u[[j+1,i+1]]-
					u[[j,i]]-u[[j,i+1]]
					)/dz
			+.5*(w[[j,i+1]]+w[[j+1,i+1]]-
					w[[j,i]]-w[[j+1,i]]
					)/dx
			,
			{j,1,jn-1},{i,1,in-1}];
		vort]

pert[psi_,jn_,in_]:=Module[
		{psimean,psipert},
		psimean=Table[
				Sum[psi[[j,i]],{i,1,in-1}]/(in-1)
				,{j,1,jn}];
	psipert=Table[
				psi[[j,i]]-psimean[[j]],
				{j,1,jn},{i,1,in}];
		psipert
		]

Grayy[z_]:=RGBColor[.3+.6*z,.3+.6*z,.3+.6*z]

RevGray[z_]:=RGBColor[.3+.6*(1-z),.3+.6*(1-z),.3+.6*(1-z)]

MakePlots[ufile_,wfile_,psiplot_,vortplot_,pertplot_]:=Module[{w,u,psi},w=ReadList[path<>wfile,Table[Number,{in}]];u=ReadList[path<>ufile,Table[Number,{in}]];psi=stream[u,in,jn];psiplot=ListContourPlot[psi,AspectRatio->(2/π),ColorFunction->Gray,Contours->{0.1`,0.2`,0.3`,0.4`,0.5`,0.6`,0.7`,0.8`,0.9`,1.`,1.1`,1.2`},Frame->False];vortplot=ListContourPlot[vort[u,w,in,jn],AspectRatio->(2/π),ColorFunction->Grayy,Contours->{-0.5`,-1.`,-1.5`,-2.`,-2.5`,-3.`,-3.5`,-4.`},Frame->False];pertplot=ListContourPlot[pert[psi,in,jn],AspectRatio->(2/π),ColorFunction->Grayy,Frame->False]]

Plot  the Data

Clear[psi00,vort00,pert00];MakePlots["ustbu000.dat","ustbw000.dat",psi00,vort00,pert00]

Clear[psi05,vort05,pert05];MakePlots["ustbu001.dat","ustbw001.dat",psi05,vort05,pert05]

Clear[psi10,vort10,pert10];MakePlots["ustbu002.dat","ustbw002.dat",psi10,vort10,pert10]

Clear[psi13,vort13,pert13];MakePlots["ustbu003.dat","ustbw003.dat",psi13,vort13,pert13]

Clear[psi15,vort15,pert15];MakePlots["ustbu003.dat","ustbw003.dat",psi15,vort15,pert15]

Clear[psi20,vort20,pert20];MakePlots["ustbu004.dat","ustbw004.dat",psi20,vort20,pert20]

max(w) as a function of time

wmax=ReadList[path<>"woftime.dat",Table[Number,{2}]];

wmaxplot=ListPlot[wmax,AxesLabel->{"t",""}]

Export["wmax.eps",wmaxplot,"EPS"];

{times,wlist}=Transpose[wmax];

logwmax=Transpose[{times,Log[wlist]}];

logwmaxplot=ListPlot[logwmax,AxesLabel->{"t",""},AxesOrigin->{0,-9}]

Export["wmaxlog.eps",logwmaxplot,"EPS"];