CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Syntax error again (

Szabolcs Varga April 21, 2004 05:38

Syntax error again
Dear all, I posted a message yesterday, but its format was horrible, I will try again.

"Dear Everyone, I'd need your help again. Compiling my udf gives the following syntax error message:

# Generating udf_names.c because of makefile eforce_szabi.obj udf_names.c udf_names.c(7) : error C2059: syntax error : '}' udf_names.c(8) : warning C4034: sizeof returns 0

Could you please help me out what the error might be. The code is:

#include "udf.h" #include "dpm.h" #include "surf.h"

DEFINE_DPM_BODY_FORCE(force_L_P,p,idir) { cell_t c = RP_CELL(&(p->cCell)); Thread *t = RP_THREAD(&(p->cCell)); real l_force, mp, ex_t, er_t, Elp; real charge_on_p;

int V_x=0, V_r=0, E_x=0, E_r=1, E_magn=2;


charge_on_p= P_DIAM(p)*1.6e-11; /* you have to define real function P_charge() for particle charge*/ ex_t=C_UDMI(c,t,E_x); er_t=C_UDMI(c,t,E_r);

/* user code for x component force (m/s/s) */ if (idir==0)


l_force=ex_t*charge_on_p/mp; /*Fx*/

} /* user code for r component force (m/s/s) */ if (idir==1)


l_force=er_t*charge_on_p/mp; /*Fr*/

} return l_force; }

Thank you! Szabolcs "

All times are GMT -4. The time now is 21:05.