User login

You are here

How to request energy field output in ABAQUS Python

I m trying to extract energy at each integration point in Abaqus. I can do it for stresses or strains but i cant do for the energetical quantities. The obtained error is : “KeyError: 'ELEN'”, but in Abaqus it is the good keyword… Below it is my code to extract it :

from odbAccess import*import numpy as np

odb = openOdb(path='C:/Desktop/Fish1.odb')# lastFrame = odb.steps['Step-2'].frames[-1]
lastFrame
= odb.steps['Step-1'].frames[-1]

topCenter = \
odb
.rootAssembly.instances['PART-1-1']
stressField
= lastFrame.fieldOutputs['ELEN']

field = stressField.getSubset(region=topCenter,
position
=INTEGRATION_POINT, elementType ='CPS3')
fieldValues
= field.values

sortie = open('C:/Users/tests.txt','w')
sortie
.write('Eleme \t Integ \t\t PE11 \t\t\t PE22 \t\t\t PE12 \n')for v in fieldValues:
sortie
.write('%-10.2f'%( v.elementLabel))if v.integrationPoint:
sortie
.write('%-10.2f'%(v.integrationPoint))
sortie
.write('%-10.3f\t\t %-10.3f\t\t %-10.3f\t\t %-10.3f\t\t \n'%(v.data[0], v.data[1], v.data[2], v.data[3]))

sortie.close()

farzad64's picture

Sometimes you need to change the position, from Integration point to nodes, depends where that parameter is calculated, you might need to refere to abaqus help

Frank Richter's picture

Did you request the output of ELEN appropriately ?

Paste a section of your input-file here.

 

Subscribe to Comments for "How to request energy field output in ABAQUS Python"

Recent comments

More comments

Syndicate

Subscribe to Syndicate