Getting started with DPF Server#
What is DPF Server#
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 Server is a package that contains all the necessary files to run the DPF Server, enabling DPF capabilities. It is available on the DPF Pre-Release page of the Ansys Customer Portal. The first version of DPF Server is 6.0 (2023 R2).
The sections on this page describe how to use DPF Server.
For a quick start on DPF Server, see Getting started.
For more information on DPF and its use, see User guide.
Install DPF Server#
Download the
ansys_dpf_server_win_v2024.1.pre0.zip
oransys_dpf_server_lin_v2024.1.pre0.zip
file as appropriate.Unzip the package.
Optional: download any other plugin ZIP file as appropriate and unzip the package. For example, to access the
composites
plugin for Linux, downloadansys_dpf_composites_lin_v2024.1.pre0.zip
and unzip the package in the same location asansys_dpf_server_lin_v2024.1.pre0.zip
.Change to the root folder (
ansys_dpf_server_win_v2024.1.pre0
) of the unzipped package.In a Python environment, run this command:
pip install -e .
Use DPF Server#
DPF Server is protected using the license terms specified in the DPFPreviewLicenseAgreement file, which is available on the DPF Pre-Release page of the Ansys Customer Portal.
Run DPF Server with PyDPF#
PyDPF-Core is a Python client API communicating with a DPF Server, either through the network using gRPC or directly in the same process. PyDPF-Post is a Python module for postprocessing based on PyDPF-Core.
Both PyDPF-Core and PyDPF-Post can be used with DPF Server. Installation instructions for PyDPF-Core are available in the PyDPF-Core Getting started. Installation instructions for PyDPF-Post are available in the PyDPF-Post Getting started.
With PyDPF-Core and PyDPF-Post, the first creation of most DPF entities starts a DPF Server with the current default configuration and context. For example, the following code automatically starts a DPF Server behind the scenes:
from ansys.dpf import core as dpf
data_sources = dpf.DataSources()
With PyDPF-Core, you can also explicitly start a DPF Server using this code:
from ansys.dpf import core as dpf
server = dpf.start_local_server()
To start a DPF Server from outside a Python environment, you can also use the execution script provided with your DPF Server package.
On Windows, start the DPF Server by running the Ans.Dpf.Grpc.bat
file in the unzipped package.
On Linux, start the DPF Server by running the Ans.Dpf.Grpc.sh
file in the unzipped package.
Run DPF Server in a Docker container#
DPF server can be run in a Docker container.
Along with the
ansys_dpf_server_lin_v2024.1.pre0.zip
file mentioned earlier in Install DPF Server, download theDockerfile
file.Optional: download any other plugin ZIP file as appropriate. For example, to access the
composites
plugin for Linux, downloadansys_dpf_composites_lin_v2024.1.pre0.zip
.Copy all the ZIP files and
Dockerfile
file in a folder and navigate into that folder.To build the DPF Docker container, run the following command:
docker build . -t dpf-core:v2024.1.pre0 --build-arg DPF_VERSION=241
To run the DPF Docker container, license it. For more information, see’ DPF Preview License Agreement.
License terms#
DPF Preview License Agreement#
DPF Server is protected using license terms specified in the DPFPreviewLicenseAgreement
file that can be found on the DPF Pre-Release page
of the Ansys Customer Portal. The DPFPreviewLicenseAgreement
file s a text file, which means that you can
open it with a text editor, such as notepad.
To accept the terms of this license agreement, you must set the following environment variable:
ANSYS_DPF_ACCEPT_LA=Y
The ANSYS_DPF_ACCEPT_LA
environment variable confirms your acceptance of the DPF License Agreement.
By passing the value Y
to this environment variable, you are indicating that you have a valid and
existing license for the edition and version of DPF Server that you intend to use.
For DPF Docker container usage only, you can use the following code to set both the ANSYS_DPF_ACCEPT_LA
and ANSYSLMD_LICENSE_FILE
environment variables. For the ANSYSLMD_LICENSE_FILE
environment variable,
ensure that you replace <license_server_to_use>
to point to the Ansys license server.
docker run -e "ANSYS_DPF_ACCEPT_LA=Y" -e ANSYSLMD_LICENSE_FILE=1055@<license_server_to_use> -p 50052:50052 -e DOCKER_SERVER_PORT=50052 --expose=50052 dpf-core:v2024_1_pre0
The next section, Ansys licensing, provides information on the Ansys license mechanism that is used with DPF Server.
Ansys licensing#
DPF Server is protected by an Ansys licensing mechanism.
DPF capabilities are available through the following main contexts:
Premium: This default context allows DPF to perform license checkouts, making licensed DPF operators available.
Entry: This context does not allow DPF to perform any license checkout, meaning that licensed DPF operators fail.
To update the context, apply a new server context:
server.apply_context(dpf.AvailableServerContexts.premium)
The following Ansys licensing increments provide rights to use DPF Server:
preppost
available in theAnsys Mechanical Enterprise PrepPost
productmeba
available in theANSYS Mechanical Enterprise Solver
productmech_2
available in theANSYS Mechanical Premium
productmech_1
available in theANSYS Mechanical Pro
productansys
available in theANSYS Mechanical Enterprise
productdynapp
available in theANSYS LS-DYNA PrepPost
productvmotion
available in theAnsys Motion
productacpreppost
available in theAnsys Mechanical Enterprise
productacdi_adprepost
available in theAnsys AUTODYN
andAnsys AUTODYN PrepPost
productscfd_preppost
available in theAnsys CFD Enterprise
productcfd_preppost_pro
available in theAnsys CFD Enterprise
productvmotion_post
available in theAnsys Motion Post
productvmotion_pre
available in theAnsys Motion Pre
productadvanced_meshing
available in theAnsys CFD Enterprise
productfluent_meshing_pro
available in theAnsys CFD Enterprise
productfluent_setup_post
available in theAnsys CFD Enterprise
productfluent_setup_post_pro
available in theAnsys CFD Enterprise
productacfx_pre
available in theAnsys CFD Enterprise
productcfd_base
available in theAnsys CFD Enterprise
productcfd_solve_level1
available in theAnsys CFD Enterprise
productcfd_solve_level2
available in theAnsys CFD Enterprise
productcfd_solve_level3
available in theAnsys CFD Enterprise
productfluent_meshing
available in theAnsys CFD Enterprise
productavrxp_snd_level1
available in theAnsys Sound Enterprise
productsherlock
available in theAnsys Sherlock
product
Each increment may be available in other products. On the Ansys Customer Portal, the Licensing section provides product/increment mapping.