Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Some scripting help? re: reading coords form odb 1

Status
Not open for further replies.

rmettier

Geotechnical
Oct 6, 2006
63
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.
 
Replies continue below

Recommended for you

Oops, sorry. Don't bother. I think I've cracked it now. Code now looks like this:
---------------------------
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor