DPF (Data Processing Framework) provides numerical simulation engineers with a toolbox for accessing and transforming simulation data. DPF can access data from solver result files as well as several neutral formats, such as CSV, HDF5, and VTK. Various operators provide for the manipulation and transformation of the data.
DPF is a workflow-based framework that allows simple and complex evaluations by chaining operators. The data in DPF is defined based on physics-agnostic mathematical quantities described in self-sufficient entities called fields. This allows DPF to be a modular and easy-to-use tool with a large range of capabilities. It is designed to handle large amounts of data.
The module ansys.dpf.core provides a Python interface to the powerful DPF framework, enabling rapid postprocessing of a variety of Ansys file formats and physics solutions without ever leaving the Python environment.
Opening a result file generated from MAPDL (or another ANSYS solver) and extracting results from it is easy:
from ansys.dpf.core import Model from ansys.dpf.core import examples model = Model(examples.simple_bar) print(model)
DPF Model ------------------------------ Static analysis Unit system: Metric (m, kg, N, s, V, A) Physics Type: Mecanic Available results: - displacement: Nodal Displacement - element_nodal_forces: ElementalNodal Element nodal Forces - elemental_volume: Elemental Volume - stiffness_matrix_energy: Elemental Energy-stiffness matrix - artificial_hourglass_energy: Elemental Hourglass Energy - thermal_dissipation_energy: Elemental thermal dissipation energy - kinetic_energy: Elemental Kinetic Energy - co_energy: Elemental co-energy - incremental_energy: Elemental incremental energy - structural_temperature: ElementalNodal Temperature ------------------------------ DPF Meshed Region: 3751 nodes 3000 elements Unit: m With solid (3D) elements ------------------------------ DPF Time/Freq Support: Number of sets: 1 Cumulative Time (s) LoadStep Substep 1 1.000000 1 1
disp = model.results.displacement().X() model.metadata.meshed_region.plot(disp.outputs.fields_container())
See the Examples for detailed examples.
DPF is a modern framework based on new hardware architectures. Thanks to continued development, new capabilities are frequently added.
DPF is physics-agnostic, which means that its use is not limited to a particular field, physics solution, or file format.
Extensibility and Customization
DPF is developed around two core entities:
Data represented as a
operatorto act upon this data
Each DPF capability is developed through operators that allow for componentization of the framework. Because DPF is plugin-based, new features or formats can be easily added.