ANSYS Workbench-scripting
ANSYS Workbench-scripting
(OP)
Hello everyone,
I have a question regarding Ansys workbench. I have a model in WB and I am doing a parametric study. I have an input parameter which is a radius which I have parametarized (by checking the box next to it). Now my radius is in the table of design points. I am trying to run the simulation by giving a range of values of radius in the table of design points. In output, I want the coordinates of the node with the maximum von mises stress. I know that I can export the von mises stress results (by right clicking von mises stress) into excel and get the x,y,z coordinates of the node with maximum stress. But, I was wondering if there was a way to these coordinates automatically for all the radius values that I specify in the table of design points by writing a code or some other way.
Also, if it is possible to get the coordinates in the table of design points.
Any help is appreciated!!
Thanks,
Sameer Jade
MIE Dept., UMass Amherst
I have a question regarding Ansys workbench. I have a model in WB and I am doing a parametric study. I have an input parameter which is a radius which I have parametarized (by checking the box next to it). Now my radius is in the table of design points. I am trying to run the simulation by giving a range of values of radius in the table of design points. In output, I want the coordinates of the node with the maximum von mises stress. I know that I can export the von mises stress results (by right clicking von mises stress) into excel and get the x,y,z coordinates of the node with maximum stress. But, I was wondering if there was a way to these coordinates automatically for all the radius values that I specify in the table of design points by writing a code or some other way.
Also, if it is possible to get the coordinates in the table of design points.
Any help is appreciated!!
Thanks,
Sameer Jade
MIE Dept., UMass Amherst





RE: ANSYS Workbench-scripting
Try inserting the following APDL commands in the solution area of your simulation:
SET,LAST
NSORT,S,EQV,0
*GET,my_n_seqv_max,SORT,0,IMAX
my_nx=nx(my_n_seqv_max)
my_ny=ny(my_n_seqv_max)
my_nz=nz(my_n_seqv_max)
once you have pasted them, click on the Search Parameters button and the values of the variables that start with my_ (you can change this prefix in the Details/Definition/Output Search Prefix of the command object) in your code will be created in the Details/Results of the command object.
Check them and you should be able to get the results in the table of design points.
I hope it helps!
RE: ANSYS Workbench-scripting
Firstly, thanks a lot for your reply. It worked. I am trying to see the equivalent stress in a portion of my total model (because of some stress concentrations that I want to avoid). Therefore, I created an Equivalent stress 2 for the small portion of the model in the solution window. However, when I use EQV in the NSORT line of the snippet, it considers the entire model. Is there a way that, it only considers the Equivalent stress 2. I have attached a snapshot of my window.
Thanks!
Sameer Jade
RE: ANSYS Workbench-scripting
Thanks,
Sameer Jade
MIE Dept., UMass Amherst
RE: ANSYS Workbench-scripting
have a look at the command CMSEL