Download Abaqus Scripting User`s Manual
Transcript
READING FROM AN OUTPUT DATABASE
}
Materials
Materials are stored in the materials repository under the Odb object.
Extend the Material commands available to the Odb object using the following statement:
odb_MaterialApi materialApi;
odb.extendApi(odb_Enum::odb_MATERIAL,materialApi);
Access the materials repository using the command:
odb_MaterialContainer& materialContainer = materialApi.materials();
odb_MaterialContainerIT matIT(materialContainer);
for (matIT.first(); !matIT.isDone(); matIT.next()) {
cout << "Material Name : " << matIT.currentKey().CStr() << endl;
const odb_Material& myMaterial = matIT.currentValue();
To print isotropic elastic material properties in a material object:
odb_Elastic elastic = myMaterial.elastic();
if (elastic.hasValue()) {
if (elastic.type() == "ISOTROPIC") {
cout << "isotropic elastic behavior, type = "
<< elastic.moduli().CStr() << endl;
odb_String tableHeader("Youngs modulus
Poisson's ratio ");
if (elastic.temperatureDependency())
tableHeader.append("Temperature ");
for (int i = 0, max = elastic.dependencies(); i < max; ++i)
tableHeader.append(" field # ").append(i);
cout << tableHeader.CStr() << endl;
odb_SequenceSequenceFloat table = elastic.table();
for (int r = 0, rows = table.size(); r <rows; ++r) {
const odb_SequenceFloat& data = table[r];
for (int c = 0, cols = data.size(); c < cols; ++c) {
cout << data[c] << "
";
}
cout << endl;
}
}
}
Some Material definitions have suboptions. For example, to access the smoothing type used
for biaxial test data specified for a hyperelastic material:
10–25
Abaqus ID:
Printed on: