I am trying to extract the max principal stresses and strains (S and E) of a node from the .odb. I simulated a beam submitted to mechanical fatigue. I am new to Abaqus scripting so I was trying to print the stress S11 value from a specific node. What I was not expecting is that after running the script, I found two different values for the same node. I decided to print the coordinates and they match. I understand that the node belongs to two elements, but shouldn't the value be the same? Am I missing something? Could someone please explain why this is happening?
# data_extraction.py
from abaqus import *
from odbAccess import *
from abaqusConstants import *
from odbSection import *
import odb
mypath = 'C:/Users/jjb21183/Desktop/Mauro/Abaqus/Exercise-MasterShiWang/T3/'
myodb = 'Job-M4.odb'
odb = openOdb(path = mypath+myodb)
lastframe = odb.steps['Step-1'].frames[-1]
stress = lastframe.fieldOutputs['S']
elementAmount = len(stress.values[0].instance.elements)
myinstance = odb.rootAssembly.instances['PART-1-1']
for i in range(0, elementAmount):
element = myinstance.elements[i]
for j in range(0, 8):
nodes = element.connectivity[j]
N = myinstance.nodes[nodes-1]
nodeCoordinateX = N.coordinates[0]
nodeCoordinateY = N.coordinates[1]
nodeCoordinateZ = N.coordinates[2]
# l1 = [nodeCoordinateX, nodeCoordinateY, nodeCoordinateZ]
# print l1
if (nodeCoordinateX == 4.0 and nodeCoordinateY == 10.0 and nodeCoordinateZ == 0.0):
el_stress = stress.getSubset(region = element)
print [nodeCoordinateX, nodeCoordinateY, nodeCoordinateZ]
print el_stress.values[0].data[0]
Thank you very much for your help.