Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Plot maximum and minimum principal stress ANSYS Workbench

    • AntoineRo
      Subscriber

      Hi there !


      I was wondering if there was an easy way to plot the maximal absolute principal stress on ANSYS Workbench. 


      The following "User-defined Result" allows to do so but I would like to keep the negative signs for compression and the positive signs for tension. 



      Is there a way without using APDL since I have never used it please ?


      I guess it should look something like this :


      IF(abs(S1)>abs(S3) ; S1 ; S3)


      But there seems to be a syntax error. 


       


      Thanks a lot !


      Regards,


      Antoine 

    • Sai Deogekar
      Ansys Employee

      Hi!


      The IF statement cannot be used in User-Defined Results. You may go through the following Documentation:


      https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v201/en/wb_sim/ds_user_defined_express.html


       


      One was to get around it would be to use APDL commands in Mechanical. To do this, right-click on Solution-->Insert-->Commands. In the Commands window, paste the following:


      /graphics,power


       


      set,1,last           !Choose the last substep in step 1


       


      !Define the RGB colors


      /RGB,INDEX,100,100,100,0


      /RGB,INDEX,80,80,80,13


      /RGB,INDEX,60,60,60,14


      /RGB,INDEX,0,0,0,15


      /TRIAD,off


       


      *IF,S1,ABGT,S3,THEN        !Similar to IF(abs(S1)>abs(S3))


      /SHOW,PNG                       ! This will save a png file in projectname_files/dp0/SYS/MECH


      /view,1,1,1,1                        ! Set the view angle


      ESEL,all


      PLNSOL,S,1


      *ELSE


      /SHOW,PNG


      /view,1,1,1,1


      ESEL, all


      PLESOL,S,3


       


      Hope this helps,


      Sai

    • AntoineRo
      Subscriber

      Hello Sai,


      Thanks a lot for your quick answer !


      Your solution seems to work even though I am wondering if the "if" condition applies to each element or to the total assembly. 


      Unfortunatly for this project, I don't have much time to look into the APDL coding to find the correct view I need. 


      I will stick to using 2 different plots on Mechanical for now. 


      Thanks again for your time and answer, 


      Regards, 


      Antoine 


       

    • Philipp Holzmann
      Subscriber

      Hello.

      I am late with my answer, but I would still like to show a simple solution to the problem.

       - User defined Result with the following expression:

      The first term gives the positive or negative sign, the second term is the same as you already suggested.

       

      Hope this helps,

      Philipp

    • ErKo
      Ansys Employee

       

      Hi

      Thank you.

      As this post is very old, we are closing it (perhaps users will find the solution useful).

       

       

Viewing 4 reply threads
  • The topic ‘Plot maximum and minimum principal stress ANSYS Workbench’ is closed to new replies.
[bingo_chatbox]