I have produced a script for ABAQUS CAE using Python to extract the deformed coordinates of a node set called 'SET-1'. A load is applied to the top surface of the cube and the cube deforms.
The field output 'COORD' is supposed to give the deformed coordinates of nodes, I believe. But the coordinates I obtain are the original UNDEFORMED coordinates. I have requested them from the final step (after deformation). Does anyone have any suggestions as to what my issue could be?
NOTE: I have included nodal displacement in my code also, this was to check that I was requesting data from the correct step. If I was requesting data from the undeformed step, then my displacements would be zero. The displacements are ok, the COORD values are not.
My code is below:
from odbAccess import *
odb = openOdb(path='D:/AbaqusWorking/WIP/Job-1.odb')
modelname = "Cube coords"
# Create a variable that refers to the
# last frame of the first step.
lastFrame = odb.steps['Step-1'].frames[-1]
# Create a variable that refers to the deformed coordinates 'COORD' and 'U'
# in the last frame of the first step.
deformedCoord = lastFrame.fieldOutputs['COORD']
disp = lastFrame.fieldOutputs['U']
# Create a variable that refers to the node set 'SET-1'
# The set is associated with the part instance 'PART-1-1'.
nSet = odb.rootAssembly.instances['PART-1-1'].\
nodeSets['SET-1']
# Create a variable that refers to the COORD and DISP of the node
# set in the last frame of the first step.
nodeCoords = deformedCoord.getSubset(region=nSet)
nodeDisp = disp.getSubset(region=nSet)
# Finally, print some field output data from each node
# in the node set (a single node in this example).
print '**********************'
def writeCoords():
f = open("D:\AbaqusWorking\WIP\Coords1.csv", "w")
f.write("Model name,Node,X1,Y1,Z1" + "\n")
for v in nodeCoords.values:
f = open("D:\AbaqusWorking\WIP\Coords1.csv", "a")
f.write(str(modelname) + "," )
f.write(str(v.nodeLabel) + "," )
f.write(str(v.data[0]) + "," + str(v.data[1]) + "," + str(v.data[2]) +"\n")
f.close()
def writeDisp():
f = open("D:\AbaqusWorking\WIP\Disp1.csv", "w")
f.write("Model name,Node,UX,UY,UZ" + "\n")
for v in nodeDisp.values:
f = open("D:\AbaqusWorking\WIP\Disp1.csv", "a")
f.write(str(modelname) + "," )
f.write(str(v.nodeLabel) + "," )
f.write(str(v.data[0]) + "," + str(v.data[1]) + "," + str(v.data[2]) +"\n")
f.close()
writeCoords()
writeDisp()
print 'Write to file complete...'
print'...'
odb.close()
print 'ODB closed...'
print'...'
print '**********************'