Ansys Learning Forum › Forums › Discuss Simulation › General Mechanical › Determining the stress where maximum strain occurs › Reply To: Determining the stress where maximum strain occurs
November 30, 2021 at 8:32 am
Erik Kostson
Ansys Employee
Hi
and There is not easy way without some scripting for doing what you need and also being able to do this for any model, so it is a generic process, which is what one wants - please see the psevdo-script below and try and implement that:
(APDL commands in APDL or as a APDL command snippet in Mechanical)
Set results to look at SET,LAST,LAST (takes the last solved time to look at)
Use *get to get maximum nodes (say called: my_NCOUNT) in the model (*GET, my_NCOUNT, NODE,,COUNT)
*do, to loop over nodes and obtain the maximum strain and at which node (say called my_nmaxEPTE) this occurs
Finally issue *get to get the maximum stress at the node found in previous loop, e.g., the VM stress there would be: *GET,my_nmaxS,NODE, my_nmaxEPTE,S,EQV
the result my_nmaxS will show up and we can use it as an output parameter also.
This is all about 9 lines of codes so not to difficult to implement.
Search the forum, the internet and the help manual for more info on *GET and *DO and *IF/*ENDIF.
and There is not easy way without some scripting for doing what you need and also being able to do this for any model, so it is a generic process, which is what one wants - please see the psevdo-script below and try and implement that:
(APDL commands in APDL or as a APDL command snippet in Mechanical)
Set results to look at SET,LAST,LAST (takes the last solved time to look at)
Use *get to get maximum nodes (say called: my_NCOUNT) in the model (*GET, my_NCOUNT, NODE,,COUNT)
*do, to loop over nodes and obtain the maximum strain and at which node (say called my_nmaxEPTE) this occurs
Finally issue *get to get the maximum stress at the node found in previous loop, e.g., the VM stress there would be: *GET,my_nmaxS,NODE, my_nmaxEPTE,S,EQV
the result my_nmaxS will show up and we can use it as an output parameter also.
This is all about 9 lines of codes so not to difficult to implement.
Search the forum, the internet and the help manual for more info on *GET and *DO and *IF/*ENDIF.