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.
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
RE: Programming in Ansys
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
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.