Prerequisites

You need an Abaqus installation, Python 3.x, and a completed ODB result file. The Abaqus Python API ships with every Abaqus licence — no additional packages are required.

  • Abaqus Standard or Explicit (any version with Python API — 6.14+)
  • A completed .odb result file from a finished analysis
  • Command-line access to the machine where Abaqus is installed

Step 1: Open the ODB file

Use openOdb() to open the result file in read-only mode — this is the entry point for all result access.

from odbAccess import openOdb

odb = openOdb(path='my_analysis.odb', readOnly=True)

Always open in readOnly=True mode unless you need to write data back. This prevents accidental corruption of the result file.

Step 2: Navigate the result tree

The ODB is organised as: odb → steps → frames → fieldOutputs → values. Loop through this hierarchy to locate the quantity you need.

step = odb.steps['Step-1']          # name matches your Abaqus step
frame = step.frames[-1]             # -1 = last increment (final result)
stress = frame.fieldOutputs['S']    # 'S' = Mises stress tensor

Step 3: Extract peak values

Use getSubset() to filter by node/element set, then iterate values to find the peak.

import csv

# Get von Mises stress component
mises = stress.getScalarField(invariant=MISES)

peak_stress = 0.0
peak_element = None
for value in mises.values:
    if value.data > peak_stress:
        peak_stress = value.data
        peak_element = value.elementLabel

Step 4: Write results to CSV

Export your extracted values to a structured CSV — one row per load case or step, ready for downstream report generation.

with open('results_summary.csv', 'w', newline='') as f:
    writer = csv.writer(f)
    writer.writerow(['Step', 'Peak_Mises_MPa', 'Element'])
    writer.writerow(['Step-1', round(peak_stress, 2), peak_element])

Step 5: Run the script

Execute the script using the Abaqus Python launcher — not the system Python — because it provides the odbAccess module.

abaqus python extract_results.py

You should see results_summary.csv in the working directory. Open it to verify the values match what you see in Abaqus Viewer.

Next steps

Once results are in CSV, connect them to your report template for fully automated output.

  • Loop the script across multiple ODB files (batch processing across load cases)
  • Add displacement and reaction force extraction using the same pattern
  • Feed the CSV into a Python-based report template to generate formatted PDFs automatically