|
[Sponsors] |
April 20, 2004, 11:53 |
Syntax error
|
#1 |
Guest
Posts: n/a
|
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; mp=P_MASS(p); 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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 19:00 |
compile errors of boundary condition "expDirectionMixed" | liying02ts | OpenFOAM Bugs | 2 | February 1, 2010 21:11 |
error while running paraFoam! | padmanathan | OpenFOAM | 9 | October 13, 2009 06:17 |
attach/detach (valve opening/closing) | phsieh2005 | OpenFOAM Running, Solving & CFD | 2 | March 21, 2009 06:18 |
user defined function | cfduser | CFX | 0 | April 29, 2006 11:58 |