Some scripting help? re: reading coords form odb
Some scripting help? re: reading coords form odb
(OP)
I'm trying to extract some deformed coordinates form an odb file, using 'abaqus python extract.py'
The odb is call 'unload.odb'
the relevant step is called 'Settle'
I want the data from the last frame. Here's my code so far:
------------------------------------------
from odbAccess import *
from abaqusConstants import *
odb = openOdb(path='unload.odb',readOnly=TRUE)
step=odb.steps["Settle"]
frame=step.frames[-1]
output=frame.fieldOutputs["COORD"].values
print output
odb.close()
-------------------------------------------
right now, I'm getting a long string, composed of
'FieldValue object', 'FieldValue object', ... etc. instead of the coordinates.
Still very much a beginner with python, so any help is appreciated.
The odb is call 'unload.odb'
the relevant step is called 'Settle'
I want the data from the last frame. Here's my code so far:
------------------------------------------
from odbAccess import *
from abaqusConstants import *
odb = openOdb(path='unload.odb',readOnly=TRUE)
step=odb.steps["Settle"]
frame=step.frames[-1]
output=frame.fieldOutputs["COORD"].values
print output
odb.close()
-------------------------------------------
right now, I'm getting a long string, composed of
'FieldValue object', 'FieldValue object', ... etc. instead of the coordinates.
Still very much a beginner with python, so any help is appreciated.





RE: Some scripting help? re: reading coords form odb
---------------------------
from odbAccess import *
from abaqusConstants import *
odb = openOdb(path='unload.odb',readOnly=TRUE)
step=odb.steps['Settle']
frame=step.frames[-1]
output=frame.fieldOutputs['COORD'].values
for v in output:
print '%d %8.6f %8.6f' % (v.nodeLabel, v.data[0], v.data[1])
odb.close()
---------------------------
Which currently returns all the coordinates of all nodes in the model.