CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   DPM (http://www.cfd-online.com/Forums/fluent/49373-dpm.html)

david September 27, 2008 20:00

DPM
 
DEFINE_DPM_SCALAR_UPDATE(part_dpm_charge,c,t,init, tp) {

cphase_state_t *cphase=&(tp->cphase);

real q0,q_max;

int i;

if(init)

{

for(i=0;i<N_REQUIRED_DPM;i++)

tp->user[i]=0.;

P_DIAM(tp) = P_INIT_DIAM(tp); /* P_DIAM(p) is the diameter of the particle */

P_MASS(tp) = P_INIT_MASS(tp); /* P_MASS(p) is the mass of the particle */

}

else

{

/*calculate particle charge...*/

q0=tp->user[C_P]; q_max=-3*epsilon_r/(epsilon_r+2)*M_PI*epsilon_0*C_EE(c,t)*P_DIAM(tp)* P_DIAM(tp);

if(q0>=q_max)

tp->user[C_P]=7*q_max; /*particle charge is constant*/

else

tp->user[C_P]=7*q_max*P_TIME(tp)/(P_TIME(tp)+4*epsilon_0/Num/qe/ki);

} CX_Message("source:user=%d,mass=%d\n",P_MASS(tp)/P_RHO(tp),(P_MASS(tp)-P_MASS0(tp))); } why the value printed by CX_Message is ununiform with i set in the GUI, some one help me,


All times are GMT -4. The time now is 01:54.