hi every body,
I wrote the following UDF:
# include "udf.h"
# include "stdio.h"
# include "dpm.h"
# include "mem.h"
# include "surf.h"
# define mag 2.0
DEFINE_DPM_BODY_FORCE(partbf,p,i)
{
double bforce=0., Bc=0.;
Thread *t;
cell_t c;
Particle *pi;
t = P_CELL_THREAD(p);
c = P_CELL(p);
begin_particle_cell_loop(pi,c,t)
{
Bc+=0.2/mag;
}
end_particle_cell_loop(pi,c,t)
bforce=Bc+1.;
return bforce;
}
But as I am running it it gives me the following error:
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: #f
Can anybody help me please?