You can use the DEFINE_PB_COALESCENCE_RATE macro if you want to define your own particle aggregation kernel.
The function is executed at the beginning of every time step.
DEFINE_PB_COALESCENCE_RATE(name, cell, thread, d_1,
thread_2, d_2)
| Argument Type | Description |
|---|---|
char name
| UDF name |
cell_t cell
| Cell index |
Thread *thread
| Pointer to the secondary phase thread associated with d_1 |
Thread
*thread_2 | Pointer to the secondary phase thread associated with d_2 |
real d_1,
d_2 | Diameters of the two colliding particles |
| Function returns | |
real
|
There are six arguments to DEFINE_PB_COALESCENCE_RATE: name, cell, thread, d_1, thread_2, and d_2. You will supply name, the name of the UDF. cell, thread, d_1, and d_2 are variables that are passed by the ANSYS Fluent solver
to your UDF. Your UDF will need to return the real value of the aggregation rate.
Note:
thread and thread_2 are the same for the Discrete, QMOM and SMM models. They may be
the same or different depending on whether d_1 and d_2 belong to the same phase or different
phases for the Inhomogeneous model.
Included below is an example UDF for a Brownian aggregation kernel. In this example, the aggregation rate is defined as
where
.
/************************************************************************
UDF that computes the particle aggregation rate
*************************************************************************/
#include "udf.h"
#include "sg_pb.h"
#include "sg_mphase.h"
DEFINE_PB_COALESCENCE_RATE(aggregation_kernel,cell,thread,d_1,thread_2,d_2)
{
real agg_kernel;
real beta_0 = 1.0e-17 /* aggregation rate constant */
agg_kernel = beta_0*pow((d_1+d_2),2.0)/(d_1*d_2);
return agg_kernel;
}