Maximum tensile and compressive stress in XY plane

aslund Member Posts: 1
edited June 2023 in Structures

I want to plot the maximum tensile stress in the xy-plane and the maximum compressive stress in the xy-plane.

I am able to extract the x and y stress using the python result snippet inside Mechanical, however I'm struggling to perform the math using logic and for loops to evaluate each element:

  1. If the stress in both directions is positive the maximum tensile stress is the squareroot of the two sums squared.
  2. If the stress in both directions is negative the maximum compressive stress is minus the squareroot of the two sums squared
  3. If the stress in one direction is positive and in the other is negative, depending on their magnitutes the element is in tensile or compression.

Could you give me any guidance on how to perform these types of calculations using the dpf library inside Mehcanical?



  • Chris Harrold
    Chris Harrold Member, Administrator, Employee Posts: 100
    First Anniversary First Answer Ansys Employee Solution Developer Community of Practice Member

    @Ramdane I think can get you pointed in the right direction

  • Ramdane
    Ramdane Member, Employee Posts: 9
    First Anniversary Ansys Employee Name Dropper First Comment

    Hi @aslund ,

    Thanks for reaching out on this. Is this for a multi load step analysis or only for a given time step or frequency?