Skip to main content

PyDPF-Post Python library.

Project description

PyDPF-Post - Ansys Data PostProcessing Framework

PyAnsys Python pypi MIT

Ansys Data Processing Framework (DPF) provides numerical simulation users and engineers with a toolbox for accessing and transforming simulation data. With DPF, you can perform complex preprocessing or postprocessing of large amounts of simulation data within a simulation workflow.

The Python ansys-dpf-post package provides a high-level, physics-oriented API for postprocessing. Loading a simulation (defined by its results files) allows you to extract simulation metadata and results and then apply postprocessing operations on them.

The latest version of DPF supports Ansys solver results files for:

  • Mechanical APDL (.rst, .mode, .rfrq, .rdsp)
  • LS-DYNA (.d3plot, .binout)
  • Fluent (.cas/dat.h5, .flprj)
  • CFX (.cad/dat.cff, .flprj)

For more information on file support, see the main page in the PyDPF-Core documentation.

PyDPF-Post leverages the PyDPF-Core project's ansys-dpf-core package, which is available at PyDPF-Core GitHub. Use the ansys-dpf-core package for building more advanced and customized workflows using Ansys DPF.

Documentation and issues

Documentation for the latest stable release of PyPDF-Post is hosted at PyDPF-Post documentation.

In the upper right corner of the documentation's title bar, there is an option for switching from viewing the documentation for the latest stable release to viewing the documentation for the development version or previously released versions.

You can also view or download the PyDPF-Post cheat sheet. This one-page reference provides syntax rules and commands for using PyDPF-Post.

On the PyDPF-Post Issues page, you can create issues to report bugs and request new features. On the PyDPF-Post Discussions page or the Discussions page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.

To reach the project support team, email pyansys.core@ansys.com.

Installation

To install this package, run this command:

pip install ansys-dpf-post

You can also clone and install this package with these commands:

git clone https://github.com/ansys/pydpf-post
cd pydpf-post
pip install . --user

Brief demo

Provided you have Ansys 2023 R1 or later installed, a DPF server automatically starts once you start using PyDPF-Post.

To load a simulation for a MAPDL result file to extract and postprocess results, use this code:

>>> from ansys.dpf import post
>>> from ansys.dpf.post import examples
>>> simulation = post.load_simulation(examples.download_crankshaft())
>>> displacement = simulation.displacement()
>>> print(displacement)
             results       U (m)
             set_ids           3
 node_ids components            
     4872          X -3.4137e-05
                   Y  1.5417e-03
                   Z -2.6398e-06
     9005          X -5.5625e-05
                   Y  1.4448e-03
                   Z  5.3134e-06
      ...        ...         ...
>>> displacement.plot()

Example Displacement plot Crankshaft

>>> stress_eqv = simulation.stress_eqv_von_mises_nodal()
>>> stress_eqv.plot()

Example Stress plot Crankshaft

To run PyDPF-Post with Ansys 2021 R1 through 2022 R2, use this code to start the legacy PyDPF-Post tools:

>>> from ansys.dpf import post
>>> from ansys.dpf.post import examples
>>> solution = post.load_solution(examples.download_crankshaft())
>>> stress = solution.stress()
>>> stress.eqv.plot_contour(show_edges=False)

Example Stress plot Crankshaft

License and acknowledgements

PyDPF-Post is licensed under the MIT license. For more information, see the LICENSE file.

PyDPF-Post makes no commercial claim over Ansys whatsoever. This library extends the functionality of Ansys DPF by adding a Python interface to DPF without changing the core behavior or license of the original software.

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

ansys_dpf_post-0.7.0.tar.gz (104.7 kB view details)

Uploaded Source

Built Distribution

ansys_dpf_post-0.7.0-py3-none-any.whl (122.9 kB view details)

Uploaded Python 3

File details

Details for the file ansys_dpf_post-0.7.0.tar.gz.

File metadata

  • Download URL: ansys_dpf_post-0.7.0.tar.gz
  • Upload date:
  • Size: 104.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for ansys_dpf_post-0.7.0.tar.gz
Algorithm Hash digest
SHA256 926a307b9a35bf18333413336d7ff84a52d56076dcf907b5dd9d3d78ad907cb5
MD5 49be87d83d0018786a9365f64669663b
BLAKE2b-256 b46eb69d1cdf72064c4f2bb595d05de782edccaec78be89dadfdac1cec29bf62

See more details on using hashes here.

File details

Details for the file ansys_dpf_post-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_dpf_post-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f67f55525dd761ed270437a4eb39b50cc350fc51b059aa5e36da4d7dde67da8b
MD5 a2aa44ae7ae5ff1a917520902d6727be
BLAKE2b-256 5582861646652a465dda37476ad1f1b4cc9fca1c7cf117c227aa237b0f3d078f

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