Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

reading Abaqus history output data: keyError

Status
Not open for further replies.

andiMerxh

Civil/Environmental
Jun 1, 2011
2
thread799-274802
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
 
Replies continue below

Recommended for you

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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor