7.3.1. Parallelization of Discrete Phase Model (DPM) UDFs

The DPM model can be used for the following parallel options:

When you are using a DPM-specific UDF (see Discrete Phase Model (DPM) DEFINE Macros), it will be executed on the machine that is in charge of the considered particle, based on the above-mentioned parallel options. Since all fluid variables needed for DPM models are held in data structures of the tracked particles, no special care is needed when using DPM UDFs in parallel ANSYS Fluent with the following two exceptions.

Firstly, when you are writing to a sampling output file using the DEFINE_DPM_OUTPUT macro, you are not allowed to use the C function fprintf. Instead new functions par_fprintf and par_fprintf_head are provided to enable the parallel file writing. Each compute node writes its information to a separate temporary file. These individual files are put together and sorted into the final output file by ANSYS Fluent. The new functions can be used with the same parameter lists as the C function fprintf with the stipulation that the sorting of the files by ANSYS Fluent requires the specification of an extended parameter list. For details on the use of these macros refer to The par_fprintf_head and par_fprintf Macros and DEFINE_DPM_OUTPUT .

The second exception arises when storing information about particles. In the case of parallel simulations, you must use particle-specific user variables as they can be accessed with the macros TP_USER_REAL(tp, i) (tp being of the type Tracked_Particle *) and PP_USER_REAL(p, i) (p being of the type Particle *). Only this information is carried with the particles across partition boundaries, while other local or global variables are not carried across partition boundaries.

Note that if you need to access other data, such as cell values, then for the parallel options except Shared Memory you will have access to all fluid and solver variables. When you choose the Shared Memory option, however, you will have access only to the variables defined in the macros SV_DPM_LIST and SV_DPMS_LIST. These macros are defined in the file dpm.h.


Release 18.2 - © ANSYS, Inc. All rights reserved.