CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF parse error (http://www.cfd-online.com/Forums/fluent/65950-udf-parse-error.html)

alemenchaca July 1, 2009 19:45

UDF parse error
 
Hi,

I'm trying to interpret this function to use it as a velocity profile as boundary condition for an inlet.

I'm pretty sure the error is obvious, but I'm not quite familiar with c, and this is my first UDF.

I get the following parse error:

************
cpp -I"C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.1 6/src" -I"C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.1 6/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.1 6/client/src" -I"C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.1 6/multiport/src" -I. -
UDFCONFIG_H="<udfconfig.h>" "C:\Documents and Settings\Alejandra\Desktop\Fluent\Vel_prof.c"
Error: C:\Documents and Settings\Alejandra\Desktop\Fluent\Vel_prof.c: line 24: parse error.
*************

(the code ends on line 23)

**************
#include "udf.h"

DEFINE_PROFILE(z_inlet_velocity,thread,position)

{

real x[ND_ND];
real y;
real xx;
face_t f;

begin_f_loop(f,thread)

{

F_CENTROID(x,f,thread);
F_PROFILE(f, thread, position) = 0.631 * exp(-(pow(x[1],2.0) + pow(x[0], 2.0))/ pow(0.22, 2.0));

}

end_f_loop(f,thread)

}

***************


All times are GMT -4. The time now is 16:34.