Metadata-Version: 2.1
Name: ansys-dpf-post
Version: 0.5.0
Summary: PyDPF-Post Python library.
Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>
Requires-Python: >=3.8,<4.0
Description-Content-Type: text/markdown
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Dist: ansys-dpf-core
Requires-Dist: scooby
Requires-Dist: pyvista>=0.24.0 ; extra == "plotting"
Project-URL: Source, https://github.com/ansys/pydpf-post
Provides-Extra: plotting

# PyDPF-Post - Ansys Data PostProcessing Framework
[![PyAnsys](https://img.shields.io/badge/Py-Ansys-ffc107.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC)](https://docs.pyansys.com/)
[![Python](https://img.shields.io/pypi/pyversions/ansys-dpf-post?logo=pypi)](https://pypi.org/project/ansys-dpf-post/)
[![pypi](https://badge.fury.io/py/ansys-dpf-post.svg?logo=python&logoColor=white)](https://pypi.org/project/ansys-dpf-post)
[![MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/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](https://github.com/ansys/pydpf-core).
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](https://post.docs.pyansys.com),
For detailed how-to information, see the [Examples](https://post.docs.pyansys.com/version/stable/examples/index.html)
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:

```pycon
>>> from ansys.dpf import post
>>> from ansys.dpf.post import examples
>>> simulation = post.load_simulation(examples.download_crankshaft())
>>> displacement = simulation.displacement()
>>> print(displacement)
```
```pycon
             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
      ...        ...         ...
```
```pycon
>>> displacement.plot()
```
![Example Displacement plot Crankshaft](https://github.com/ansys/pydpf-post/raw/master/docs/source/images/crankshaft_disp.png)
```pycon
>>> stress_eqv = simulation.stress_eqv_von_mises_nodal()
>>> stress_eqv.plot()
```
![Example Stress plot Crankshaft](https://github.com/ansys/pydpf-post/raw/master/docs/source/images/crankshaft_stress.png)

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

```pycon
>>> 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](https://github.com/ansys/pydpf-post/raw/master/docs/source/images/crankshaft_stress.png)

## License

``PyDPF-Post`` is licensed under the MIT license. For more information, see the
[LICENSE](https://github.com/ansys/pydpf-post/raw/master/LICENSE).

