Reputation: 37
I wrote a script that will extract nodes coordinates according to a local System. Because coordinates are generated by default according to the global system.
odb = openOdb(path='.....................Job-1.odb')
Setnodes = 'LocalnodesCoord.txt'
NodesFile = open(Setnodes,'w')
nodeset='NODESET-3'
mySet = odb.rootAssembly.instances['PART-1-1'].nodeSets[nodeset]
csys1=odb.rootAssembly.datumCsyses['CSYS-1']
lastFrame = odb.steps['Step-1'].frames[-1]
coords=lastFrame.fieldOutputs['COORD']
mySetCoord = coords.getSubset(region=mySet)
mySetCoord_local=mySetCoord.getTransformedField(datumCsys=csys1)
mySetCoordLocalValues=mySetCoord_local.values
for var in mySetCoordLocalValues :
NodesFile.write(str(var.nodeLabel) + ',' + str(var.data[0]) + ',' + str(var.data[1]) + ',' + str(var.data[2])+ '\n')
NodesFile.close()
odb.close()
I used the getTransformedField() function. but the problem I get wrong coordinates
can you help me to solve this problem. do you have any idea how to determine the transformation matrix?
Upvotes: 1
Views: 1144
Reputation: 37
@Roman Zhuravlev, Thank you very much for your answer.
FYI, I used many partition faces and for each one I assciated a fixed local coordinate system (and not a moving Csys).
I defined the local Csys by using three points : the origin and two others points according the global Csys. so, I think these arguments are enough to calculate the transformation.
Upvotes: 0
Reputation: 1049
From documentation:
If the system is model based, you must supply a displacement field that determines the instantaneous location and orientation of the coordinate system
Probably, as your Local Csys is moving with the geometry, Abaqus needs additional information to calculate transformation.
So, try suppling the getTransformedField
method with the deformationField
and the rotationField
as described here
Or, as proposed by @SatishThorat in his comment. Don't forget to use numpy
module for the vectors arithmetics.
Upvotes: 1