Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read data from text file into subroutine UTEMP

Status
Not open for further replies.

driesf

Structural
Joined
Mar 14, 2012
Messages
3
Location
BE
I have a txt-file with nodal tempereatures which looks like this:

25.99 25.98 25.99 ...
26.03 26.05 26.04
26.13 26.20 26.09
...

There are 16 culumns that represent the nodes. Every row is a 1-second time increment. The purpose is to put these temperatures as a predefined field in certain nodes in the abaqus-model.

The code below gives an error in Abaqus because of the read command. Without that command the subroutine works. Can anyone help me to read this kind of file into a utemp subroutine?


subroutine utemp (temp,nsecpt,kstep,kinc,time,node,coords)
C
include 'aba_param.inc'
dimension temp(nsecpt),time(2),coords(3)
C
real, dimension(31,16) :: x
C
OPEN(UNIT=101,FILE='tempdata.txt',status='OLD',IOSTAT=IOS)
read(101,*) x
CLOSE(101)
C
RETURN
END
 
Could it have something to do with the way the values are written in the .txt file?

What's the error message you get?
 
i have tried it with a single integer in a .txt file and it doesn't work either.

The error file gives: "Abaqus/Standard Analysis exited with an error - Please see the message file for possible error messages if the file exists.", but the message file gives nothing unusual.

I really can't find a solution...
 
solved

The solution is to give the full path directory!
 
Just curious, how did you make the values associate with the nodes though the subroutines. I am trying to improve my skills and knowledge with subroutines, so would appreciate any input you have on this. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top