1
- # PyDPF-Post - Ansys Data PostProcessing Framework
1
+ # PyDPF-Post
2
2
[ ![ 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/ )
3
3
[ ![ Python] ( https://img.shields.io/pypi/pyversions/ansys-dpf-post?logo=pypi )] ( https://pypi.org/project/ansys-dpf-post/ )
4
4
[ ![ pypi] ( https://badge.fury.io/py/ansys-dpf-post.svg?logo=python&logoColor=white )] ( https://pypi.org/project/ansys-dpf-post )
5
5
[ ![ MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
6
6
7
- Ansys Data Processing Framework (DPF) provides numerical simulation
8
- users and engineers with a toolbox for accessing and transforming simulation
9
- data. With DPF, you can perform complex preprocessing or postprocessing of
10
- large amounts of simulation data within a simulation workflow.
7
+ PyDPF-Post is part of the Ansys Data Processing Framework (DPF), which provides reusable operators
8
+ that let you access and transform simulation data coming from different Ansys and third-party
9
+ result files.
11
10
12
- The Python ` ansys-dpf-post ` package provides a high-level, physics-oriented
13
- API for postprocessing. Loading a simulation (defined by its results files)
14
- allows you to extract simulation metadata and results and then apply
15
- postprocessing operations on them.
11
+ PyDPF-Post leverages [ PyDPF-Core] ( https://github.com/ansys/pydpf-core ) , a package for building more
12
+ advanced and customized workflows using Ansys DPF. After loading a simulation's result file in PyDPF-Post,
13
+ you can extract simulation metadata and results and then apply postprocessing operations on them.
16
14
17
- The latest version of DPF supports Ansys solver results files for:
15
+ PyDPF-Core is physics-agnostic and operator-oriented. It is a direct exposure of the DPF features and
16
+ objects with a few helpers. It is not restricted to postprocessing.
18
17
19
- - Mechanical APDL (` .rst ` , ` .mode ` , ` .rfrq ` , ` .rdsp ` )
20
- - LS-DYNA (` .d3plot ` , ` .binout ` )
21
- - Fluent (` .cas/dat.h5 ` , ` .flprj ` )
22
- - CFX (` .cas/dat.cff ` , ` .flprj ` , ` .res ` )
23
-
24
- For more information on file support, see the [ main page] ( https://dpf.docs.pyansys.com/version/stable/index.html )
25
- in the PyDPF-Core documentation.
26
-
27
- PyDPF-Post leverages the PyDPF-Core project's `` ansys-dpf-core `` package, which is
28
- available at [ PyDPF-Core GitHub] ( https://github.com/ansys/pydpf-core ) .
29
- Use the `` ansys-dpf-core `` package for building more advanced and customized workflows
30
- using Ansys DPF.
18
+ PyDPF-Post on the other hand provides a high-level, physics-oriented API for postprocessing. It has a
19
+ more Pythonic and user-friendly API dedicated to postprocessing, with new objects meant to provide a specific
20
+ interface for each type of physics and analysis (such as mechanics static versus transient versus fluids).
21
+ Most importantly, there is no need to manipulate operators or workflows.
31
22
32
23
## Documentation and issues
33
24
34
25
Documentation for the latest stable release of PyPDF-Post is hosted at
35
26
[ PyDPF-Post documentation] ( https://post.docs.pyansys.com/version/stable/ ) .
36
27
37
- In the upper right corner of the documentation's title bar, there is an option for switching from
38
- viewing the documentation for the latest stable release to viewing the documentation for the
39
- development version or previously released versions.
28
+ The PyDPF-Post documentation has five sections:
29
+
30
+ - [ Getting started] ( https://post.docs.pyansys.com/version/stable/getting_started/index.html ) : Learn how to
31
+ install PyDPF-Post in user mode and quickly begin using it.
32
+ - [ User guide] ( https://post.docs.pyansys.com/version/stable/user_guide/index.html ) : Understand key concepts
33
+ for using PyDPF-Post.
34
+ - [ API reference] ( https://post.docs.pyansys.com/version/stable/api/index.html ) : Understand how to use
35
+ Python to interact programmatically with PyDPF-Post.
36
+ - [ Examples] ( https://post.docs.pyansys.com/version/stable/examples/index.html ) : Explore examples
37
+ that show how to use PyDPF-Post to perform nay different types of operations.
38
+ - [ Contribute] ( https://post.docs.pyansys.com/version/stable/contributing.html ) : Learn how to
39
+ contribute to the PyDPF-Post codebase or documentation.
40
+
41
+ In the upper right corner of the documentation's title bar, there is an option
42
+ for switching from viewing the documentation for the latest stable release
43
+ to viewing the documentation for the development version or previously
44
+ released versions.
40
45
41
46
You can also [ view] ( https://cheatsheets.docs.pyansys.com/pydpf-post_cheat_sheet.png ) or
42
47
[ download] ( https://cheatsheets.docs.pyansys.com/pydpf-post_cheat_sheet.pdf ) the
@@ -45,82 +50,8 @@ for using PyDPF-Post.
45
50
46
51
On the [ PyDPF-Post Issues] ( https://github.com/ansys/pydpf-post/issues ) page,
47
52
you can create issues to report bugs and request new features. On the
48
- [ PyDPF-Post Discussions] ( https://github.com/ansys/pydpf-post/discussions ) page or the [ Discussions] ( https://discuss.ansys.com/ )
49
- page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.
53
+ [ PyDPF-Post Discussions] ( https://github.com/ansys/pydpf-post/discussions ) page or
54
+ the [ Discussions] ( https://discuss.ansys.com/ ) page on the Ansys Developer portal,
55
+ you can post questions, share ideas, and get community feedback.
50
56
51
57
To reach the project support team, email
[ [email protected] ] ( mailto:[email protected] ) .
52
-
53
- ## Installation
54
-
55
- To install this package, run this command:
56
-
57
- ```
58
- pip install ansys-dpf-post
59
- ```
60
-
61
- You can also clone and install this package with these commands:
62
-
63
- ```
64
- git clone https://github.com/ansys/pydpf-post
65
- cd pydpf-post
66
- pip install . --user
67
- ```
68
-
69
- ## Brief demo
70
-
71
- Provided you have Ansys 2023 R1 or later installed, a DPF server automatically starts
72
- once you start using PyDPF-Post.
73
-
74
- To load a simulation for a MAPDL result file to extract and
75
- postprocess results, use this code:
76
-
77
- ``` pycon
78
- >>> from ansys.dpf import post
79
- >>> from ansys.dpf.post import examples
80
- >>> simulation = post.load_simulation(examples.download_crankshaft())
81
- >>> displacement = simulation.displacement()
82
- >>> print (displacement)
83
- ```
84
- ``` pycon
85
- results U (m)
86
- set_ids 3
87
- node_ids components
88
- 4872 X -3.4137e-05
89
- Y 1.5417e-03
90
- Z -2.6398e-06
91
- 9005 X -5.5625e-05
92
- Y 1.4448e-03
93
- Z 5.3134e-06
94
- ... ... ...
95
- ```
96
- ``` pycon
97
- >>> displacement.plot()
98
- ```
99
- ![ Example Displacement plot Crankshaft] ( https://github.com/ansys/pydpf-post/raw/master/docs/source/images/crankshaft_disp.png )
100
- ``` pycon
101
- >>> stress_eqv = simulation.stress_eqv_von_mises_nodal()
102
- >>> stress_eqv.plot()
103
- ```
104
- ![ Example Stress plot Crankshaft] ( https://github.com/ansys/pydpf-post/raw/master/docs/source/images/crankshaft_stress.png )
105
-
106
- To run PyDPF-Post with Ansys 2021 R1 through 2022 R2, use this code to
107
- start the legacy PyDPF-Post tools:
108
-
109
- ``` pycon
110
- >>> from ansys.dpf import post
111
- >>> from ansys.dpf.post import examples
112
- >>> solution = post.load_solution(examples.download_crankshaft())
113
- >>> stress = solution.stress()
114
- >>> stress.eqv.plot_contour(show_edges = False )
115
- ```
116
- ![ Example Stress plot Crankshaft] ( https://github.com/ansys/pydpf-post/raw/master/docs/source/images/crankshaft_stress.png )
117
-
118
- ## License and acknowledgements
119
-
120
- PyDPF-Post is licensed under the MIT license. For more information, see the
121
- [ LICENSE] ( https://github.com/ansys/pydpf-post/raw/master/LICENSE ) file.
122
-
123
- PyDPF-Post makes no commercial claim over Ansys whatsoever. This library
124
- extends the functionality of Ansys DPF by adding a Python interface
125
- to DPF without changing the core behavior or license of the original
126
- software.
0 commit comments