[Fortran] 纯文本查看 复制代码 SUBROUTINE FILM(H,SINK,TEMP,KSTEP,KINC,TIME,NOEL,NPT,
1 COORDS,JLTYP,FIELD,NFIELD,SNAME,NODE,AREA)
C
INCLUDE 'ABA_PARAM.INC'
C
DIMENSION H(2),TIME(2),COORDS(3), FIELD(NFIELD)
CHARACTER*80 SNAME
real a(2,241)
integer i,j
data iread /1/
save iread
save a
if(iread.eq.1) then
!读入温度数据
iread = 2
open(12,file='D:\abaqusworks\abaqus\temperature.txt')
do i=1,241
read(12,*) a(1,i),a(2,i)
print*, a(1,i),a(2,i)
end do
end if
close(12)
! 对应时间步长
do j = 1,241
if (TIME(2).EQ.a(1,j)) then
SINK = a(2,j)
exit
end if
end do
我看了别的帖子,加了iread 和 save 就成功了, 虽然不知道iread是什么意思 |