CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Loop over particles

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Alex Munoz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 24, 2003, 10:50
Default 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
  Reply With Quote

Old   June 24, 2003, 17:56
Default 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
wc34071209 likes this.
  Reply With Quote

Old   June 24, 2003, 18:17
Default 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
  Reply With Quote

Reply


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 Off
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 31 June 17, 2020 05:52
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
trying to simulate two-phase jet flow with particles in surface injection ajkratos FLUENT 5 March 3, 2015 21:33
[CAD formats] my stl surface is seen as just a line rcastilla OpenFOAM Meshing & Mesh Conversion 2 January 6, 2010 01: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 13:00.