Download ABAQUS Scripting User's Manual
Transcript
READING FROM AN OUTPUT DATABASE
cout << data[comp] << "
cout << endl;
";
The resulting output is
Node: 1000
U = 0.0000
-76.4555
The arguments to getSubset are a region, an element type, a position, or section point data. The
following is a second example that uses an element set to define the region and generates formatted
output for the stress at integration points for CAX4 elements from the element set "CENT":
odb_Set& topCenter = instance.elementSets()["CENT"];
odb_Step& step2 = odb.steps()["Step-2"];
odb_String CAX4 = "CAX4";
odb_FieldOutput& stressField =
step2.frames(3).fieldOutputs()["S"];
odb_FieldOutput fieldCAX4 = stressField.getSubset(CAX4);
odb_FieldOutput fieldIP =
fieldCAX4.getSubset(odb_Enum::INTEGRATION_POINT);
odb_FieldOutput fieldTopCenter = fieldIP.getSubset(topCenter);
const odb_SequenceFieldValue& vals = fieldTopCenter.values();
int valSize = vals.size();
int dSize = 0;
for (int l=0; l<valSize; l++) {
const odb_FieldValue val = vals[l];
cout << "Element label = " << val.elementLabel();
cout << " Integration Point = " << val.integrationPoint();
cout << endl;
const float* const data = val.data(dSize);
cout << " S : ";
for (int k=0; k < dSize; k++) {
cout << data[k] << " ";
}
cout << endl;
}
The resulting output is
Element label = 1 Integration Point = 1
S : 0.01230
-0.05658
0.00892
-0.00015
Element label = 1 Integration Point = 2
9–34