Skip to main content

PyDPF-Post Python library.

Project description

PyDPF-Post - Ansys Data Post-Processing Framework

PyAnsys Python pypi MIT

The Data Processing Framework (DPF) is designed to provide numerical simulation users/engineers with a toolbox for accessing and transforming simulation data.

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

This module leverages the PyDPF-Core project's ansys-dpf-core package and can be found by visiting PyDPF-Core GitHub. Use ansys-dpf-core for building more advanced and customized workflows using Ansys DPF.

Documentation

Visit the PyDPF-Post Documentation for a detailed description of the package, or see the Examples Gallery for more detailed examples.

Installation

Install this repository with:

pip install ansys-dpf-post

You can also clone and install this repository with:

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

Brief Demo

Provided you have ANSYS 2023 R1 installed, a DPF server starts automatically once you start using PyDPF-Post. Loading a simulation to extract and post-process results:

>>> 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
              set_id         3
      node      comp          
      4872         X -3.41e-05
                   Y  1.54e-03
                   Z -2.64e-06
      9005         X -5.56e-05
                   Y  1.44e-03
                   Z  5.31e-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 versions starting from 2021 R1 to 2022 R2, use the following 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

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

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.3.0.tar.gz (64.6 kB view details)

Uploaded Source

Built Distribution

ansys_dpf_post-0.3.0-py3-none-any.whl (75.9 kB view details)

Uploaded Python 3

File details

Details for the file ansys-dpf-post-0.3.0.tar.gz.

File metadata

  • Download URL: ansys-dpf-post-0.3.0.tar.gz
  • Upload date:
  • Size: 64.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for ansys-dpf-post-0.3.0.tar.gz
Algorithm Hash digest
SHA256 21c17a2e5f6c35692c78e04db820fb838cfeb560b1d54a2c7dbc51abc0709f64
MD5 08568c513fff827d935f58c863d61971
BLAKE2b-256 4be6d0cf972a995370658f8dbd96be5a839c85ad5638492e7ba1fdd74260add1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ansys_dpf_post-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb74c4d2ee572e4c9bdc7333d28d65d3ff9ccb0ba3f7052bb77e06a5098de650
MD5 7b4456dbf2c33fb5f3a5b11d4f0979a4
BLAKE2b-256 985b2ebed29d7c21ddccd021f4aa121e2bc079086c28701f2b8b1f0c27bd1643

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