CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Particle tracking help (

ali hemmati November 26, 2011 05:58

Particle tracking help

I am working on a project in which particle tracking is needed. I have a UDS that stores body forces, so the force is spacial. The problem is how to adjust body force on each particle in space in the code.

I used below code:

DEFINE_DPM_BODY_FORCE(body_force,p,i)        // returns ACCELERATION

real bforce;
real Fx, Fy;

cell_t c;
Thread *t;

Domain *domain;
domain = Get_Domain(1);

        if (P_CELL(p) == c)
          {Fx = C_UDSI(c,t,0); Fy = C_UDSI(c,t,1); break;}

if (i==0)                          // x direction
        bforce = (1.0/P_MASS(p)) * ( Fx );
else if (i==1)                  // y direction
        bforce = (1.0/P_MASS(p)) * ( Fy );

return bforce;

in which "p" has "Tracked_Particle *" type. The code does not recognize P_CELL(p). I think that P_CELL(p) is available if "p" is a "Particle *" not "Tracked_Particle *".

Is there any way to obtain value of UDS at the particle position?

ali hemmati November 29, 2011 12:04

Does anyone know about particle tracking macros?

All times are GMT -4. The time now is 07:01.