Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29286 Discussions

Simple doubt on reading data file in abaqus subroutine

whyhema
Beginner
1,237 Views
Hi,

I have to read data from a file 'file1.dat' in abaqus subroutine DLOAD, but this data is neither being read nor is the error being shown up (followed steps in Variant2 given at http://www.eng-tips.com/viewthread.cfm?qid=198631&page=58). I was trying to figure this out since the last few days and finally decided to seek your help. I am attaching my abaqus input file, and giving below the subroutine and the data file. Please have a look at them and suggest the necessary changes. Thanks.
Data ----- file1.dat
3195.999880 -1.777926
3187.999635 -1.773416
3179.999510 -1.768721
3171.999390 -1.763718
3163.999145 -1.758282
3155.998900 -1.752290
3147.998780 -1.745619
3139.998660 -1.738145
3131.998415 -1.729744
3123.998170 -1.720293
Subroutine ---- 2test.f
subroutine vdload (
C Read only (unmodifiable) variables -
* nblock, ndim, stepTime, totalTime,
* amplitude, curCoords, velocity, dircos,
* jltyp, sname,
C Write only (modifiable) variable -
* value )
C
C
include 'vaba_param.inc'

C
dimension curCoords(nblock,ndim),
* velocity(nblock,ndim),
* dircos(nblock,ndim,ndim),
* value(nblock)

C** D = init_contac_position
double precision D, uy
integer i, j
character*80 sname
logical flag
dimension initnodes(10,2)
common /my_block/ flag

flag=1
if (flag==1) then
open(unit=121, FILE='file1.dat')
c*** need to read data from this file and write
do i = 1, 10
write(*,*) 'Hi2'
read(121,*)(initnodes(i,j),j=1,2)
write(*,*) '11111111111111111'
end do
close(121)
flag=0
end if


D=40
write(*,*) ' '
write(*,*) '********Current Coordinates********* '

do k = 1, nblock
d=curCoords(k,2)
value(k)=0.1/(3.14159*6.0*(D-uy)**3)
write(*,*) curCoords(k,1), curCoords(k,2), nblock
end do
stop

return
end
0 Kudos
2 Replies
mecej4
Honored Contributor III
1,237 Views
Your have posted this Abaqus-related question to an inappropriate forum. There are probably few Abaqus users here.

I do note that the data in the file file1.dat do not match the READ statement in the program, which expects two integers per line in the input.

The relevance of the attached file "2test.inp" is questionable.
0 Kudos
Ron_Green
Moderator
1,237 Views
IMPLICIT NONE

would have caught that you did not declare initnodes() hence it defaulted to default INTEGER kind. It's good practice to force explicit type declaration.
0 Kudos
Reply