CFD Online Discussion Forums

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

Szabolcs Varga April 20, 2004 10:53

Syntax error
Dear Everyone, I need yuor 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 19:03.