|February 21, 2011, 13:19||
Join Date: May 2010
Posts: 1Rep Power: 0
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?
real bforce = 0.0;
cell_t c = P_CELL(p); /* cell and thread */
Thread *t = P_CELL_THREAD(p); /* where the particle is in */
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), P_POS(p), P_POS(p), P_USER_REAL(p,0), P_USER_REAL(p,1), P_USER_REAL(p,2));
|fluent dpm output file|