CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   parse error , please help (http://www.cfd-online.com/Forums/fluent-udf/108367-parse-error-please-help.html)

89566008 October 21, 2012 14:53

parse error , please help
 
there are 4 error for my udf :
line 13: parse error.
line 14: parse error.
line 15: parse error.
line 16: subscripted expression is not an array or pointer: double.

here is my udf :

#include "udf.h"
#include "dpm.h"
#include "math.h"
#include "mem.h"
#define Pia 3.14
#define epsilon_0 8.85e-12
#define epsilon_r 1.000590
#define K_ion 0.00022
DEFINE_DPM_BODY_FORCE(particle_body_force,p,i)
{
real bforce=0,Qd,Q,t, t_half;
real x;
x=[ND,ND];
cell_t c = RP_CELL(&(p->cCell));
Thread *t = RP_THREAD( &(p->cCell) );
C_CENTROID(x,c,*t);

if(i==1)
{
Qd=3*Pia*epsilon_0*(epsilon_r/(epsilon_r+2))*pow(P_DIAM(p),2.0)*C_UDSI_G(c,t,1)[1];
t_half=4*epsilon_0/(C_UDSI(c,t,0)*K_ion);
Q=(3*Qd/2)-(t_half*Qd/P_TIME(p));
}
if(Q<=Qd)
{
bforce=Q*C_UDSI_G(c,t,1)[1];
}
else
{
bforce=Qd*C_UDSI_G(c,t,1)[1];
}
return (bforce/P_MASS(p));
}

what is wrong ?

89566008 October 22, 2012 11:25

please check my UDF , if it possible
I need help

89566008 October 22, 2012 11:59

please check my UDF , if it possible
I need help


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