CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   UDF parse error at profile function line (

Wiggy July 21, 2009 15:10

UDF parse error at profile function line
Hi, i am relatively new to UDF:(
below is my UDF file,

/************************************************** ********************
UDF for specifying a steady-state velocity profile boundary condition
************************************************** ********************/
#include "udf.h" /* must be at the beginning of every UDF you write */
real y[ND_ND]; /* this will hold the position vector */
real x;
face_t f;
begin_f_loop(f,thread) /* loops over all faces in the thread passed
in the DEFINE macro argument */
x = y[0];
F_PROFILE(f,thread,index) = 400.351. + 300.*x;

When i interpret my UDF file, it says parse error at the profile function file F_PROFILE(f,thread,index) = 400.351. + x*300.;
But when i remove the decimal values of 400.351 to 400, it has no problem interpreting it.

Is there any other methods or tips that enable me to include decimal values inside the profile function?

Thx a bunch :D

Micael July 27, 2009 15:59

Did you try this:
F_PROFILE(f,thread,index) = 400.351 + 300.*x;
instead of this:?
F_PROFILE(f,thread,index) = 400.351. + 300.*x;

There are two decimal points here: "400.351." The second one is inappropriate.

All times are GMT -4. The time now is 10:46.