Skip to main content

A Python library for the visualization and post-processing of Abaqus ASCII result files

Project description

Pybaqus

Pybaqus is a python library to import the output files generated by Abaqus in the ASCII *.fil format, and create a VTK object from the data. The results can then be analyzed in pure python (i.e. no Abaqus licence needed) with the great tools provided by PyVista.

Features

Pybaqus is in a very early development stage. Therefore, there are still many unimplemented functionalities. However, basic operations like importing the mesh and the nodal and element results is implemented and can be used for some analysis.

The following features are either already implemented or planned:

  • Import 2D meshes
  • Import 3D meshes
  • Import nodal results
  • Import element results
  • Element and node sets
  • Extrapolate element results from Gaussian points to nodes (implemented for some elements)
  • Import history output
  • Compute stresses along paths
  • Compute section forces and moments
  • Documentation

Installation

pip install pybaqus

Quick-start

The first thing you need is to tell Abaqus that you want an ASCII *.fil result file. To get that you need to write the following lines in your *.inp file, within the step definition (before the *End Step command) e.g.:

...
*FILE FORMAT, ASCII
*EL FILE, DIRECTIONS=YES
S, E, COORD
*NODE FILE
COORD, U

*End Step
...

You can specify different output variables (as long as they are available for the elements you are using, of course). After submitting your model you will get a *.fil file. This is the file you need, as it can be imported with Pybaqus.

Import the *.fil file like this:

from pybaqus import open_fil

res = open_fil("your_result.fil")

Great! That was it. :)

Now you have your results as a VTK object, wrapped by PyVista, and there's nothing that can get in your way to analyze your results with pure python.

Plot the mesh

import pyvista as pv

mesh = res.get_mesh()


plot = pv.Plotter()
plot.add_mesh(mesh, show_edges=True, color="white")
plot.view_xy()
plot.show()

Mesh

Cool! But something's missing there. Colors! We can plot some of our results like this:

mesh = res.get_deformed_mesh(step=1, inc=1, scale=3)
s2 = res.get_nodal_result(var="S2", step=1, inc=1)
mesh.point_data["S2"] = s2

plot = pv.Plotter()
plot.add_mesh(mesh, show_edges=True, color="white",
           scalars="S2", show_scalar_bar=True)
plot.view_xy()
plot.show()

Mesh

That's it! Since the API is still under development, some of these functions might change.

And now you can de whatever you want with your results in python. Have fun!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybaqus-0.2.16.tar.gz (299.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pybaqus-0.2.16-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file pybaqus-0.2.16.tar.gz.

File metadata

  • Download URL: pybaqus-0.2.16.tar.gz
  • Upload date:
  • Size: 299.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pybaqus-0.2.16.tar.gz
Algorithm Hash digest
SHA256 0fa95040930d65b3a00cc34562cfeb51f40ae0dbce476b5c4c6356c573cd9c91
MD5 98d595506a2edc8fa579d10da5710c19
BLAKE2b-256 eb6e061a4b138cfdb879ead45002fd9be963f95f7941b07dbe169a0ee9478a2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybaqus-0.2.16.tar.gz:

Publisher: python-publish.yml on cristobaltapia/pybaqus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pybaqus-0.2.16-py3-none-any.whl.

File metadata

  • Download URL: pybaqus-0.2.16-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pybaqus-0.2.16-py3-none-any.whl
Algorithm Hash digest
SHA256 4d1d912d790e9e73ad9591aa2f69610e67a6d2f254e4d72067ef8d1ae595ba1f
MD5 e81894d96143797c6c6c1d1a9e92127b
BLAKE2b-256 b83b381e32ce98a2dec0505a59ca31cbf4fb1ef2e68df8d62708db3cf8d0f5d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybaqus-0.2.16-py3-none-any.whl:

Publisher: python-publish.yml on cristobaltapia/pybaqus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page