×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Save Maximum Stress to File

Save Maximum Stress to File

Save Maximum Stress to File

(OP)
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!

RE: Save Maximum Stress to File

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

RE: Save Maximum Stress to File

(OP)
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!

RE: Save Maximum Stress to File

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources