DEFINE_PROPERTY for particle data
Hello all,
I want to calculate the material properties using the particle data. Is it possible? For checking, I am trying to calculate the no.of particles in each cell using the DEFINE_PROPERTY MACRO. #include "udf.h" #include "pdf_transport.h" #include "dpm.h" #include "cl_dpm.h" FILE *fp; DEFINE_PROPERTY(cell_abs_coeff, c, t) { Particle *p; Domain *d=Get_Domain(1); int iter = 0; Alloc_Storage_Vars(d, SV_DPM_PARTICLE_BIN, SV_NULL); FLUENT_EXPORT void bin_particles_in_cells(Domain *d, cxboolean true); begin_particle_cell_loop(p,c,t) { iter++; } end_particle_cell_loop(p,c,t) Free_Storage_Vars(d, SV_DPM_PARTICLE_BIN, SV_NULL); fp = fopen("results.dat", "a"); fprintf(fp,"%d\t\n",iter); fclose(fp); return 0; } But it seems like, it does not enter into the particles loop. I am just keep getting zero for each cell. Can anyone please tell me what I am missing? Thanks in advanced. Regards: MAC |
All times are GMT -4. The time now is 09:44. |