CFD Online Logo CFD Online URL
Home > Forums > FLUENT


Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   February 21, 2011, 13:19
Default Define_dpm_body_force
New Member
Join Date: May 2010
Posts: 1
Rep Power: 0
AAAA is on a distinguished road
I'm planning on running some DPM simulations. The particles follow some behavioral rules based on some flow field variables values. I also want to create a customized txt output file with the particles information for each time step.

- Are there previous time step macros for the particle information like there are for some flow field variables (e.g. C_U_M1(c,t))? I couldn't find information on that in the Fluent UDF manual. I need to know the velocity of the particle in the previous time step.

- As a test for the output file I ran a short DPM simulation with the BODY FORCE shown below. For each particle and time step a bunch of lines are printed. I assume those are the internal iterations the DPM model uses to move the particles. Under that logic the last line should be the final position for a particle for each time step. To verify that I saved a data file and opened it in Tecplot including the particle data. the coordinates of the particles shown in Tecplot is pretty close to the last line written by the DEFINE_DPM_BODY_FORCE but no the same.

Does anyone know why they are not the same?

FILE *file2;
real bforce = 0.0;
int n,n0;
cell_t c = P_CELL(p); /* cell and thread */
Thread *t = P_CELL_THREAD(p); /* where the particle is in */
cell_t adj_c;
face_t f,f0;
Thread *tf,*tf0,*adj_thread;

file2 = fopen ("BODY_FORCE.txt","a");
if (file2 != NULL)
fprintf (file2, "%f %d %f %f %f %f %f %f \n",CURRENT_TIME,p->part_id, P_POS(p)[0], P_POS(p)[1], P_POS(p)[2], P_USER_REAL(p,0), P_USER_REAL(p,1), P_USER_REAL(p,2));
fclose (file2);
AAAA is offline   Reply With Quote


fluent dpm output file

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 22:10.