Exporting stresses on a beam element cross-section using Mechanical Scripting or Python Result

augustbrandberg
augustbrandberg Member Posts: 9
First Anniversary Name Dropper First Comment
**

Hi everyone,

I am having some trouble exporting stress results when working with beams in Ansys Mechanical.

I am working with a beam model and solving a Static Structural analysis.

In Workbench, I can insert a Stress Result contour plot which shows the stresses over the cross-section. I can use the Probe tool to probe/annotate individual cell section nodes as shown in the image below.

I can use the scripting interface to access the contour plot data using

result=Tree.FirstActiveObject
plotDataResult= result.PlotData

However,

  • the data does not contain the spatial location of each result (e.g., coordinates of the cell section nodes)
  • the data seems unsorted.

I would like to export two text files with the following information:

File 1 (data stored in result.PlotData)
Columns: Node, Element, Value

File 2:
Node, Element, CellSectionNode, CellSectionNode-X, CellSectionNode-Y, CellSectionNode-Z

*where CellSectionNode-X/Y/Z are the spatial coordinates of the cell nodes in the beam cross-section *.

The coordinates of the cell section nodes must be stored or calculated internally, as Workbench can display the contour results over the beam cross-section. However, I have not been able to figure out how to access this information programmatically.

Is there a way to access this data:

Through the Workbench scripting interface?
As part of a Python result object?
Using an APDL snippet?
Any advice or pointers to relevant documentation would be greatly appreciated!

Tagged:

Answers

  • Erik Kostson
    Erik Kostson Member, Moderator, Employee Posts: 285
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    edited January 8

    Hi

    For question:

    File 2
    Through the Workbench scripting interface?
    As part of a Python result object?

    For these I do not think we have an act/script call/function to get these cell locations (x,y,z) you show in your image.

    At least it was not possible a couple of years ago.

    All the best

    Erik