CAPE Forum

Ansys => Fluent => Topic started by: pico on April 25, 2012, 10:15:30 AM

Title: Modify drag coefficient using Fluent UDF
Post by: pico on April 25, 2012, 10:15:30 AM
I want to modify the drag force on the particle tracked using Lagrangian approach based on the concentration of particles in the cell volume. To get the cell information I need to know which cell the particle is in. I can not figure out how to do this in the DEFINE_DPM_DRAG

Can anyone help me please!
Title: Re: Modify drag coefficient using Fluent UDF
Post by: william on April 25, 2012, 10:20:03 AM
You can get the cell pointer and thread pointer using the following inside DEFINE_DPM_DRAG:

cell_t c = RP_CELL(&(p->cCell));
Thread *t = RP_THREAD(&(p->cCell));

Once you know the thread and cell containing the particle you can calculate the cell DPM concentration using:

C_DPMS_CONCENTRATION(c,t);