×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Read data from text file into subroutine UTEMP

Read data from text file into subroutine UTEMP

Read data from text file into subroutine UTEMP

(OP)
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

RE: Read data from text file into subroutine UTEMP

Could it have something to do with the way the values are written in the .txt file?

What's the error message you get?

RE: Read data from text file into subroutine UTEMP

(OP)
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...

RE: Read data from text file into subroutine UTEMP

(OP)
solved

The solution is to give the full path directory!

RE: Read data from text file into subroutine UTEMP

Of course, sorry I missed that too.

RE: Read data from text file into subroutine UTEMP

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources