1- # DPF - ANSYS Data Processing Framework
1+ # DPF - Ansys Data Processing Framework
2+
3+ The Data Processing Framework (DPF) is designed to provide numerical
4+ simulation users/engineers with a toolbox for accessing and
5+ transforming simulation data. DPF can access data from solver result
6+ files as well as several neutral formats (csv, hdf5, vtk,
7+ etc.). Various operators are available allowing the manipulation and
8+ the transformation of this data.
9+
10+ DPF is a workflow-based framework which allows simple and/or complex
11+ evaluations by chaining operators. The data in DPF is defined based on
12+ physics agnostic mathematical quantities described in a
13+ self-sufficient entity called field. This allows DPF to be a modular
14+ and easy to use tool with a large range of capabilities. It's a
15+ product designed to handle large amount of data.
16+
17+ The Python `` ansys.dpf.core `` module provides a Python interface to
18+ the powerful DPF framework enabling rapid post-processing of a variety
19+ of Ansys file formats and physics solutions without ever leaving a
20+ Python environment.
221
322
423## Installation
524
6- Clone and install this repository with:
25+ Install this repository with:
726
827```
9- git clone https://github.com/pyansys/DPF-Core
10- cd DPF-Core
11- pip install . --user
28+ pip install ansys-dpf-core
1229```
1330
14- Install any missing libraries from Artifactory with:
31+ You can also clone and install this repository with:
1532
1633```
17- pip install --extra-index-url=http://canartifactory.ansys.com:8080/artifactory/api/pypi/pypi/simple --trusted-host canartifactory.ansys.com ansys-grpc-dpf
34+ git clone https://github.com/pyansys/DPF-Core
35+ cd DPF-Core
36+ pip install . --user
1837```
1938
20- This step will be eliminated once DPF is live on PyPi.
21-
2239
2340## Running DPF
2441
42+ ### Brief Demo
2543Provided you have ANSYS 2021R1 installed, a DPF server will start
26- automatically once you start using DPF:
44+ automatically once you start using DPF.
2745
46+ Opening a result file generated from Ansys workbench or MAPDL is as easy as:
2847
29- ``` py
30- from ansys.dpf import core
48+ ```
49+ >>> from ansys.dpf.core import Model
50+ >>> model = Model('file.rst')
51+ >>> print(model)
52+ DPF Model
53+ ------------------------------
54+ Static analysis
55+ Unit system: Metric (m, kg, N, s, V, A)
56+ Physics Type: Mecanic
57+ Available results:
58+ - displacement
59+ - element_nodal_forces
60+ - volume
61+ - energy_stiffness_matrix
62+ - hourglass_energy
63+ - thermal_dissipation_energy
64+ - kinetic_energy
65+ - co_energy
66+ - incremental_energy
67+ - temperature
68+ ```
69+
70+ Open up an result with:
3171
32- norm = core.Operator(' norm_fc' )
72+ ``` py
73+ >> > model.displacement
74+ ```
3375
34- # or open up a model
35- model = core.Model(' file.rst' )
76+ Then start linking operators with:
3677
78+ ``` py
79+ >> > norm = core.Operator(' norm_fc' )
3780```
3881
39- The ` ansys.dpf.core ` module takes care of starting your local server
40- for you so you don't have to. If you need to connect to a remote DPF
41- instance, use the `` connect_to_server `` function:
82+ ### Starting the Service
83+
84+ The ` ansys.dpf.core ` automatically starts the DPF service in the
85+ background and connects to it. If you need to connect to an existing
86+ remote DPF instance, use the `` connect_to_server `` function:
4287
4388``` py
4489from ansys.dpf import core
@@ -48,26 +93,3 @@ connect_to_server('10.0.0.22, 50054)
4893Once connected, this connection will remain for the duration of the
4994module until you exit python or connect to a different server.
5095
51-
52- # # Unit Testing
53-
54- Unit tests can be run by first installing the testing requirements with `pip install - r requirements_test.txt` and then running pytest with :
55-
56- ```
57- pytest
58- ```
59-
60- If you have ANSYS v2021R1 installed locally, the unit tests will
61- automatically start up the DPF server and run the tests. If you need
62- to disable this and have the unit tests run against a remote server,
63- setup the following environment variables:
64-
65- ```
66- set DPF_START_SERVER = False
67- set DPF_IP = < IP of Remote Computer>
68- set DPF_PORT = < Port of Remote DPF Server>
69- ```
70-
71-
72- # # Examples
73- See the example scripts in the examples folder for some basic examples.
0 commit comments