×
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

Programming in Ansys

Programming in Ansys

Programming in Ansys

(OP)
Good Afternoon,

I would like to know the neccessary commands to list and "save"  the nodes and principle stresses to a text file of my choice after my simulation completes. I have a script file which I load in to Ansys that runs my simulation. However, it is a pain to post process my results as I have to
list nodes-> select all and copy-> open .txt file -> paste
list stresses ->select all and copy-> open .txt file
-> paste

What I would like is to automate that process and include the commands into my simulation file.

Thank you for your help.

RE: Programming in Ansys

Have you read the APDL section of the documentation?  This is super easy...like 10 lines of code easy.  Look in particular at the *VXXXX and *GET commands.

RE: Programming in Ansys

(OP)
Hi Stringmaker,

Thank you for your reply. I just read the APDL section of the documentation. I supposed this is a fairly basic question, but I have done all my post processing in Matlab from these simulations in order to avoid having to "learn" the Ansys programming language. I suppose the pseudo-code would go something like:

Specify dimensions of an Array Parameter using *DIM?
Question: How can I get the dimensions of say the results of SX stress in the x direction? This would be needed as input into *DIM

fill the array I just specified with *vfill

then use *cfopen and vwrite to store the array into a .txt file?

Does that sound right?

RE: Programming in Ansys

Yes, that sounds about right.

To get array dimensions would go something like:

nsel, ! select nodes of interest
*get,ncount,node,,count  ! retrieve ncount for *dim
*dim,array,,ncount

Look at the inline *get functions like ndnext, nmin, etc...these will be very helpful to you.

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