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!

Save Maximum Stress to File 1

Status
Not open for further replies.

kwarizmi

Electrical
Joined
Jan 4, 2006
Messages
2
Location
CA
Good Morning,


I am creating an APDL macro. With it, I wish to save to a file the maximum stress that is written on the screen as "SMX" after ploting the results for Flux Gradient with EFSUM.

Does anyone know how I can retrieve that value in APDL and store it in a variable?


Cheers!
 
Hi,

You can use for contour displays (PLNSOL) the folowing code:

Code:
*GET,Par,PLNSOL,0,MAX !Maximum value of item in last contour display

or

Code:
*GET,Par,PLNSOL,0,BMAX !Maximum bound value of item in last contour display

Regards,

Alex
 
Good Morning,


Thanks Alex, that code does exactly what I was hoping for.

Is there also a way to retrieve and store the element number where the maximum stress is? Or even better, to retrieve the x and y component of the element with that maximum stress?


Cheers!
 
Hi,

Do you want the element or the nodal maximum results? In both cases the code is simple. For the element results:

Code:
esel,all ! select all elements and nodes
nsel,all

! first the vector sum of components:

etab,efsum,ef,sum ! store the vector sum of electric field of all elements in an element table
esort,etab,efsum ! sort the element table
*get,efsum_max,sort,,max ! get the maximum value
*get,efsum_max_el,sort,,imax ! get the element number with the maximum value

! now for the x component

etab,efx,ef,x
esort,etab,efx
*get,efx_max,sort,,max
*get,efx_max_el,sort,,imax

! for the othe components (y and z) it's similar...

For the nodal results:

Code:
/GRAPHICS,FULL ! full graphics
nsel,all ! select all nodes

! for the vector sum:

nsort,ef,sum
*get,efsum_max,sort,,max
*get,efsum_max_nd,sort,,imax

! for the x component:

nsort,ef,x
*get,efx_max,sort,,max
*get,efx_max_nd,sort,,imax

Regards,
Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top