主题:帮忙看下哪错了
刚学FORTRAN没多久,程序运行不了,也不知道哪出错了,帮忙看下吧,谢谢!
read(*,*)dr,dz,re,ra,h,c,m,dt,tf,ta,tb
n=100
dimension tp(2,n),tq(2,n)
do 10 j=1,n
t1(0,j)=tb
do 10 i=1,2
t1(i,j)=ta
10 continue
do 20 k=1,10
do 30 j=2,n-1
tq(1,j)=dt*(re*t1(0,j)+ra*tp(2,j))/m*c*dr**2+dt*(ra*t1(1,j-1)+ra*tp(1,j+1))/m*c*dz**2+(1-dt*(re+ra)/m*c*dr**2-dt*2*ra/m*c*dz**2)*t1(1,j)
30 continue
t2(1,1)=dt*(re*t1(0,1)+ra*(t1(2,1))/m*c*dr**2+dt*ra*t1(1,2)/m*c*dz**2+(1-dt*(re+ra)/m*c*dr**2-dt*ra/m*c*dz**2)*t1(1,1)
t2(1,n)=dt*(re*t1(0,m)+ra*(tp(2,m))/m*c*dr**2+dt*ra*t1(1,m-1)/m*c*dz**2+dt*h*tf/m*c*dt+(1-dt*(re+ra)/m*c*dt-dt*(ra/dz+h)/m*c*dz)*t1(i,j)
do 40 j=2,n-1
t2(2,j)=dt*(ra*t(2,j-1)+ra*t1(1,j+1))/m*c*dz**2+dt*ra*t1(1,j)/m*c*dr**2+dt*h*tf/m*c*dr+(1-dt*ra/m*c*dr**2-dt*h/m*c**dr-dt*2*ra/m*c*dz**2)*t1(2,j)
40 continue
t2(2,1)=dt*ra*t1(2,2)/m*c*dz**2+dt*ra*t1(1,2)/m*c*dr**2+dt*h*tf/m*c*dr+(1-dt*ra/m*c*dr**2-dt*h/m*c**dr-dt*ra/m*c*dz**2)*t1(2,1)
t2(2,n)=dt*ra*t1(1,m)/m*c*dr**2+dt*h*tf/m*c*dr+dt*ra*t1(2,m-1)+dt*h*tf/m*c*dz+(1-dt*ra/m*c*dr**2-dt*h/m*c*dr-dt*ra/m*c*dz**2-dt*h/m*c*dz)*t1(2,m)
do 50 i=1,2
do 50 j=1,n
t1(i,j)=tq(i,j)
50 continue
20 continue
write(*,70)((t1(i,j),i=1,2),j=1,n)
70 format(1x,f6.2)
end
read(*,*)dr,dz,re,ra,h,c,m,dt,tf,ta,tb
n=100
dimension tp(2,n),tq(2,n)
do 10 j=1,n
t1(0,j)=tb
do 10 i=1,2
t1(i,j)=ta
10 continue
do 20 k=1,10
do 30 j=2,n-1
tq(1,j)=dt*(re*t1(0,j)+ra*tp(2,j))/m*c*dr**2+dt*(ra*t1(1,j-1)+ra*tp(1,j+1))/m*c*dz**2+(1-dt*(re+ra)/m*c*dr**2-dt*2*ra/m*c*dz**2)*t1(1,j)
30 continue
t2(1,1)=dt*(re*t1(0,1)+ra*(t1(2,1))/m*c*dr**2+dt*ra*t1(1,2)/m*c*dz**2+(1-dt*(re+ra)/m*c*dr**2-dt*ra/m*c*dz**2)*t1(1,1)
t2(1,n)=dt*(re*t1(0,m)+ra*(tp(2,m))/m*c*dr**2+dt*ra*t1(1,m-1)/m*c*dz**2+dt*h*tf/m*c*dt+(1-dt*(re+ra)/m*c*dt-dt*(ra/dz+h)/m*c*dz)*t1(i,j)
do 40 j=2,n-1
t2(2,j)=dt*(ra*t(2,j-1)+ra*t1(1,j+1))/m*c*dz**2+dt*ra*t1(1,j)/m*c*dr**2+dt*h*tf/m*c*dr+(1-dt*ra/m*c*dr**2-dt*h/m*c**dr-dt*2*ra/m*c*dz**2)*t1(2,j)
40 continue
t2(2,1)=dt*ra*t1(2,2)/m*c*dz**2+dt*ra*t1(1,2)/m*c*dr**2+dt*h*tf/m*c*dr+(1-dt*ra/m*c*dr**2-dt*h/m*c**dr-dt*ra/m*c*dz**2)*t1(2,1)
t2(2,n)=dt*ra*t1(1,m)/m*c*dr**2+dt*h*tf/m*c*dr+dt*ra*t1(2,m-1)+dt*h*tf/m*c*dz+(1-dt*ra/m*c*dr**2-dt*h/m*c*dr-dt*ra/m*c*dz**2-dt*h/m*c*dz)*t1(2,m)
do 50 i=1,2
do 50 j=1,n
t1(i,j)=tq(i,j)
50 continue
20 continue
write(*,70)((t1(i,j),i=1,2),j=1,n)
70 format(1x,f6.2)
end