2.5.11.  DEFINE_DPM_SOURCE

2.5.11.1. Description

You can use DEFINE_DPM_SOURCE to specify particle source terms. The function allows access to the accumulated source terms for a particle in a given cell before they are added to the mass, momentum, and energy exchange terms for coupled DPM calculations.

When a DEFINE_DPM_SOURCE UDF is activated, then the number of species that can be referenced and interact with the particles via the UDF is limited to those with a species index less than the maximum UDF species number, defined using the TUI command define/models/dpm/options/maximum-udf-species. The default number for maximum-udf-species is 50.

2.5.11.2. Usage

DEFINE_DPM_SOURCE (name, c, t, S, strength, tp)

Argument Type

Description

symbol name

UDF name.

cell_t c

Index that identifies the cell that the particle is currently in.

Thread *t

Pointer to the thread the particle is currently in.

dpms_t *S

Pointer to the source structure dpms_t, which contains the source terms for the cell.

real strength

Particle number flow rate in particles/second (divided by the number of tries if stochastic tracking is used).

Tracked_Particle *tp

Pointer to the Tracked_Particle data structure which contains data related to the particle being tracked.

Function returns

void

There are six arguments to DEFINE_DPM_SOURCE: name, c, t, S, strength, and tp. You supply name, the name of the UDF. c, t, S, strength, and tp are variables that are passed by the ANSYS Fluent solver to your UDF. The modified source terms, after they have been computed by the function, will be stored in S.


Important:  Pointer tp can be used as an argument to the macros defined in DPM Macros to obtain information about particle properties (for example, injection properties).


2.5.11.3. Example

See Example for an example of DEFINE_DPM_SOURCE usage.

2.5.11.4. Hooking a DPM Source Term UDF to ANSYS Fluent

After the UDF that you have defined using DEFINE_DPM_SOURCE is interpreted (Interpreting UDFs) or compiled (Compiling UDFs), the name of the argument that you supplied as the first DEFINE macro argument will become visible in the Discrete Phase Model dialog box in ANSYS Fluent. See Hooking DEFINE_DPM_SOURCE UDFs for details on how to hook your DEFINE_DPM_SOURCE UDF to ANSYS Fluent.


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