×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Some scripting help? re: reading coords form odb

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.

RE: Some scripting help? re: reading coords form odb

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources