The following examples illustrate how you use the output database commands to access data from an output database:
This example illustrates how you can iterate through an output database and search for the maximum value of von Mises stress. The program opens the output database specified by the first argument on the command line and iterates through the following:
Each step.
Each frame in each step.
Each value of von Mises stress in each frame.
The following illustrates how you can run the example program from the system prompt. The program will search the element set ALL ELEMENTS in the viewer tutorial output database for the maximum value of von Mises stress:
abaqus odbMaxMises.py -odb viewer_tutorial.odb -elset “ ALL ELEMENTS”
Note: If a command line argument is a String that contains spaces, some systems will interpret the String correctly only if it is enclosed in double quotation marks. For example, “ ALL ELEMENTS”.
Use the following commands to retrieve the example program and the viewer tutorial output database:
abaqus fetch job=odbMaxMises.C
abaqus fetch job=viewer_tutorial
The following example illustrates how you can use the Abaqus C++ API commands to do the following:
Create a new output database.
Add model data.
Add field data.
Add history data.
Read history data.
Save the output database.
abaqus fetch job=odbWrite
This example illustrates how you can print the content of an output database. The example opens the output database specified on the command line and calls functions that print the following:
Parts
Part instances
The root assembly
Connectors
Connector properties
Datum coordinate systems
Nodes
Elements
Sets
Faces
Sections
Steps
Frames
Fields
Field values
Field bulk data
Field locations
History regions
History output
History points
Use the following command to retrieve the example program:
abaqus fetch job=odbDump
This example illustrates how you can decrease the size of an output database. In most cases a large output database results from excessive field output being generated over a large number of frames. The Abaqus C++ API does not support the deletion of data from an output database; however, you can use this example program to copy data from select frames into a second output database created by a datacheck analysis that has identical model data. The original analysis and the datacheck analysis must be run using the same number of processors because the internal organization of data may differ based on the number of processors. The program uses addData to copy data at specified frames from the large output database into the new output database. The addData method works only when the model data in the two output databases are identical. For more information, see “addData,” Section 61.7.6 of the Abaqus Scripting Reference Manual.
When you run the program, the following command line parameters are required:
-smallOdb odbName
The name of the output database created with a datacheck analysis of the original problem. For more information, see “Abaqus/Standard, Abaqus/Explicit, and Abaqus/CFD execution,” Section 3.2.2 of the Abaqus Analysis User's Manual.
-largeOdb odbName
The name of the large output database generated by the original problem. The program copies selected frames from this output database.
-history
Copy all history output from all available steps in the large output database. By default, history output is not copied.
Warning: Copying large amounts of history data can result in the program creating a very large output database.
-debug
Print a detailed report of all the operations performed during the running of the program. By default, no debug information is generated.
Warning: If you are extracting data from a large output database, the debug option can generate large amounts of information.
The following is an example of how you can use this program in conjunction with the output database generated by the problem described in “Free ring under initial velocity: comparison of rate-independent and rate-dependent plasticity,” Section 1.3.4 of the Abaqus Benchmarks Manual. Use the following commands to retrieve the example program and the benchmark input file:
abaqus fetch job=odbFilter.C abaqus fetch job=ringshell.inp
Run an analysis using the benchmark input file:
abaqus job=ringshellThis creates an output database called ringshell.odb that contains 100 frames of data.
Run a datacheck analysis to obtain a new output database called ringshell_datacheck.odb that contains the same model data as ringshell.odb:
abaqus job=ringshell_datacheck -input ringshell datacheck
Create the executable program:
abaqus make job=odbFilter.C
The program displays the number of frames available in each step. For each step you must specify the number of increments between frames, which is the frequency at which the data will be copied to the new output database. Data for the first and last increment in each step are always copied. For example, if a step has 100 frames, and you enter a frame interval of 37, the program will copy data for frames 0, 37, 74, and 100.
The following statement will run the executable program and read data from the small output database containing only model data and the large output database created by the benchmark example:
abaqus odbFilter -smallOdb ringshell_datacheck -largeOdb ringshellThe program prompts you for the increment between frames:
Results from ODB : ringshell.odb will be filtered & written to ODB: ringshell_datacheck By default only the first & last increment of a step will be saved For each step enter the increment between frames for example : 3 => frames 0,3,6,..,lastframe will be saved STEP Step-1 has 101 Frames Enter Increment between framesEnter 37 to define the increment between frames. The program then reads the data and displays the frames being processed:
Processing frame # : 0 Processing frame # : 37 Processing frame # : 74 Processing frame # : 100 Filtering successfully completed
This example illustrates how you can use the envelope operations to compute the stress range over a number of load cases. The example program does the following:
For each load case during a specified step, the program collects the S11 components of the stress tensor fields into a list of scalar fields.
Computes the maximum and minimum of the S11 stress component using the envelope calculations.
Computes the stress range using the maximum and minimum values of the stress component.
Creates a new frame in the step.
Writes the computed stress range into a new FieldOutput object in the new frame.
Use the following command to retrieve the example program:
abaqus fetch job=stressRangeThe fetch command also retrieves an input file that you can use to generate an output database that can be read by the example program.
This example illustrates the use of a C++ program to read selected element integration point records from an output database and to postprocess the elbow element results. The program creates X–Y data that can be plotted with the X–Y plotting capability in Abaqus/CAE. The program performs the same function as the FORTRAN program described in “Creation of a data file to facilitate the postprocessing of elbow element results: FELBOW,” Section 14.1.6 of the Abaqus Example Problems Manual.
The program reads integration point data for elbow elements from an output database to visualize one of the following:
Variation of an output variable around the circumference of a given elbow element, or
Ovalization of a given elbow element.
To use option 2, you must ensure that the integration point coordinates (COORD) are written to the output database. For option 1 the X-data are data for the distance around the circumference of the elbow element, measured along the middle surface, and the Y-data are data for the output variable. For option 2 the X–Y data are the current coordinates of the middle-surface integration points around the circumference of the elbow element, projected to a local coordinate system in the plane of the deformed cross-section. The origin of the local system coincides with the center of the cross-section; the plane of the deformed cross-section is defined as the plane that contains the center of the cross-section.
You should specify the name of the output database during program execution. The program prompts for additional information, depending on the option that was chosen; this information includes the following:
Your choice for storing results (ASCII file or a new output database)
File name based on the above choice
The postprocessing option (1 or 2)
The part name
The step name
The frame number
The element output variable (option 1 only)
The component of the variable (option 1 only)
The section point number (option 1 only)
The element number or element set name
Before program execution, compile and link the C++ program using the abaqus make utility:
abaqus make job=felbow.CAfter successful compilation, the program's object code is linked automatically with the Abaqus object codes stored in the shared program library and interface library to build the executable program. Refer to Chapter 4, “Customizing the Abaqus environment,” of the Abaqus Installation and Licensing Guide to see which compile and link commands are used for a particular computer.
Before executing the program, run an analysis that creates an output database file containing the appropriate output. This analysis includes, for example, output for the elements and the integration point coordinates of the elements. Execute the program using the following command:
abaqus felbow <filename.odb>The program prompts for other information, such as the desired postprocessing option, part name, etc. The program processes the data and produces a text file or a new output database file that contains the information required to visualize the elbow element results.
“Elastic-plastic collapse of a thin-walled elbow under in-plane bending and internal pressure,” Section 1.1.2 of the Abaqus Example Problems Manual, contains several figures that can be created with the aid of this program.