Manuel Costa
Materials
- Mar 6, 2020
- 7
Hello, guys!
I've been trying to write a script to express the Lode angle (Polar deviatoric angle), as defined here: Ductile damage criterion wit lode angle dependance (Abaqus Analysis User's Guide).
Shortly I'd like to express the variable defined in the link, ξ (in range of -1<ξ<1) in a viewport .odb, for every step, for every frame.
Do you have any idea on how to do that?
This is what a did so far:
_____________________________
from abaqusConstants import *
from odbAccess import *
odbPath = "/path/to/.odb" # path to output database
odb = session.openOdb(name=odbPath, readOnly=False)
allSteps = session.odbData[odbPath].steps.keys('')
for i in range(len(allSteps)):
step = odb.steps[allSteps]
allFrames = session.odbData[odbPath].steps[allSteps].frames.keys('')
for j in range(len(allFrames)):
frame = step.frames[j+1]
mises = frame.fieldOutputs['S'].getScalarField(MISES)
inv3 = frame.fieldOutputs['S'].getScalarField(PRESS)
ksi = somefunctionoflodeangle
newField = frame.FieldOutput(name='Lodetheta', description='Lode angle', field=somefunctionoflodeangle)
print 'stepName = ', allSteps, ' frameNumber = ', allFrames[j]
odb.save()
odb.close()
I've been trying to write a script to express the Lode angle (Polar deviatoric angle), as defined here: Ductile damage criterion wit lode angle dependance (Abaqus Analysis User's Guide).
Shortly I'd like to express the variable defined in the link, ξ (in range of -1<ξ<1) in a viewport .odb, for every step, for every frame.
Do you have any idea on how to do that?
This is what a did so far:
_____________________________
from abaqusConstants import *
from odbAccess import *
odbPath = "/path/to/.odb" # path to output database
odb = session.openOdb(name=odbPath, readOnly=False)
allSteps = session.odbData[odbPath].steps.keys('')
for i in range(len(allSteps)):
step = odb.steps[allSteps]
allFrames = session.odbData[odbPath].steps[allSteps].frames.keys('')
for j in range(len(allFrames)):
frame = step.frames[j+1]
mises = frame.fieldOutputs['S'].getScalarField(MISES)
inv3 = frame.fieldOutputs['S'].getScalarField(PRESS)
ksi = somefunctionoflodeangle
newField = frame.FieldOutput(name='Lodetheta', description='Lode angle', field=somefunctionoflodeangle)
print 'stepName = ', allSteps, ' frameNumber = ', allFrames[j]
odb.save()
odb.close()