Python Scripting in ABAQUS
Kevin Maxwell
Texas A&M University
August 30, 2006
Introduction
ABAQUS CAE provides a graphical user interface that allows the user to create
finite
element models that can then be analyzed in ABAQUS Standard. For every feature in
CAE, there is a corresponding Python script command that the program uses when
creating the model. If the language is understood well enough, an entire model can be
created simply by running a script file.
While one could write an entire script from scratch, ABAQUS provides several easier
methods that autogenerate Python commands. When a model is created in CAE, two
files are automatically created in the work directory. The replay file records every action
that is performed in CAE including camera zoom/panning commands and also any
mistakes that were made and then corrected.
This file can be run to “replay” all the work
that has been done on the model. The recover file records only the minimum necessary
commands to recreate the model. If an error occurs and CAE closes without saving, the
recover file can be run to recreate the model. When a model is saved, CAE uses the
recover file to write a journal file. The journal file is a comprehensive script that shows
all work saved on the model. Note that the recover file is deleted whenever the model is
saved and all of its commands are transferred to the journal file. The recover and journal
files provide an easy alternative to writing Python scripts from scratch. One can simply
define a model in CAE and then save the Python commands from the recover or journal
files as a separate script file.
There are several valuable sources of information pertaining to scripting in ABAQUS.
The
ABAQUS Scripting User‟s Manual and ABAQUS Scripting Reference Manua
l are
invaluable resources that are included in the ABAQUS documentation. The user‟s
manual gives an overview to scripting while the reference manual provides in-depth
coverage of every scripting command used in ABAQUS. Another source of information
can be found at