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:
The valid components and invariants for the different data types are given in Table 1.
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. |