|
1 | | -# DPF-Post |
2 | | -ANSYS Data Processing Framework: post processing package. |
| 1 | +# DPF-Post - Ansys Data Post-Processing Framework |
3 | 2 |
|
4 | | -## Disclaimer |
| 3 | +[](https://badge.fury.io/py/ansys-dpf-post) |
5 | 4 |
|
6 | | -This API is currently a work in progress - things will break and change! |
| 5 | +[](https://dev.azure.com/pyansys/pyansys/_build/latest?definitionId=6&branchName=master) |
7 | 6 |
|
| 7 | +The Data Processing Framework (DPF) is designed to provide numerical |
| 8 | +simulation users/engineers with a toolbox for accessing and |
| 9 | +transforming simulation data. DPF can access data from solver result |
| 10 | +files as well as several neutral formats (csv, hdf5, vtk, |
| 11 | +etc.). Various operators are available allowing the manipulation and |
| 12 | +the transformation of this data. |
8 | 13 |
|
9 | | -## Get Started |
| 14 | +The Python `ansys.dpf.post` package provides an simplified Python |
| 15 | +interface to DPF, thus enabling rapid post-processing, without ever |
| 16 | +leaving a Python environment. |
10 | 17 |
|
11 | | -Clone or copy this directory and then install using: |
| 18 | +This module leverages the DPF-Core project's ``ansys.dpf.core`` |
| 19 | +package and can be found by visiting [DPF-Core GitHub](https://github.com/pyansys/DPF-Core). Use ``ansys.dpf.core`` |
| 20 | +for building more advanced and customized workflows using Ansys's DPF. |
| 21 | + |
| 22 | +Visit the [DPF-Post Documentation](https://postdocs.pyansys.com) for a |
| 23 | +detailed description of the package, or see the [Examples |
| 24 | +Gallery](https://postdocs.pyansys.com/examples/index.html) for more |
| 25 | +detailed examples. |
| 26 | + |
| 27 | + |
| 28 | +### Installation |
| 29 | + |
| 30 | +Install this repository with: |
12 | 31 |
|
13 | 32 | ``` |
| 33 | +pip install ansys-dpf-post |
| 34 | +``` |
| 35 | + |
| 36 | +You can also clone and install this repository with: |
| 37 | + |
| 38 | +``` |
| 39 | +git clone https://github.com/pyansys/DPF-Post |
| 40 | +cd DPF-Post |
14 | 41 | pip install . --user |
15 | 42 | ``` |
16 | 43 |
|
17 | | -See the example scripts in the examples folder for some basic example. More will be added later. |
| 44 | +### Running DPF-Post |
| 45 | +Provided you have ANSYS 2021R1 installed, a DPF server will start |
| 46 | +automatically once you start using DPF-Post. Should you wish to use |
| 47 | +DPF-Post without 2020R1, see the [DPF Docker](https://dpfdocs.pyansys.com/getting_started/docker.html) documentation. |
| 48 | + |
| 49 | +Opening and plotting a result file generated from Ansys workbench or |
| 50 | +MAPDL is as easy as: |
| 51 | + |
| 52 | +```python |
| 53 | +>>> from ansys.dpf import post |
| 54 | +>>> from ansys.dpf.post import examples |
| 55 | +>>> solution = post.load_solution(examples.multishells_rst) |
| 56 | +>>> stress = solution.stress() |
| 57 | +>>> stress.xx.plot_contour(show_edges=False) |
| 58 | +``` |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +Or extract the raw data as a `numpy` array with: |
| 64 | + |
| 65 | +```python |
| 66 | +>>> stress.xx.get_data_at_field(0) |
| 67 | +array([-3.37871094e+10, -4.42471752e+10, -4.13249463e+10, ..., |
| 68 | + 3.66408342e+10, 1.40736914e+11, 1.38633557e+11]) |
| 69 | +``` |
| 70 | + |
| 71 | +### Key Features |
| 72 | + |
| 73 | + |
| 74 | +**Computational Efficiency** |
| 75 | + |
| 76 | +The DPF-Post module is based on DPF Framework that been developed with |
| 77 | +a data framework that localizes the loading and post-processing within |
| 78 | +the DPF server, enabling rapid post-processing workflows as this is |
| 79 | +written in C and FORTRAN. At the same time, the DPF-Post Python |
| 80 | +module presents the result in Pythonic manner, allowing for the rapid |
| 81 | +development of simple or complex post-processing scripts. |
| 82 | + |
| 83 | + |
| 84 | +**Easy to use** |
| 85 | + |
| 86 | +The API of DPF-Post module has been developed in order to make easy |
| 87 | +post-processing steps easier by automating the use of DPF's chained |
| 88 | +operators. This allows for fast post-processing of potentially |
| 89 | +multi-gigabyte models in a short script. DPF-Post also details the |
| 90 | +usage of the operators used when computing the results so you can also |
| 91 | +build your own custom, low level scripts using the |
| 92 | +[DPF-Core](https://github.com/pyansys/DPF-Core) module. |
| 93 | + |
| 94 | + |
| 95 | +### License |
| 96 | + |
| 97 | +``DPF-Post`` is licensed under the MIT license. Please see the [LICENSE](https://github.com/pyansys/dpf-post/raw/master/LICENSE) for more details. |
0 commit comments