YasserSelima
Subscriber
try this .. n#include udf.h#define Q 7.0     /* particle electric charge   */nn#define E 3.0    /* electric field magnitude */nn#define TSTART 0  /* field applied at t = tstart  */ nDEFINE_DPM_BODY_FORCE(electric_force, p, i)n{n real bforce = 0;n if (P_TIME(p) >= TSTART)n {n if (i == 0) {n bforce = Q * E*P_VEL(p)[0];n } else if (i == 1) {n bforce = -Q * E*P_VEL(p)[1];n } else {n bforce = 0.0;n }n }n/* an acceleration should be returned */n return (bforce / P_MASS(p));nnnLet me know if you are still getting the same errorn