Stress range for multiple load cases

This example illustrates how you can use the envelope operations to compute the stress range over a number of load cases. The example script does the following:

  • For each load case during a specified step, the script collects the S11 components of the stress tensor fields into a list of scalar fields.

  • Computes the maximum and minimum of the S11 stress component using the envelope calculations.

  • Computes the stress range using the maximum and minimum values of the stress component.

  • Creates a new frame in the step.

  • Writes the computed stress range into a new FieldOutput object in the new frame.

Use the following command to retrieve the example script:

abaqus fetch job=stressRange

The fetch command also retrieves an input file that you can use to generate an output database that can be read by the example script.


from odbAccess import *

# retrieve request from user
odbName = raw_input('Enter odb name')
stepName = raw_input('Enter step name')

# retrieve steps from the odb
odb=openOdb(odbName)
step = odb.steps[stepName]
sFields = []

for loadCase in step.loadCases.values():
     stressField = step.getFrame(loadCase=loadCase).\
         fieldOutputs['S']
     sFields.append(stressField.getScalarField(
         componentLabel='S11')) 

# compute stress range
maxStress, maxLoc = maxEnvelope(sFields)
minStress, minLoc = minEnvelope(sFields)

stressRange = maxStress - minStress

# save to same step
newFrame = step.Frame(incrementNumber=0, frameValue=0.0,
    description='Stress Range')
newFrame.FieldOutput(field=stressRange, name='S11 Range')

odb.save()
odb.close()