|
[Sponsors] |
June 24, 2003, 11:50 |
Loop over particles
|
#1 |
Guest
Posts: n/a
|
Does anybody know how to get loop over all the particles entering a cell. The particles are tracked using Discrete phase model in Fluent6.0.
Thank you all for your time. Umesh |
|
June 24, 2003, 18:56 |
Re: Loop over particles
|
#2 |
Guest
Posts: n/a
|
hi
I gave you this macro before for your concentration problem. I coopy this UDf from fluent /************************************************** ********* Example UDF that demonstrates DEFINE_DPM_SPRAY_COLLIDE ************************************************** **********/ #include "udf.h" #include "dpm.h" #include "surf.h" DEFINE_DPM_SPRAY_COLLIDE(udf_man_spray_collide, tp, p) { /* non-physical collision UDF that relaxes the particle */ /* velocity and diameter in a cell to the mean over the */ /* specified time scale t_relax */ const real t_relax = 0.001; /* seconds */ /* get the cell and Thread that the particle is currently in */ cell_t c = RP_CELL(&(tp->cCell)); Thread *t = RP_THREAD(&(tp->cCell)); /* Particle index for looping over all particles in the cell */ Particle *pi; /* loop over all particles in the cell to find their mass */ /* weighted mean velocity and diameter */ int i; real u_mean[3]={0.}, mass_mean=0.; real d_orig = tp->state.diam; real decay = 1. - exp(-t_relax); begin_particle_cell_loop(pi,c,t) { mass_mean += pi->state.mass; for(i=0;i<3;i++) u_mean[i] += pi->state.V[i]*pi->state.mass; } end_particle_cell_loop(pi,c,t) Best regards Alex Munoz |
|
June 24, 2003, 19:17 |
Re: Loop over particles
|
#3 |
Guest
Posts: n/a
|
Hello Alex,
Thanx for your time. But I guess this looping macro is available in Fluent 6.1 since this is an example in it's manual. I am using Fluent6.0. Do u know if i can use begin_particle_cell_loop(pi,c,t) for my case? Because there is nothing about this macro anywhere in fluent6.0 UDF manual. Thanks again for your help. Umesh |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DPM: UDF - loop over all particles | chris | Fluent UDF and Scheme Programming | 31 | June 17, 2020 06:52 |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 03:09 |
trying to simulate two-phase jet flow with particles in surface injection | ajkratos | FLUENT | 5 | March 3, 2015 22:33 |
[CAD formats] my stl surface is seen as just a line | rcastilla | OpenFOAM Meshing & Mesh Conversion | 2 | January 6, 2010 02:30 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 16:57 |