×
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

reading Abaqus history output data: keyError

reading Abaqus history output data: keyError

reading Abaqus history output data: keyError

(OP)
thread799-274802: abaqus historyOutput
Hi, I am trying to get the history output for the pressure (and displacements) in a one dimensional consolidation problem. I implement the problem on an input file really similar to the Abaqus example input file 'terzaghi_cpe8p.inp' for the Terzaghi consolidation benchmark problem. I am trying to get the output using a python script, as described in the paragraph 8.5.8 of the scripting users manual.

My python code looks like:

from odbAccess import *
from abaqusConstants import *

# Open database
odb = openOdb(path='3.odb')

# display the part instances in the output database
for instanceName in odb.rootAssembly.instances.keys():
    print 'instanceName: ', instanceName

# assign variables to the three steps of consolidation
step2 = odb.steps['Step-2']

print 'history keyes: ', step2.historyRegions.keys()

# define the node on which pressure will be recorded
nodal_pressure2 = step2.historyRegions['Node PART-1-1.1']

# define variables on which to store the pressure
presData2 = nodal_pressure2.historyOutputs['POR'].data

# define the output file for the nodal pressure
pressureFile = open('nodePressure.dat','w')
for time, pressure2 in presData2:
    pressureFile.write('%10.4E   %10.4E\n' % (time, pressure2))
pressureFile.close()


I run this code and I get the following:

instanceName:  PART-1-1
history keyes:  []
Traceback (most recent call last):
  File "post.py", line 17, in <module>
    nodal_pressure2 = step2.historyRegions['Node PART-1-1.1']
KeyError: 'Node PART-1-1.1'


In my input file I do not define any part. Is this related to the error message?
If anyone help with this error message I would greatly appreciate it!

Thank you very much in advance,

Andi  

RE: reading Abaqus history output data: keyError

(OP)
It seems that this one was easy to fix, I added the specific lines on the input file:

*Output, history, frequency=1
*node output, nset=LEFTBOUNDARY
  POR, U2

Cheers!

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