pro m_mova
;
ip=12
ia=51
it=50
;
ib=ia*4
ima=(ia-1)/2
openr,1,'concena.dat'
openw,6,'1da.byt'
openw,2,'2da.byt'
openr,5,'bar.byt'
bar=bytarr(270,40)
readu,5,bar
c1d=assoc(6,bytarr(640,450))
c2d=assoc(2,bytarr(ib+1,ib))
concen=fltarr(ia,ia)
mm=fltarr(ia)
ml=fltarr(ia)
horz1=fltarr(2)
horz2=fltarr(2)
horz3=fltarr(2)
vert1=fltarr(2)
vert2=fltarr(2)
vert3=fltarr(2)
;
horz1(0)=0.48 & horz1(1)=0.48 & vert1(0)=0.0 & vert1(1)=0.8
;
horz2(0)=0.0 & horz2(1)=0.48 & vert2(0)=0.8 & vert2(1)=0.8
;
for i=0,50 do begin
mm(i)=i*0.04
endfor
window,1,xsize=ib+1,ysize=ib,xpos=750,ypos=150,colors=255
loadct,5
window,2,xsize=640,ysize=450,xpos=460,ypos=400,colors=255
readf,1,it
print,it
for itime=1,it do begin
readf,1,time
readf,1,concen
;
for im=0,50 do begin
ml(im)=concen(26,im)
endfor
print,ml
;
concen(ima,ip)=0.25
bconcen=congrid(concen,ib,ib)
;
bconcen(101,45)=0.25 & bconcen(102,45)=0.25 & bconcen(101,46)=0.25 
bconcen(102,46)=0.25
;
bconcen(100,44)=1.2 & bconcen(100,45)=1.2 & bconcen(100,46)=1.2 
bconcen(100,47)=1.2 & bconcen(101,47)=1.2 & bconcen(102,47)=1.2 
bconcen(103,47)=1.2 & bconcen(103,46)=1.2 & bconcen(103,45)=1.2 
bconcen(103,44)=1.2 & bconcen(102,44)=1.2 & bconcen(101,44)=1.2
bconcen(100,44)=1.2
;
for ibi=1,43 do begin
bconcen(101,ibi)=0.25
endfor
;
print,itime,ml(ip)
wset,1
bconcenr=rotate(bconcen,3)
tvscl,bconcenr,1,0
c2d(itime)=tvrd(0,0,ib+1,ib)
;
openw,4,'temp.dat'
if (itime lt 10) then printf,4,format='(i1)',itime
if (itime ge 10) then printf,4,format='(i2)',itime
close,4
openr,4,'temp.dat'
nn=string('')
readf,4,nn
if (itime lt 10) then pp="diffa0"+nn+".byt"
if (itime ge 10) then pp="diffa"+nn+".byt"
wdelete,0
window,0,xsize=200,ysize=50,xpos=100,ypos=400,colors=255
xyouts,10,30,pp,/device,size=1.3
close,4
openw,3,pp
dff=assoc(3,bytarr(640,450))
;
wset,2
!P.CHARSIZE=1.5
;!P.CHARTHICK=2.0
plot,mm,ml,back=254,color=0,$
  Title='DIFFUSION OF CARBON IN STEEL',$
  Xtitle='DEPTH, mm', Ytitle='WEIGHT PERCENT CARBON'
vert3(0)=0.8 &vert3(1)=0.8 &horz3(0)=0.55 &horz3(1)=1.27
oplot,horz1,vert1,color=0
oplot,horz2,vert2,color=0
oplot,horz3,vert3,color=0
info1=string(format='(f5.3," wt%")',ml(ip))
xyouts,240,305,info1,/device,size=1.6,color=0
info2=string(format='(f7.1," secs")',time)
xyouts,180,385,info2,/device,size=1.6,color=0
tv,c2d(itime),400,198
tv,bar,340,85
tmp=tvrd(0,0,640,450)
dff(0)=rotate(tmp,7)
c1d(itime)=tmp
erase
tv,dff(0)
close,3
endfor
close,1 & close,2 & close,3 & close,4 & close,5 & close,6
return
end