STRESS array is empty in python scripting Abaqus

647 views Asked by At

I wanted to extract stress on top surface of my model on each node but it can't be done normally. when I use this script:

odb = visualization.openOdb('My.odb')
frame=odb.steps['AStep'].frames[-1]

dispNode = odb.rootAssembly.nodeSets['UPPER']

STRESS= frame.fieldOutputs['S'].getSubset(region=dispNode).values
COORD= frame.fieldOutputs['COORD'].getSubset(region=dispNode).values

print(STRESS)
print(COORD[1].data)

STRESS returns an empty array.

How can I edit my script to have stress and its corresponding coordinates??

1

There are 1 answers

0
max9111 On

Your Code can't work, if you only calculated your stress values on the integration points. There are simply no values at the nodes, so if you request values at nodes you will get an empty array.

This is how it should work:

If you need a small example code, feel free to ask.