Can I get x,y,z coordinates of a particle in lagrangian simulation
Hi,
Can I get x, y, z coordinates of particles moving in a fluid. The particles are tracked using lagrangian approach. Thank you. |
Hi,
try this: report-> discrete phase-> sample select default-interior in boundaries panel and desired injections from injection pane then open the created file with a text editor which has "dpm" extension. Bests, |
Quote:
Any thoughts? |
Quote:
Bests, |
Hi,
This is an udf example which save in a file particle data (id, position, velocity and velocity derivatives). It may be useful : # include "udf.h" FILE *fp; DEFINE_ON_DEMAND(open_file) { fp=fopen("data.txt","a"); } DEFINE_DPM_SCALAR_UPDATE(trajectory,cell,thread,in itialize,p) { // COMPILED MODE ONLY fprintf(fp,"%d %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g \n",p->part_id,p->state.pos[0],p->state.pos[1],p->state.pos[2],p->state.V[0],p->state.V[1],p->state.V[2],p->state.time,C_DUDX(cell, thread), C_DUDY(cell, thread), C_DUDZ(cell, thread), C_DVDX(cell, thread), C_DVDY(cell, thread), C_DVDZ(cell, thread), C_DWDX(cell, thread), C_DWDY(cell, thread), C_DWDZ(cell, thread)); } DEFINE_ON_DEMAND(close_file) { fclose(fp); } |
Modifying Cd by particle spacing
@mali28
Quote:
Hi mali28, I am currently trying to do the same thing. What exactly are/were you simulating? Since it looks like you solved your problem, would you be kind enough to tell me just how you did it? Thanks! |
All times are GMT -4. The time now is 02:20. |