Close

Dear All, there are two channels for you to follow our research. 

1. We started a newsletter called Thoughts on Composites Modeling on LinkedIn. Please subscribe to it to get informed about our research and ideas we want to share with the community.

2. We moved our discussion forum to github at wenbinyugroup · Discussions · GitHub as it has more features which can serve you better. 

Wenbin 

Close

Wiki

Main Page / Abaqus tips and tricks /

How to access Abaqus odb field output efficiently via Abaqus python script

Article abstract

This article will introduce the efficient way to use Abaqus python script to access Abaqus odb field outputs. The considerations for Abaqus python scripting are given. A comparison of several unpacking styles to access odb outputs is made. The demonstration code is provided in Github.


Considerations for Abaqus python performance

*Make use of correct Abaqus object model sequence unpacking. The style of sequence unpacking can significantly influence the efficiency of your Python scripts. *Make use python built-in functions. They are usually optimized for performance. *Make use of 3rd-party modules. They are usually optimized for performance. *In general, working with high-level objects is more efficient than working with low-level objects. *Avoid accessing attributes that require the use of computationally intensive methods. For example: minimize the number of calls to getSubset() and addData() methods.


Comparison of unpacking sytels

Below describe the detailed step by step procedure you followed to solve the problem. It is better to also accompany this document with a youtube video.


# Least efficient for i in range(len(myStress.values)) myStress.valuesi.data

# Moderate efficient tmpStressValues = myStress.values for i in range(len(tmpStressValues)): tmpStressValuesi.data

# Most efficient for value in (myStress.values): value.data


References

  1. ref 1
  2. ref 2

Created on , Last modified on