The object model is an important concept in
object-oriented programming. The object model consists of the
following:
A definition of each
Abaqus Scripting Interface
object including its methods and data members. The object definitions are found
in the
Abaqus Scripting Reference Guide.
Definitions of the relationships between the objects. These
relationships form the structure or the hierarchy of the object model. The
relationships between the objects are summarized in the following list:
Ownership
The ownership hierarchy defines the access path to the objects in the
Abaqus
model.
Associations
Associations describe the relationships between the objects; for
example, whether one object refers to another and whether an object is an
instance of another.
Abaqus
extends Python with approximately 500 additional objects, and there are many
relationships between these objects. As a result, the complete
Abaqus
object model is too complex to illustrate in a single figure.
In general terms the
Abaqus
object model is divided into the Session, the
Mdb, and the Odb objects, as shown in
Figure 1.
An object in the object model can be one of the following:
Container
A Container is an object that contains
objects of a similar type. A container in the
Abaqus
object model can be either a repository or a sequence. For example, the
steps container is a repository that contains all the steps in
the analysis. Your scripts use the steps container to access a
step.
Singular
object
Objects that are not containers are shown as a Singular
object. A singular object contains no other objects of a
similar type; for example, the Session object and the
Mdb object. There is only one Session
object and only one Mdb object in the
Abaqus
object model.
The ... at the end of the object models shown in this section
indicates that there are additional objects in the model that are not included
in the figure. For clarity, the figures show only the most commonly used
objects in the object model.
The statement from abaqus import * imports
the Session object (named
session) and the Mdb object
(named mdb) and makes them available to your
scripts. The statement from odbAccess import *
allows you to access
Abaqus
output results from your script. The Session,
Mdb, and Odb objects are described as follows:
Session
Session objects are objects that are not saved between
Abaqus/CAE
sessions; for example, the objects that define viewports, remote queues, and
user-defined views, as shown in
Figure 2.
The viewports container is owned by the
Session object, as shown in
Figure 3.
Mdb
The statement from abaqus import * creates an
instance of the Mdb object called
mdb. Mdb objects are
objects that are saved in a model database and can be recovered between
Abaqus/CAE
sessions. Mdb objects include the
Model object and the Job object. The
Model object, in turn, is comprised of
Part objects, Section objects,
Material objects, Step objects, etc.
Figure 4
shows the basic structure of the objects under the Model object. For more
information, see
The Model object model.
Odb
Odb objects are saved in an output database and contain
both model and results data, as shown in
Figure 5.
Most of the commands in the
Abaqus Scripting Interface
begin with either the Session, the Mdb, or the
Odb object. For example,