Download ABAQUS Scripting User's Manual

Transcript
READING FROM AN OUTPUT DATABASE
print dataline
Some Material definitions have suboptions. For example, to access the smoothing type used
for biaxial test data specified for a hyperelastic material:
if hasattr(material,'hyperelastic'):
hyperelastic = material.hyperelastic
testData = hyperelastic.testData
if testData == ON:
if hasattr(hyperelastic,'biaxialTestData'):
biaxialTestData = hyperelastic.biaxialTestData
print 'smoothing type : ',biaxialTestData.smoothing
Chapter 25, “Material commands,” of the ABAQUS Scripting Reference Manual describes the
Material object commands in more detail.
Sections
Sections are stored in the sections repository under the Odb object.
The following statements display the repository keys of the sections in an output database:
allSections = odb.sections
for sectionName in allSections.keys():
print 'Section Name : ',sectionName
The Section object can be one of the various section types. The type command provides
information on the section type. For example, to determine whether a section is of type
“homogeneous solid section” and to print it’s thickness and associated material name:
for mySection in allSections.values():
if type(mySection) == HomogeneousSolidSectionType:
print 'material name = ', mySection.material
print 'thickness = ', mySection.thickness
Similarily, to access the beam profile repository:
allProfiles = odb.profiles.values()
numProfiles = len(allProfiles)
print 'Total Number of profiles in the ODB : %d' \
% numProfiles
The Profile object can be one of the various profile types. The type command provides
information on the profile type. For example, to output the radius of all circular profiles in the odb:
for myProfile in allProfiles:
if type(myProfile) == CircularProfileType:
print 'profile name = %s, radius = %8.3f' \
8–13