CFD Online Logo CFD Online URL
Home > Forums > FLUENT

Loop over particles

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

LinkBack Thread Tools Display Modes
Old   June 24, 2003, 10:50
Default Loop over particles
Umesh Shah
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.

  Reply With Quote

Old   June 24, 2003, 17:56
Default Re: Loop over particles
Alex Munoz
Posts: n/a

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;


u_mean[i] += pi->state.V[i]*pi->state.mass;

} end_particle_cell_loop(pi,c,t)

Best regards

Alex Munoz
  Reply With Quote

Old   June 24, 2003, 18:17
Default Re: Loop over particles
Umesh Shah
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.

  Reply With Quote


Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
DPM: UDF - loop over all particles chris Fluent UDF and Scheme Programming 25 August 27, 2017 19:34
Problem with Gmsh nishant_hull Open Source Meshers: Gmsh, Netgen, CGNS, ... 23 August 5, 2015 02:09
trying to simulate two-phase jet flow with particles in surface injection ajkratos FLUENT 5 March 3, 2015 22:33
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 15:57

All times are GMT -4. The time now is 23:51.