Author Topic: Modify drag coefficient using Fluent UDF  (Read 5384 times)

Offline pico

  • Newbie
  • *
  • Posts: 19
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Modify drag coefficient using Fluent UDF
« on: April 25, 2012, 10:15:30 AM »
Advertisement
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!

Offline william

  • Full Member
  • ***
  • Posts: 159
  • Reputation: +15/-0
  • Know it, share it.
    • View Profile
Re: Modify drag coefficient using Fluent UDF
« Reply #1 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);