.. _ref_main_index: ========== PyDPF-Core ========== Ansys Data Processing Framework (DPF) provides numerical simulation users and engineers with a toolbox for accessing and transforming simulation data. With DPF, you can perform complex preprocessing or postprocessing of large amounts of simulation data within a simulation workflow. DPF is an independent, physics-agnostic tool that you can plug into many apps for both data input and data output, including visualization and result plots. The following table shows an exhaustive list of supported apps by DPF and their related formats: .. table:: Truth table for "not" :widths: auto :align: center +--------------------+------------------------+----------------------------------+----------------------------------+ | **Solver** | **File format** | **Server version** | **DPF examples** | +====================+========================+==================================+==================================+ | || .rst, .mode || **1.0** and later | :ref:`ref_basic_example` | | MAPDL || .rfrq, .rdsp || (*Ansys 2021 R1*) | | +--------------------+------------------------+----------------------------------+----------------------------------+ | LS DYNA | .d3plot, .binout || **4.0** and later | :ref:`lsdyna_operators` | | | || (*Ansys 2022 R2*) | | +--------------------+------------------------+----------------------------------+----------------------------------+ | || *CFF restart files* || | :ref:`ref_fluids_model` | | || .cas/dat.h5 || +----------------------------------+ | | || **7.0** and later | :ref:`ref_fluids_mesh` | | Fluent +------------------------+| (*Ansys 2024 R1 pre0*) +----------------------------------+ | || *Project files* | | :ref:`ref_fluids_results` | | || .flprj | | | +--------------------+------------------------+----------------------------------+----------------------------------+ | || *CFF files* || | :ref:`ref_fluids_model` | | || .cas/dat.cff || +----------------------------------+ | | || **7.0** and later | :ref:`ref_fluids_mesh` | | CFX +------------------------+| (*Ansys 2024 R1 pre0*) +----------------------------------+ | || *Project files* | | :ref:`ref_fluids_results` | | || .flprj | | | +--------------------+------------------------+----------------------------------+----------------------------------+ Visualisation is ensured by VTK and leverages `PyVista tools `_. Using the many DPF operators that are available, you can manipulate and transform this data. You can also chain operators together to create simple or complex data-processing workflows that you can reuse for repeated or future evaluations. 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. .. image:: images/drawings/dpf-flow.png :width: 670 :alt: DPF flow The ``ansys.dpf.core`` package provides a Python interface to DPF, enabling rapid postprocessing of a variety of Ansys file formats and physics solutions without ever leaving the Python environment. Brief demo ~~~~~~~~~~ Here is how you open a result file generated by MAPDL (or another ANSYS solver) and extract results: .. code-block:: python from ansys.dpf.core import Model from ansys.dpf.core import examples model = Model(examples.find_simple_bar()) print(model) Here is how you plot displacement results: .. code-block:: python disp = model.results.displacement().X() model.metadata.meshed_region.plot(disp.outputs.fields_container()) For comprehensive examples of how you use PyDPF-Core, see :ref:`gallery`. Key features ~~~~~~~~~~~~ **Computational efficiency** DPF is a modern framework based on new hardware architectures. Thanks to continued development, new capabilities are frequently added. **Generic interface** 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 **field** - An **operator** to 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. Accessing and enriching DPF capabilities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most of the DPF capabilities can be accessed using the operators. For more information, see :ref:`ref_dpf_operators_reference`. DPF also follows a licensing strategy detailed in :ref:`ref_licensing`. The following sections are summaries. For more information, see :ref:`user_guide_waysofusing`. **Accessing DPF Server files** DPF capabilities are accessible when DPF Server files are available. These files can be accessed using the **Ansys installer** and **DPF Server**. - To use the Ansys installer, download the standard Ansys installation using your preferred distribution channel, and install Ansys following the installer instructions. For information on getting a licensed copy of Ansys, visit the `Ansys website `_. - The DPF Server package is independent of the Ansys installer. For more information, see :ref:`ref_dpf_server`. **Accessing capabilities with scripting** - C++ documentation: - On the `Developer Documentation `_ page of the Ansys Developer portal, see **Data Processing Framework (DPF)**. - PyDPF documentation: - `PyDPF-Core documentation `_ - `PyDPF-Post documentation `_ - Mechanical scripting (IronPython): - `Data Processing Framework `_ in the *Scripting in Mechanical Guide*. - `Python Result `_ in the *Mechanical User's Guide*. **Enriching DPF capabilities** - `User guide `_ in the *DPF C++ Client Library* - :ref:`user_guide_custom_operators` in the PyDPF-Core documentation - `How to write a new solver reader as a DPF plugin `_ Documentation and issues ------------------------ Documentation for the latest stable release of PyDPF-Core is hosted at `PyDPF-Core documentation `_. In the upper right corner of the documentation's title bar, there is an option for switching from viewing the documentation for the latest stable release to viewing the documentation for the development version or previously released versions. You can also `view `_ or `download `_ the PyDPF-Core cheat sheet. This one-page reference provides syntax rules and commands for using PyDPF-Core. On the `PyDPF-Core Issues `_ page, you can create issues to report bugs and request new features. On the `PyDPF-Core Discussions `_ page or the `Discussions `_ page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback. To reach the project support team, email `pyansys.core@ansys.com `_. .. toctree:: :maxdepth: 2 :caption: Getting Started :hidden: getting_started/index user_guide/index examples/index api/index operator_reference concepts/index contributing