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,


  // vector
  odb_SequenceString vectorCompLabels;
  vectorCompLabels.append("1");
  vectorCompLabels.append("2");
  vectorCompLabels.append("3");
  odb_SequenceInvariant vectorInvar;
  vectorInvar.append(odb_Enum::MAGNITUDE);
  odb_FieldOutput& vectorField = frameOne.FieldOutput("U",
				  "displacement vector", 
                                  odb_Enum::VECTOR,
				  vectorCompLabels, vectorInvar);
  
  odb_SequenceInt labels2;
  labels2.append(3);
  labels2.append(5);
  odb_SequenceSequenceFloat vecDat;
  odb_SequenceFloat v1;
  v1.append(1.1); v1.append(1.2); v1.append(1.3);
  vecDat.append(v1);
  odb_SequenceFloat v2;
  v2.append(2.1); v2.append(2.2); v2.append(2.3);
  vecDat.append(v2);
  
  vectorField.addData(odb_Enum::NODAL, instanceA, 
                      labels2, vecDat);
 
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:


  odb_SequenceString tensorCompLabels;
  tensorCompLabels.append("s11");
  tensorCompLabels.append("s22");
  tensorCompLabels.append("s33");
  tensorCompLabels.append("s12");
  tensorCompLabels.append("s13");
  tensorCompLabels.append("s23");
  odb_SequenceInvariant tensorInvar;
  tensorInvar.append(odb_Enum::MISES);
  tensorInvar.append(odb_Enum::TRESCA);
  tensorInvar.append(odb_Enum::MAX_PRINCIPAL);
  tensorInvar.append(odb_Enum::MID_PRINCIPAL);
  tensorInvar.append(odb_Enum::MIN_PRINCIPAL);
  
  odb_FieldOutput& tensorField = frameOne.FieldOutput("S",
				  "stress tensor", 
                                  odb_Enum::TENSOR_3D_FULL,
				  tensorCompLabels, tensorInvar);
  
  odb_SequenceInt tensorLabels;
  tensorLabels.append(9);
  tensorLabels.append(99);
  
  odb_SequenceSequenceFloat tensorDat;
  odb_SequenceFloat t1;
  t1.append(1.0); t1.append(2.0); t1.append(3.0);
  t1.append(0.0); t1.append(0.0); t1.append(0.0);
  odb_SequenceFloat t2;
  t2.append(120.0); t2.append(-55.0); t2.append(-85.0);
  t2.append(-55.0); t2.append(-75.0); t2.append(33.0);
  tensorDat.append(t1);
  tensorDat.append(t2);
  
  tensorField.addData(odb_Enum::CENTROID, instanceA, tensorLabels,
		      tensorDat, topShell);
 

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.