if !d.name eq 'PS' then begin device,xsize=14,ysize=10,yoffset=3 !p.charthick=3 & !p.thick=3 & !x.thick=3 & !y.thick=3 end if !d.name eq 'X' then begin window,0,xsize=640*9/10,ysize=480*9/10 end ; ; mv idl.ps ../fig/compare_smagorinsky_energy128.ps ; siz=1.4 !p.charsize=1.4 ; ; This program compares the spectra of different 64³ Smagorinsky runs ; with different D_smag in order to see which D_smag should be used. ; ; To make this work you must first run prepare_nohel_smag.sh ; in all the directories of interest. ; ; Set some auxillary variables ; rootdir='$PENCIL_HOME/nils/isoforce/LES/Smagorinsky/magnetic/' savfile='spec_aver.sav' ; ; Read in data from different runs ; dir='smagorinsky64a/' file=rootdir+dir+savfile restore,file=file speua64=speu & speba64=speb & k64=k kina64=total(speu) maga64=total(speb) ; dir='smagorinsky64b/' file=rootdir+dir+savfile restore,file=file speub64=speu & spebb64=speb kinb64=total(speu) magb64=total(speb) ; dir='smagorinsky64c/' file=rootdir+dir+savfile restore,file=file speuc64=speu & spebc64=speb kinc64=total(speu) magc64=total(speb) ; dir='smagorinsky64h/' file=rootdir+dir+savfile restore,file=file speuh64=speu & spebh64=speb kinh64=total(speu) magh64=total(speb) ; dir='smagorinsky128a/' file=rootdir+dir+savfile restore,file=file speua128=speu & speba128=speb & k128=k kina=total(speu) maga=total(speb) ; dir='smagorinsky128b/' file=rootdir+dir+savfile restore,file=file speub128=speu & spebb128=speb kinb=total(speu) magb=total(speb) ; dir='smagorinsky128c/' file=rootdir+dir+savfile restore,file=file speuc128=speu & spebc128=speb kinc=total(speu) magc=total(speb) ; dir='smagorinsky128d/' file=rootdir+dir+savfile restore,file=file speud128=speu & spebd128=speb kind=total(speu) magd=total(speb) ; ; Read in some bencmarking runs with real viscosity ; rootdir='$PENCIL_HOME/runs/forced/' ; dir='nohel1024a/' file=rootdir+dir+savfile restore,file=file speu1024=speu & speb1024=speb & k1024=k kin1024=total(speu) mag1024=total(speb) ; ; 128^3 ; kin=[kinc,kina,kinb,kind] mag=[magc,maga,magb,magd] smag=[0.1,0.2,0.3,0.5] ; ; 64^3 ; kin64=[kinb64,kina64,kinc64,kinh64] mag64=[magb64,maga64,magc64,magh64] smag64=[0.1,0.2,0.3,0.5] ; ; Plot energy for all runs ; !p.multi=[0,1,1] plot,smag,kin,ps=-1,xr=[0,0.55],yr=[0,0.01],xtitle='!8C!d!6M!n' oplot,smag,mag,ps=-2 oplot,smag64,kin64,ps=-1,li=2 oplot,smag64,mag64,ps=-2,li=2 ; smag_ref=indgen(7)/10. oplot,smag_ref,smag_ref-smag_ref+kin1024,li=1 oplot,smag_ref,smag_ref-smag_ref+mag1024,li=1 ; ; legends ; xx=0.04 & dx=0.07 yy=0.009 & dy=-0.0007 legend,xx,dx,yy+dy*0,0,'Smagorinsky, 128!u3!n',siz=siz legend,xx,dx,yy+dy*1,2,'Smagorinsky, 64!u3!n',siz=siz legend,xx,dx,yy+dy*2,1,'Ordinary, 1024!u3!n',siz=siz ; xx=0.39 & dx=0. yy=0.0045 & dy=-0.0008 ;legend,xx,dx,yy+dy*0,0,' !8E!6!dKin!n',siz=siz,ps=1 ;legend,xx,dx,yy+dy*1,0,' !8E!6!dMag!n',siz=siz,ps=2 ; xyouts,0.43,0.0075,'!8E!6!dKin!n',siz=siz xyouts,0.43,0.0017,'!8E!6!dMag!n',siz=siz ; !x.title='' !y.title='' ; END