CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   particle number concentration in a volume (https://www.cfd-online.com/Forums/fluent/43970-particle-number-concentration-volume.html)

DH March 2, 2007 14:56

particle number concentration in a volume
 
Hi, I am trying to get the particle number concentration in a fluid volume which I specified in my 3D chamber model. Now I finished the DPM simulation (interaction with continous phase), and would like to figure out how to post-process to get the number concentration in the small region. can you please advise me?

Here is my coding and error message.

#include "udf.h" #include "dpm.h" #include "surf.h"

DEFINE_ON_DEMAND(p_number) {

Domain *d=Get_Domain(1); cell_t c; int id; int n=0; Particle *p;

Thread *c_thread=Lookup_Thread(d,4); /*In my case 4 was the id of the sampling volume */

Alloc_Storage_Vars(d, SV_DPM_PARTICLE_BIN, SV_NULL); bin_particles_in_cells(d);

begin_c_loop(c, c_thread) {

begin_particle_cell_loop(p,c,c_thread) { if (p->part_id < 10000) /*10000 particles were injected injected in the chamber */ { n =+ 1; } Message(" particle_number=%i",n); } end_particle_cell_loop(p,c,c_thread) }

end_c_loop(c, c_thread)

Free_Storage_Vars(d, SV_DPM_PARTICLE_BIN, SV_NULL);

}

Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: ()


All times are GMT -4. The time now is 11:02.