|
|
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.
Usage
| DEFINE_PB_COALESCENCE_RATE(name, cell, thread, d_1, d_2) |
| Argument Type | Description |
| char name | UDF name |
| cell_t cell | Cell index |
| Thread *thread | Pointer to the secondary phase thread |
| real d_1, d_2 | Diameters of the two colliding particles |
| Function returns | |
| real |
There are five arguments to DEFINE_PB_COALESCENCE_RATE: name, cell, thread, d_1, 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.
Example
Included below is a example UDF for a Brownian aggregation kernel. In this example, the aggregation rate is defined as
where
m
/s.
/************************************************************************
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,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;
}
|