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.

Install DPF Server#

  1. Download the ansys_dpf_server_win_v2023.2.pre0.zip or ansys_dpf_server_lin_v2023.2.pre0.zip file as appropriate.

  2. Unzip the package.

  3. Change to the root folder (ansys_dpf_server_win_v2023.2.pre0) of the unzipped package.

  4. 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.

  1. Along with the ansys_dpf_server_lin_v2023.2.pre0.zip file mentioned earlier in Install DPF Server, download the Dockerfile file.

  2. Copy both the ZIP file and Dockerfile file in a folder and navigate into that folder.

  3. To build the DPF Docker container, run the following command:

docker build . -t dpf-core:v2023_2_pre0 --build-arg DPF_VERSION=232 --build-arg DPF_SERVER_FILE=ansys_dpf_server_lin_v2023.2.pre0.zip
  1. 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:v2023_2_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:

  • Entry: Loads the minimum number of plugins for basic use. This context, which is the default, checks if at least one increment exists from the Ansys licensing increments list, which follows. This increment won’t be blocked.

  • Premium: Loads the Entry and the Premium capabilities that require a license checkout. This context blocks an increment from the Ansys licensing increments list, which follows.

To update the context, apply a new server context:

dpf.apply_server_context(dpf.AvailableServerContexts.premium)

The following Ansys licensing increments provide rights to use DPF Server:

  • preppost available in the Ansys Mechanical Enterprise PrepPost product

  • meba available in the ANSYS Mechanical Enterprise Solver product

  • mech_2 available in the ANSYS Mechanical Premium product

  • mech_1 available in the ANSYS Mechanical Pro product

  • ansys available in the ANSYS Mechanical Enterprise product

  • dynapp available in the ANSYS LS-DYNA PrepPost product

  • vmotion available in the Ansys Motion product

  • acpreppost available in the Ansys Mechanical Enterprise product

  • acdi_adprepost available in the Ansys AUTODYN and Ansys AUTODYN PrepPost products

  • cfd_preppost available in the Ansys CFD Enterprise product

  • cfd_preppost_pro available in the Ansys CFD Enterprise product

  • vmotion_post available in the Ansys Motion Post product

  • vmotion_pre available in the Ansys Motion Pre product

  • advanced_meshing available in the Ansys CFD Enterprise product

  • fluent_meshing_pro available in the Ansys CFD Enterprise product

  • fluent_setup_post available in the Ansys CFD Enterprise product

  • fluent_setup_post_pro available in the Ansys CFD Enterprise product

  • acfx_pre available in the Ansys CFD Enterprise product

  • cfd_base available in the Ansys CFD Enterprise product

  • cfd_solve_level1 available in the Ansys CFD Enterprise product

  • cfd_solve_level2 available in the Ansys CFD Enterprise product

  • cfd_solve_level3 available in the Ansys CFD Enterprise product

  • fluent_meshing available in the Ansys CFD Enterprise product

Each increment may be available in other products. On the Ansys Customer Portal, the Licensing section provides product/increment mapping.