You can use the DEFINE_PB_BREAK_UP_RATE_PDF macro if you want to define the breakage PDF using a UDF. The function
is executed at the beginning of every time step.
DEFINE_PB_BREAK_UP_RATE_PDF(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 |
real
d_1 | Parent particle diameter or length |
Thread
*thread_2 | Pointer to the secondary phase thread associated with d_2 |
real
d_2 | Diameter of one of the daughter particles after breakage; the second daughter particle diameter is calculated by conservation of particle volume |
| Function returns | |
real
|
There are six arguments to DEFINE_PB_BREAK_UP_RATE_PDF: name, cell, thread, d_1, thread_2, and d_2. You will supply name, the name of the UDF. cell, thread, d_1, thread_2, and d_2 are variables that are passed
by the ANSYS Fluent solver to your UDF.
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 of a UDF that defines a breakage PDF (see Particle Birth and Death Due to Breakage and Aggregation) that is parabolic, as defined in Equation 2–22.
/************************************************************************
UDF that computes the particle breakage PDF
*************************************************************************/
#include "udf.h"
#include "sg_pb.h"
#include "sg_mphase.h"
DEFINE_PB_BREAK_UP_RATE_PDF(break_up_pdf_par, cell, thread, d_1, thread_2, d_2)
{
real pdf;
real kv = M_PI/6.;
real C = 1.0;
real f_2, f_3, f_4;
real V_prime = kv*pow(d_1,3.);
real V = kv*pow(d_2,3.);
f_2 = 24.*pow(V/V_prime,2.);
f_3 = -24.*(V/V_prime);
f_4 = 6.;
pdf = (C/V_prime) + ((1.-C/2.)/V_prime)*(f_2 + f_3 + f_4);
return 0.5*pdf;
}