[Fortran] 纯文本查看 复制代码
Do
open(222,file ='D:\ABAQUS job\FP2.txt',ioStat=k,action="readwrite",status="old")
if(k==0) then
read(222,*),a2,g2,n2
close(222)
end if
End Do
[Fortran] 纯文本查看 复制代码
!只读入一次
if (stepTime.eq.0) then
!读入轴承力Fx数据
do ix=1,10001
open(11,file='D:\temp\xdata.txt',ioStat=krl,
& action="readwrite",status="old")
if(krl==0) then
read(11,*)Fxm(ix,1),Fxm(ix,2) !循环写入
close(11)
end if
end do
!读入轴承力Fy数据
do iy=1,10001
open(11,file='D:\temp\ydata.txt',ioStat=krl,
& action="readwrite",status="old")
if(krl==0) then
read(11,*)Fym(iy,1),Fym(iy,2) !循环写入
close(11)
end if
end do
end if
[Fortran] 纯文本查看 复制代码
!只读入一次
if (stepTime.eq.0) then
!读入轴承力Fx数据
open(55,file='D:\temp\xdata.txt',status='old')
do ix=1,10001
read(55,*)Fxm(ix,1),Fxm(ix,2) !循环写入
end do
close(55)
!读入轴承力Fy数据
open(22,file='D:\temp\ydata.txt',status='old')
do iy=1,10001
read(22,*)Fym(iy,1),Fym(iy,2) !循环写入
end do
close(22)
end if