Retrieving Stress Results

Goal: Obtain stress results for an element.

Code:

reader = Model.Analyses[0].GetResultsData()
reader.CurrentResultSet=1
S=reader.GetResult("S")
S.GetElementValues(1)
reader.Dispose()


Important:  Principal stresses obtained from the above script could differ from the same value calculated in Mechanical.

Note that the command reader.GetResult("PRIN_S") returns the principal stress values on a per element basis and then averages these values from the elements at a common node. (Similar to AVPRIN, 1 in Mechanical APDL)

In Mechanical, the component values are first averaged from the elements at a common node, and then the principal stress values are calculated from the averaged components. (Similar to AVPRIN,0 in Mechanical APDL).