Python Execution

The Python language is used throughout Abaqus: in the Abaqus environment file and to perform parametric studies. The abaqus python facility is used to access the Python interpreter.

You can generate, modify, and read SIM documents using the SIM Results Python API.

For more information on standard Python command line options, see the documentation on the official Python website ().

This page discusses:

Simulation Interchange Model

The Simulation Interchange Model (SIM) is the SIMULIA data storage and exchange mechanism used by 3DEXPERIENCE SIMULIA apps. It is a database designed to handle large volumes of data efficiently. It supports both model and results data.

The data access starts with accessing a file named .SMAManifest. This is an xml file that groups other files that make up the database: binary files with extensions .SMAFocus and .SMABulk.

You generate a SIM document by running a 3DEXPERIENCE simulation or by running a stand-alone Abaqus execution using the resultsFormat=SIM option (see Abaqus/Standard and Abaqus/Explicit Execution). You can read, access, or modify the SIM document using the SIM Results API.

SIM Results Python API

A SIM document can store both model and results data. You can visualize the results SIM document in the Physics Results Explorer app on the 3DEXPERIENCE platform. While results documents are usually generated by SIMULIA apps, they can also be generated, modified, and read using the SIM Results API, available in both C++ and Python. This section discusses the SIM Results Python API.

The SIM Results Python API has two main classes: SIMResultsReader and SIMResultsWriter, which allow you to read and write results.

Detailed instructions for using the SIM Results Python API are available in the Developer Assistance documentation at . Select the current release, and navigate to Native Apps Automation > Simulation > Physics Simulation > Simulation Interchange Model to view the following topics:

The SIMULIA Established Products CAA API media contains the SIM Results Python API. For more information, see the SIMULIA Installation Guide.

You can run a script generated by this API from the command prompt using the following command:

abaqus python python_file_name sim=sim_file_name log=log_file_name

Features

The SIM Results Python API:

  • uses Numpy arrays for efficiency,
  • throws clear exceptions during the reading and writing phase,
  • supports Unicode characters,
  • uses very few classes as most of the methods are directly under reader and writer classes,
  • supports multiple field classes per output location, and
  • provides functionality to read or write basic model data (such as nodes, elements, materials, and sections) and supports full results data.

Limitations

The SIM Results Python API has the following limitations:

  • The API does not provide the ability to read and write many model attributes such as loads, boundary conditions, interactions, material properties, and surfaces. The SIMResultsReader reference and SIMResultsWriter reference topics detail the coverage attributes.
  • There are no methods to add part and assembly information using the SIMResultsWriter API.

Command Summary

abaqus python python_file_name sim sim_file_name log log_file_name

Command Line Options

python_file_name

The Python interpreter executes the instructions in the specified python_file_name. If this option is omitted from the command line, the Python interpreter is started in interactive mode.

sim

This option specifies the name of the SIM file.

log

This option specifies the name of the log file. The API adds warning and error messages and other output information to this file.