Writing field output data

A FieldOutput object contains a cloud of data values (e.g., stress tensors at each integration point for all elements). Each data value has a location, type, and value. You add field output data to a Frame object by first creating a FieldOutput object using the FieldOutput constructor and then adding data to the FieldOutput object using the addData method. For example,

# Create the part and the instance.

part1 = odb.Part(name='part-1', 
    embeddedSpace=THREE_D, type=DEFORMABLE_BODY)
a = odb.rootAssembly
instance1 = a.Instance(name='part-1-1', object=part1)

# Write nodal displacements

uField = frame1.FieldOutput(name='U',
    description='Displacements', type=VECTOR)

# Create the node labels.

nodeLabelData = (1, 2, 3, 4, 5, 6)

# Each set of data corresponds to a node label.

dispData = ((1,2,3),
            (4,5,6),
            (7,8,9),
            (10,11,12),
            (13, 14, 15),
            (16,17,18))

# Add nodal data to the FieldOutput object using the
# node labels and the nodal data for this part instance.

uField.addData(position=NODAL, instance=instance1,
    labels=nodeLabelData, data=dispData)

# Make this the default deformed field for this step.

step1.setDefaultDeformedField(uField)
For a full description of the FieldOutput constructor, see FieldOutput.

The type argument to the FieldOutput constructor describes the type of the data—tensor, vector, or scalar. The properties of the different tensor types are:

Full tensor

A tensor that has six components and three principal values. Full three-dimensional rotation of the tensor is possible.

Three-dimensional surface tensor

A tensor that has only three in-plane components and two principal values. Full three-dimensional rotation of the tensor components is possible.

Three-dimensional planar tensor

A tensor that has three in-plane components, one out-of-plane component, and three principal values. Full three-dimensional rotation of the tensor components is possible.

Two-dimensional surface tensor

A tensor that has only three in-plane components and two principal values. Only in-plane rotation of the tensor components is possible.

Two-dimensional planar tensor

A tensor that has three in-plane components, one out-of-plane component, and three principal values. Only in-plane rotation of the tensor components is possible.

The valid components and invariants for the different data types are given in Table 1.

Table 1. Valid components and invariants for Abaqus data types.
Data type Components Invariants
SCALAR    
VECTOR 1, 2, 3 MAGNITUDE
TENSOR_3D_FULL 11, 22, 33, 12, 13, 23 MISES, TRESCA, PRESS, INV3, MAX_PRINCIPAL, MID_PRINCIPAL, MIN_PRINCIPAL
TENSOR_3D_SURFACE 11, 22, 12 MAX_PRINCIPAL, MIN_PRINCIPAL, MAX_INPLANE_PRINCIPAL, MIN_INPLANE_PRINCIPAL
TENSOR_3D_PLANAR 11, 22, 33, 12 MISES, TRESCA, PRESS, INV3, MAX_PRINCIPAL, MID_PRINCIPAL, MIN_PRINCIPAL, MAX_INPLANE_PRINCIPAL, MIN_INPLANE_PRINCIPAL, OUTOFPLANE_PRINCIPAL
TENSOR_2D_SURFACE 11, 22, 12 MAX_PRINCIPAL, MIN_PRINCIPAL, MAX_INPLANE_PRINCIPAL, MIN_INPLANE_PRINCIPAL
TENSOR_2D_PLANAR 11, 22, 33, 12 MISES, TRESCA, PRESS, INV3, MAX_PRINCIPAL, MID_PRINCIPAL, MIN_PRINCIPAL, MAX_INPLANE_PRINCIPAL, MIN_INPLANE_PRINCIPAL, OUTOFPLANE_PRINCIPAL

For example, the following statements add element data to the FieldOutput object:

# Write stress tensors (output only available at 
# top/bottom section points)
# The element defined above (S4) has 4 integration 
# points. Hence, there are 4 stress tensors per element.
# Abaqus creates one layer of section points each
# time the script calls the addData method.

elementLabelData = (1, 2)

topData = ((1.,2.,3.,4.), (1.,2.,3.,4.),
           (1.,2.,3.,4.), (1.,2.,3.,4.),
           (1.,2.,3.,4.), (1.,2.,3.,4.),
           (1.,2.,3.,4.), (1.,2.,3.,4.),
          )
bottomData = ((1.,2.,3.,4.), (1.,2.,3.,4.),
              (1.,2.,3.,4.), (1.,2.,3.,4.),
              (1.,2.,3.,4.), (1.,2.,3.,4.),
              (1.,2.,3.,4.), (1.,2.,3.,4.),
             )

transform = ((1.,0.,0.), (0.,1.,0.), (0.,0.,1.))

sField = frame1.FieldOutput(name='S',
    description='Stress', type=TENSOR_3D_PLANAR,
    componentLabels=('S11', 'S22', 'S33',
    'S12'), validInvariants=(MISES,))
sField.addData(position=INTEGRATION_POINT, 
    sectionPoint=spTop, instance=instance1, 
    labels=elementLabelData, data=topData, 
    localCoordSystem=transform)
sField.addData(position=INTEGRATION_POINT, 
    sectionPoint=spBot, instance=instance1,  
    labels=elementLabelData, data=bottomData, 
    localCoordSystem=transform)

# For this step, make this the default field for 
# visualization.

step1.setDefaultField(sField)

For a full description of the addData command, see addData.

As a convenience, localCoordSystem can be a single transform or a list of transforms. If localCoordSystem is a single transform, it applies to all values. If localCoordSystem is a list of transforms, the number of items in the list must match the number of data values.