a126z
Student
- Nov 26, 2023
- 36
Why are the element stress values obtained using the PYTHON code different from the element stress value obtained by querying directly in the CAE interface?
The code is as follows:
odb = session.openOdb('odbname', readOnly=False)
ele = odb.rootAssembly.instances['partname'].getElementFromLabel(label=elelabel)
step = odb.steps['Step-1']
last_frame = step.frames[-1]
fop = last_frame.fieldOutputs
fopS = fop['S']
ele = fopS.getSubset(region=ele).values[0]
x0 = ele.data[0]
x1 = ele.data[1]
x2 = ele.data[2]
x3 = ele.data[3]
The code is as follows:
odb = session.openOdb('odbname', readOnly=False)
ele = odb.rootAssembly.instances['partname'].getElementFromLabel(label=elelabel)
step = odb.steps['Step-1']
last_frame = step.frames[-1]
fop = last_frame.fieldOutputs
fopS = fop['S']
ele = fopS.getSubset(region=ele).values[0]
x0 = ele.data[0]
x1 = ele.data[1]
x2 = ele.data[2]
x3 = ele.data[3]