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

Syntax error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2004, 10:53
Default Syntax error
  #1
Szabolcs Varga
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
  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
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
compile errors of boundary condition "expDirectionMixed" liying02ts OpenFOAM Bugs 2 February 1, 2010 20:11
error while running paraFoam! padmanathan OpenFOAM 9 October 13, 2009 05:17
attach/detach (valve opening/closing) phsieh2005 OpenFOAM Running, Solving & CFD 2 March 21, 2009 05:18
user defined function cfduser CFX 0 April 29, 2006 10:58


All times are GMT -4. The time now is 11:07.