Fluent: Find Cell Volume at Current Particle Position DPM UDF
Hello,
I am trying to extract the interpolated fluid velocities + cell volume at the current particle position. Anybody experienced in using UDF macros, could you help me to understand what I am doing wrong? #include "udf.h" DEFINE_DPM_SCALAR_UPDATE(interp_vel_and_volume,c,t ,init,p) { cphase_state_t *cp; cp = p->cphase; P_USER_REAL(p,0) = cp->V[0]; /* Interpolated x-velocity */ P_USER_REAL(p,1) = cp->V[1]; /* Interpolated y-velocity */ P_USER_REAL(p,2) = cp->V[2]; /* Interpolated z-velocity */ P_USER_REAL(p,3) = cp->C_VOLUME(TP_CELL(p),TP_CELL_THREAD(p)); } |
All times are GMT -4. The time now is 14:08. |