# Loop over particles

 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 24, 2003, 10:50 Loop over particles #1 Umesh Shah 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, 17:56 Re: Loop over particles #2 Alex Munoz 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, 18:17 Re: Loop over particles #3 Umesh Shah 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

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post nishant_hull Open Source Meshers: Gmsh, Netgen, CGNS, ... 18 April 22, 2015 08:43 chris Fluent UDF and Scheme Programming 24 April 11, 2015 00:47 ajkratos FLUENT 5 March 3, 2015 22:33 rcastilla OpenFOAM Meshing & Mesh Conversion 2 January 6, 2010 02:30 Franny Main CFD Forum 13 July 7, 2007 15:57

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