Skip to main content

No project description provided

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_arrays["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.13.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

pybaqus-0.2.13-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pybaqus-0.2.13.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.10.0-arch1-2

File hashes

Hashes for pybaqus-0.2.13.tar.gz
Algorithm Hash digest
SHA256 5414f8302cfed916529856e88caf79255cf132af7e12963410d57b4d73cdc2f2
MD5 c474236c0c44a3c1f4fac041a6e41650
BLAKE2b-256 cb30370876943e21b5e267eef6a9426c741742f6e2f3da350aefdf29f41891d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybaqus-0.2.13-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.10.0-arch1-2

File hashes

Hashes for pybaqus-0.2.13-py3-none-any.whl
Algorithm Hash digest
SHA256 4ba571829a33784493a3b37e9eeeb6cc63c4e100cf57ca334521bc4aba7cda30
MD5 060d1c0e0a109ce60f90c2b926aeb97f
BLAKE2b-256 a61d4f263ca9060722fe589d443ea3a987afec9cca60bab86df180ebe7530be0

See more details on using hashes here.

Supported by

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