Getting started with DPF Mechanical
Last update: 18.06.2026This section will help you get up and running with DPF Mechanical in Ansys Mechanical.
Prerequisites
Before you begin, ensure you have:
- Ansys Mechanical 2022 R2 or later installed
- Access to the Mechanical scripting window or Python Result object
- Basic understanding of Python programming
- Familiarity with Ansys Mechanical and simulation concepts
Topics
Installation
Learn how DPF is integrated into Ansys Mechanical and how to access it.
Hello DPF
Your first DPF script in the Mechanical scripting window - load results and extract data.
Environment setup
Configure your Mechanical environment and understand how to use DPF in different contexts.
Quick start
Access DPF in Ansys Mechanical through the scripting window:
# DPF is already available in Mechanical scripting environment
import Ans.DataProcessing as dpf
# Access current model's results
model = ExtAPI.DataModel.Project.Model
analysis = model.Analyses[0]
solution = analysis.Solution
# Get result file path
result_path = solution.ResultFileName
# Create DPF data sources
data_sources = dpf.DataSources()
data_sources.SetResultFilePath(result_path)
# Create DPF model
dpf_model = dpf.Model(data_sources)
# Access results
print("Number of time steps: {0}".format(dpf_model.TimeFreqSupport.TimeFrequencies.Count))
Next steps
Once you've completed the getting started guide, move on to:
- User Guide for in-depth concepts
- Examples for practical code samples
- API Reference for complete documentation