Skip to content

Commit 6bd968c

Browse files
cbellot000PProfizi
andcommitted
Update doc home page (#311)
* Update doc home page * typo * read images * vale fix * Fix homepage link * Show legacy examples --------- Co-authored-by: paul.profizi <[email protected]>
1 parent ccf38c4 commit 6bd968c

21 files changed

+68
-43
lines changed

docs/source/index.rst

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,79 @@
22
PyDPF-Post
33
==========
44

5-
The Data Processing Framework (DPF) provides numerical simulation
6-
users and engineers with a toolbox for accessing and transforming simulation
7-
data. With DPF, you can perform complex preprocessing or postprocessing of
8-
large amounts of simulation data within a simulation workflow.
5+
The Data Processing Framework (DPF) is designed to provide numerical
6+
simulation users/engineers with a toolbox for accessing and
7+
transforming simulation data.
98

10-
DPF is an independent, physics-agnostic tool that you can plug into many
11-
apps for both data input and data output, including visualization and
12-
result plots. It can access data from solver result files and other neutral
13-
formats, such as CSV, HDF5, and VTK files.
9+
The Python `ansys-dpf-post` package provides a high level, physics oriented API for postprocessing.
10+
Loading a simulation (defined by its result files) allows you to extract simulation metadata as well
11+
as results and apply postprocessing operations on it.
1412

15-
Using the many DPF operators that are available, you can manipulate and
16-
transform this data. You can also chain operators together to create simple
17-
or complex data-processing workflows that you can reuse for repeated or
18-
future evaluations.
19-
20-
The data in DPF is defined based on physics-agnostic mathematical quantities
21-
described in self-sufficient entities called *fields*. This allows DPF to be
22-
a modular and easy-to-use tool with a large range of capabilities.
23-
24-
.. image:: images/dpf-flow.png
25-
:width: 670
26-
:alt: DPF flow
27-
28-
The ``ansys.dpf.post`` package leverages the ``ansys.dpf.core`` package, which
29-
is available at `PyDPF-Core GitHub <https://github.com/pyansys/DPF-Core>`_. With
30-
PyDPF-Core, you can build more advanced and customized DPF workflows.
13+
This module leverages the PyDPF-Core project's ``ansys-dpf-core`` package and can
14+
be found by visiting [PyDPF-Core GitHub](https://github.com/pyansys/pydpf-core).
15+
Use ``ansys-dpf-core`` for building more advanced and customized workflows using Ansys DPF.
3116

3217

3318
Brief demo
3419
~~~~~~~~~~
35-
Here is how you open and plot a result file generated by Ansys Workbench or
36-
MAPDL:
20+
21+
Provided you have ANSYS 2023 R1 installed, a DPF server will start
22+
automatically once you start using PyDPF-Post.
23+
Loading a simulation for a MAPDL result file to extract and post-process results:
3724

3825
.. code:: python
3926
4027
>>> from ansys.dpf import post
4128
>>> from ansys.dpf.post import examples
42-
>>> solution = post.load_solution(examples.multishells_rst)
43-
>>> stress = solution.stress()
44-
>>> stress.xx.plot_contour(show_edges=False)
29+
>>> simulation = post.load_simulation(examples.download_crankshaft())
30+
>>> displacement = simulation.displacement()
31+
>>> print(displacement)
32+
33+
34+
.. rst-class:: sphx-glr-script-out
35+
36+
.. code-block:: none
37+
38+
results U
39+
set_id 3
40+
node comp
41+
4872 X -3.41e-05
42+
Y 1.54e-03
43+
Z -2.64e-06
44+
9005 X -5.56e-05
45+
Y 1.44e-03
46+
Z 5.31e-06
47+
...
48+
49+
.. code:: python
4550
51+
>>> displacement.plot()
4652
47-
.. figure:: ./images/main_example.png
53+
54+
.. figure:: ./images/crankshaft_disp.png
55+
:width: 300pt
56+
57+
.. code:: python
58+
59+
>>> stress_eqv = simulation.stress_eqv_von_mises_nodal()
60+
>>> stress_eqv.plot()
61+
62+
.. figure:: ./images/crankshaft_stress.png
4863
:width: 300pt
4964

50-
Basic stress contour plot
65+
To run PyDPF-Post with Ansys versions starting from 2021 R1 to 2022 R2, use the following legacy PyDPF-Post
66+
tools:
5167

52-
Here is how you extract the raw data as a :class:`numpy.ndarray` array:
5368
.. code:: python
5469
55-
>>> stress.xx.get_data_at_field(0)
56-
array([-3.37871094e+10, -4.42471752e+10, -4.13249463e+10, ...,
57-
3.66408342e+10, 1.40736914e+11, 1.38633557e+11])
70+
>>> from ansys.dpf import post
71+
>>> from ansys.dpf.post import examples
72+
>>> solution = post.load_solution(examples.download_crankshaft())
73+
>>> stress = solution.stress()
74+
>>> stress.eqv.plot_contour(show_edges=False)
75+
76+
.. figure:: ./images/crankshaft_stress.png
77+
:width: 300pt
5878

5979

6080
For comprehensive demos, see :ref:`gallery`.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. _ref_different_analysis:
22

3-
DPF-Post analysis types
4-
~~~~~~~~~~~~~~~~~~~~~~~
5-
These examples show how to post process different simulation types using pydpf-post.
3+
PyDPF-Post analysis types
4+
~~~~~~~~~~~~~~~~~~~~~~~~~
5+
These examples show how to post-process different simulation types using PyDPF-Post.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. _ref_detailed_examples:
2+
3+
PyDPF-Post feature examples
4+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
5+
These examples show how you use PyDPF-Post features.

examples/02-Detailed-Examples/README.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)