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 TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programming in Ansys

Status
Not open for further replies.

reserchenge

Materials
Joined
Jan 28, 2008
Messages
6
Location
US
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.

 
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.
 
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?
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top