CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Syntax error again

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2004, 05:38
Default Syntax error again
  #1
Szabolcs Varga
Guest
 
Posts: n/a
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;

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 "
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is syntax error : missing ')' before ';' aleisia Fluent UDF and Scheme Programming 8 March 10, 2015 15:42
syntax error on config.h ehooi Fluent UDF and Scheme Programming 3 November 9, 2011 10:05
[Other] Turbogrid power syntax la7low ANSYS Meshing & Geometry 0 January 15, 2011 22:20
OpenFOAM file syntax amtri OpenFOAM 5 August 28, 2010 07:19
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 15:16


All times are GMT -4. The time now is 00:06.