Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Oct 6, 2006
Messages
63
Location
CH
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.
 
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

Back
Top