CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   *****Particle Tracking In DPM (http://www.cfd-online.com/Forums/fluent/41382-particle-tracking-dpm.html)

Adriano June 14, 2006 03:33

*****Particle Tracking In DPM
 
Hi users,

I've got a problem with my DPM model. I'd like to impose a UDF that describes the porous zone behavior during tracking particle routine. I'd like to stop certain particle (selected by their particle identification number). My problem is restarting particles tracking of part_id that are not in my interest!! I attach my code (semplified)

Please and thank you.

Adriano.

DEFINE_DPM_BC(ADESIONE_SCAF,p,t,f,f_normal,dim) { /*confronto part_id corrente - part_id nell'array di randomizzazione*/ int select,i,l;

FILE *fp;

/*chiamata della funzione che fa il confronto */

select=confronta(p->part_id, a);

//uscita

if (select==1)

{

Message("select = %d part_id ferma =%d\n",select,p->part_id);

fp=fopen("ADESIONE_SCAF.txt","a+");

/*scrivo nel file la posizione in cui si fermata e in quale faccia*/

fprintf(fp,"((%10.6g %10.6g %10.6g %10d %10d %10.6g %10.6g %10.6g) %d)\n",p->state.pos[0],p->state.pos[1],p->state.pos[2],t,f,f_normal[0],f_normal[1],f_normal[2],p->part_id);

fclose(fp);

Trap_Particle(p);

p->gvtp.n_trapped+=1;

l=PATH_ABORT;

/*attribuisco il 'trap' alla particella che realizzato con la funzione*/

}

if (select==0)

{

p->gvtp.n_escaped+=1;

l=PATH_ACTIVE;

}

return (int) l; }


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