I wrote the following UDF to add the effects of other particles on the tracked particles as a body force.
double bforce=0., Bc=0.;
t = P_CELL_THREAD(p);
c = P_CELL(p);
bforce=Bc/PMASS(p)+1.; /*i component, x,y,or z component force*/
return bforce; /*return the acceleration*/
as I run it, it gives "FLUENT received fatal signal (ACCESS_VIOLATION)" error. I believe it is because of "begin_particle_cell_loop" macro. Do you have any idea why this happens? How can I use "begin_particle_cell_loop" macro properly?
Thank you very much for your help.