[Fortran] 纯文本查看 复制代码
SUBROUTINE UEXTERNALDB(LOP,LRESTART,TIME,DTIME,KSTEP,KINC)
C
INCLUDE 'ABA_PARAM.INC'
C
DIMENSION TIME(2)
C
integer, parameter :: n = 24
real :: SPZFS(n),QW(n),FS(n),TDL(n),BDL(n),LDL(n)
common SPZFS,QW,FS,TDL,BDL,LDL
integer :: i !计数器
if( LOP .eq. 0) then
C 读数据
open(107,file='D:\Desktop\read\weatherdata.csv',status='old')
do i=1,n
read(107,*) SPZFS(n),QW(n),FS(n),TDL(n),BDL(n),LDL(n)
end do
close(107)
end if
RETURN
END
SUBROUTINE DFLUX(FLUX,SOL,KSTEP,KINC,TIME,NOEL,NPT,COORDS,
1 JLTYP,TEMP,PRESS,SNAME)
C
INCLUDE 'ABA_PARAM.INC'
C
DIMENSION FLUX(2), TIME(2), COORDS(3)
CHARACTER*80 SNAME
integer, parameter :: n = 24
real :: SPZFS(n),QW(n),FS(n),TDL(n),BDL(n),LDL(n)
common SPZFS,QW,FS,TDL,BDL,LDL
IF (SNAME .EQ. 'ASSEMBLY_SURF-4') THEN
flux(1)=0.5*SPZFS(KINC+1)
END IF
RETURN
END