Skip to content

SIMULIA Abaqus FEA: Creating new field outputs with Python

License

Notifications You must be signed in to change notification settings

Jachtabahn/abaqus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is Abaqus?

Abaqus is a software suite for finite element analysis and computer-aided engineering. It is used for

  • modeling of mechanical components,
  • analysis of mechanical components,
  • visualizing the finite element analysis result.

Abaqus uses the open-source scripting language Python for scripting and customization. And in this article we will see, how we can write Python scripts to customize Abaqus.

Quick Start

We will run the scripts directly from the Abaqus window. To use the scripts, do the following:

  1. Open Abaqus/CAE or Abaqus/Viewer.
  2. Click File / Run Script... and navigate to extract.py.
  3. (Now you have a new file extracted.csv containing information from your field outputs.)
  4. Click File / Run Script... and navigate to fill.py.
  5. (Now you have a new file enriched.csv containing information from your field outputs plus new information computed with your Python script.)
  6. Click File / Run Script... and navigate to field_outputs.py.
  7. Click File / Open... and set the file filter to Output Database (*.odb) and navigate to your output database (at ODB_PATH).
  8. Now, you have new field outputs corresponding to new lists of numbers computed in Python :)

In the rest of the article, we will dive more deeply into those three Python scripts and in what they do.

Output databases

The standard Abaqus workflow looks like this:

Now, let's look at a job.odb output file. This file represents an output database. An output database contains the results from your analysis. This output database contains the following things:

  • Steps
  • Frames
  • Field Outputs

An output database can have several steps. Each step is named like Step-1. Each step consists of many frames. The frames are numbered like 0,1,2,3. Each frame has several field outputs. Each field output has a name and list of numbers. The numbers are usually rational numbers with many digits after the comma.

Now, our job is to extract all field outputs from a specific frame from a specific step from a given output database. Our next job is to process those field outputs to create new information. Our last job is to create new field outputs containing that new information. Let's write a Python script to do that.

In this article, we deal with field outputs. If you want to learn more about history outputs instead, see here.

Field outputs

We will proceed in three steps.

  1. First, in extract.py. we will read out all field outputs, that we can find, and write them into a CSV file. CSV means comma-separated values. So we will just write all the numbers from the field output as a comma-separated list of values into a file. We also put the name of the field output into this file. That's it.

  2. Second, in fill.py, we will enrich this CSV file with additional lists of numbers. We will compute these new lists from the numbers, that are already there. This computation can be very complex and can involve differentiating or integrating some complex function with the numbers, that are already there, as its parameters. Then, a new enriched CSV file is created, containing the old number lists plus the new number lists.

  3. Third, in field_outputs.py, we will read this enriched CSV file to add the new number lists as new field outputs to our output database.

The main resource for writing these scripts was wufengyun.com. On this website, it is possible to

About

SIMULIA Abaqus FEA: Creating new field outputs with Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages