Getting started
Last update: 10.07.2023
Getting started
The Data Processing Framework (DPF) provides numerical simulation users and engineers with a toolbox for accessing and transforming simulation data. DPF can access data from Ansys solver result (for example, RST) files as well as from several neutral file formats, including CSV, HDF5, and VTK. This workflow-based framework allows you to perform complex preprocessing and postprocessing operations on large amounts of simulation data.
Integrate DPF in a project
To use DPF in a C++ project, you must have access to the following files of the AWP_ROOT232/dpf/include folder (AWP_ROOT232 being an environment variable defining the root of the Ansys Inc or DPF Server product).
The following lines must be added on top of the C++ file to add DPF capabilities in:
Important: You must append the AWP_ROOT232/aisol/bin/winx64 folder path to PATH variable on Windows, or to append the AWP_ROOT232/aisol/dll/linx64 folder path to LD_LIBRARY_PATH variable on Linux.
To learn more about integrating DPF capabilities into an already existing project, refer to the Using DPF capabilities in an existing project section.
Instantiate a DataSources
DataSources provides information regarding the files in which analysis results can be found. To instantiate a DataSources from RST file path, use the following code, for example in the "main" method:
This is an hypothetical file path. Some RST files examples can be found under dpf/testfiles folder of the Ansys Inc product.
The "dataSources" instance is used in the next sections.
Read a displacement field with DPF
To read a displacement result field, use the following code, for example in the "main" method:
Read a mesh with DPF
To read a mesh, use the following code, for example in the "main" method:
Display displacement result
To display the resultsField values previsouly computed on the computed meshedRegion, use the following code:
This uses the VTU format. It can be displayed using Paraview.
Display using Paraview: