|
[Sponsors] |
February 23, 2006, 08:34 |
UDF DPM Unsteady
|
#1 |
Guest
Posts: n/a
|
Hy everybody.
I'm trying to write a quite simple UDF to obtain some simple values of the particles flow. So, I'm using the DEFINE_DPM_BC to obtain the position and the velocity of the particle that hit the wall. Also I'm using the LES turbulence model with 3D Unsteady solver with a group injection of 5 stream. I wrote this simple UDF, shown below, but althought this UDF is compiled without problem I don't have the file with the values of the particles that are hitting the wall. Does anybody did something similar ?? Does anyone know why I can print to file those values ? Thanks Lourival #include "udf.h" DEFINE_DPM_BC(bc_leitura_imp, p, t, f, f_normal, dim) { real vx, px; real vy, py; real vz, pz; real diam ; int ID_part ; FILE *fp; vx=p->state.V[0] ; vy=p->state.V[1] ; vz=p->state.V[2] ; px=p->state.pos[0] ; py=p->state.pos[1] ; pz=p->state.pos[2] ; diam=p->state.diam ; ID_part= p->part_id ; fp = fopen("teste_export.txt","a+"); fprintf(fp,"ID %d", ID_part); fprintf(fp,";"); fprintf(fp,"Vel X %f", vx); fprintf(fp,";"); fprintf(fp, "Vel Y %f", vy); fprintf(fp,";"); fprintf(fp, "Vel Z %f", vz); fprintf(fp,";"); fprintf(fp,"Pos X %f", px); fprintf(fp,";"); fprintf(fp, "Pos Y %f", py); fprintf(fp,";"); fprintf(fp, "Pos Z %f", pz); fprintf(fp,";"); fprintf(fp, "Diam %f", diam); fprintf(fp,"\n"); fclose(fp); return PATH_ABORT; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Itīs possible to use this in unsteady dpm tracking? | JSoares | Fluent UDF and Scheme Programming | 3 | June 9, 2011 10:41 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 01:29 |
DPM with UDF - Step-by-Step Procedure???? | Prashanth | FLUENT | 3 | April 3, 2009 17:45 |
UDF Unsteady velocity profile | Rashad | FLUENT | 0 | February 27, 2008 14:57 |
steady or unsteady? (in dpm) | winnie | FLUENT | 1 | April 28, 2003 11:30 |