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


*TREAD command problem

*TREAD command problem

*TREAD command problem


I tried to run transient analysis using table with *tread command. However i received error;

solution script

CODE -->









the table has 2 column and 1289 rows. first column is displacement and second column is time.

how to solve this?


RE: *TREAD command problem

There is a nice example from Simutech group: Link

The following is from there, and reads an Amp.csv file (first column time and second amplitude) that exists in the working directory of Ansys APDL, into a table called mytable.



Then to apply this table to a time varying force (load) one gives for instance the table name:

RE: *TREAD command problem

Thanks Erik for replying,

I do refer the article from simultech group, however, i do not quite understand the purpose of some part of the proposed script;

CODE -->



i do not understand this part.....thats why skipped it in my own script. I fixed the error in first post by using the filename with .txt extension.

One more question, I have data for displacement vs time, is it possible to use it instead load vs time?


RE: *TREAD command problem

I am not really good with APDL, but as far as my understanding goes without looking into it too much, the /INQUIRE finds out how many lines the csv file has, and that is then input when creating the table, which will have the same lines as the csv file (if to_skip = 0). As for *DEL, I suppose it deletes any previous tables created, before a new one is defined.

Yes, that works for enforced displacements which would be for say node 2 with the MYTABLE defining the UX amplitude as a function of time table (2 columns, TIME and amplitude) :

D,2, , %MYTABLE% , , , ,UX, , , , ,

RE: *TREAD command problem

i try to follow exactly what has been proposed by simultech group, the error i got in my first post is because of this part;

CODE -->


in ansys manual;

CODE -->

/INQUIRE,Parameter,FUNC,Fname, Ext, --. 

my script;

CODE -->

to_skip=1								!number of line to skip


but i still got error if using /inquire to capture the lines in the csv file.
it seems something not right in /inquire command..where it was unable identify the data in the file.

the one proposed by simultech group.

CODE -->

to_skip=0       ! enter number of lines to skip--NONE in this example
*DIM,mytable,TABLE,to_read                 ! table array to hold data

the advantages of the proposed code is where user does not need to check for number of lines in external csv files....

otherwise need to enter manually in *dim command

RE: *TREAD command problem

just to update,

actually the script is working, just my mistake, i need to place .csv files in the working directory.

RE: *TREAD command problem

Great, what did I say:)

Quoting myself from above:):"The following is from there, and reads an Amp.csv file (first column time and second amplitude) that exists in the working directory of Ansys APDL, into a table called mytable."

RE: *TREAD command problem

Continue above discussion,

the script below is for only displacement at line 3 in x direction.

CODE -->

to_skip=1								!number of line to skip


in my case , i have few other nodes which need to be assigned with reaction force in opposite direction;

my first draft;

CODE -->

! creating node and respective element

n,1e3,30,0,0				!node1

n,2e3,-30,50,0				!node2

n,3e3,-30,-50,0				!node3

to_skip=1											!number of line to skip-identical for all cases

/INQUIRE,numlines2,LINES,node1,csv					!return system info to parameter at node1
/INQUIRE,numlines3,LINES,node2,csv					!return system info to parameter at node2
/INQUIRE,numlines4,LINES,node3,csv					!return system info to parameter at node3

*DIM,tbnode1,TABLE,to_read2							!define array parameter and its dimension at node1
*DIM,tbnode2,TABLE,to_read3							!define array parameter and its dimension at node2
*DIM,tbnode3,TABLE,to_read4							!define array parameter and its dimension at node3

*TREAD,tbnode1,node1,csv,,to_skip  					!read table for node1
*TREAD,tbnode2,node2,csv,,to_skip  					!read table for node2
*TREAD,tbnode3,node3,csv,,to_skip  					!read table for node3

d,3,ux,%mytable%							!apply displacement on line 3


f,node1,fx,%tbnode1%								!ext force at node1
f,node2,fx,%tbnode2%								!ext force at node2
f,node3,fx,%tbnode3%								!ext force at node3 

as each node also read csv file with time,reaction force. All tables in csv file have similar time.

not sure if running multiple *tread command is ok or not...also really appreciate for advice if there any better solution.

attached the graphical image..

RE: *TREAD command problem

That looks OK I think.

Of course the way to check is to check the reactions and see that they are equal to the applied loads.

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!


eBook - Mastering Tolerances for Machined Parts
When making CNC machined parts, mastering tolerances can be challenging. Are general tolerances good enough? When does it make sense to call out for tighter tolerances? Do you need a better understanding of fits, datums, or GD&T? Learn about these topics and more in Xometry's new e-book. Download Now
eBook – How to Choose the Correct Corrosion Testing Method
When designing a metal component, engineers have to consider how susceptible certain alloys are to corrosion in the final product’s operating environment. In a recent study by NACE (National Association of Corrosion Engineers), it was estimated that the direct and indirect costs of corrosion in the United States is approximately 6.2% of the GDP. In 2016, that cost exceeded $1 trillion dollars for the first time. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close