I am working with DPM and using UDF. Without UDF my model is working good. When I compiled my UDF I got a warning (image attached) but opened the file. After compilation when I run the simulation, it stopped with n fatal signal error. Here is my UDF
/**************************************************************************************/
/* UDF for computing cell co-ordinates */
/**************************************************************************************/
#include "udf.h"
#include "sg.h"
#include "prop.h"
#include "dpm.h"
#include "surf.h"
#define WALL_ID 8
DEFINE_DPM_SCALAR_UPDATE(particle_coords, c, ct, initialize, p)
{
real A[ND_ND];
int n;
face_t f;
Thread *ft;
c_face_loop(c, ct, n)
{
f=C_FACE(c, ct,n);
ft=C_FACE_THREAD(c, ct, n);
if (NNULLP(ft))
{
if (THREAD_ID(ft)== WALL_ID)
{
p->user[0] = p->state.pos[0];
p->user[1] = p->state.pos[1];
p->user[2] = p->state.pos[2];
}
}
}
}
DEFINE_DPM_OUTPUT(Particle_coords_output, header, fp, p, thread, plane)
{
char name[100];
if (header)
{
if (NNULLP(thread))
fprintf(fp,"(%s %d)\n",THREAD_HEAD(thread)-> dpm_summary.sort_file_name,3);
else
fprintf(fp,"(%s %d)\n",plane->sort_file_name,3);
fprintf(fp,"(%10s %10s %10s %s)\n",
"X", "Y", "Z");
}
else
{
sprintf(name,"%s:%d",p->injection->name,p->part_id);
fprintf(fp,
"((%10.6g %10.6g %10.6g) %s)\n", p->state.pos[0], p->state.pos[1], p->state.pos[2]);
}
}
Could you please help me?
Saeed