Skip to main content

PyDPF-Post Python library.

Project description

PyDPF-Post - Ansys Data PostProcessing Framework

PyAnsys Python pypi MIT

The Ansys Data Processing Framework (DPF) is designed to provide numerical simulation users and 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 then apply postprocessing operations on it.

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

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

See the PyDPF-Core main page <https://dpf.docs.pyansys.com/version/stable/index.html>_ for more information on compatibility.

This module 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

For comprehensive information on this package, see the PyDPF-Post Documentation, For detailed how-to information, see the Examples in the PyDPF-Post documentation.

Installation

To install this package, use this command:

pip install ansys-dpf-post

You can also clone and install this package with this code:

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 starts automatically once you start using PyDPF-Post.

To load a simulation to extract and post-process 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 versions 2021 R1 and 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

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

Uploaded Source

Built Distribution

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

ansys_dpf_post-0.5.0-py3-none-any.whl (118.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ansys_dpf_post-0.5.0.tar.gz
  • Upload date:
  • Size: 100.9 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.5.0.tar.gz
Algorithm Hash digest
SHA256 1650bb905671e227d285ae149d0a3196860258771ddbb254384ce2821da93e8a
MD5 e1494b1573dd7c9cd1adb5f478e99490
BLAKE2b-256 0005ff4a7bddd2b6ff071d8ded76ef9db3a1672e06b2909c9411450ca6cc0d6a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ansys_dpf_post-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 118.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for ansys_dpf_post-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1feb14aedc9d002d2592299b88bbb7b8ac19fd395def42dbfbb4f1113d60b74f
MD5 a15c3ff63f7efdb3e2af4c8b119bed66
BLAKE2b-256 c087e74627ce05c0567929c0c3c6d80be798e73b9852e9471cfc713643458398

See more details on using hashes here.

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