CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   Parabolic Inlet velocity UDF parse error (

Musa August 28, 2012 01:50

Parabolic Inlet velocity UDF parse error
I am trying to create a udf for an inlet parabolic velocity profile however I am receving a parse error message in line 3. However I cannot see my mistake. Kindly help me.Line 3 is the bold line.

# include “udf.h”

DEFINE_PROFILE( y_velocity, thread, nv)
float x[3]; /* array for the coordinates */
float y;
face_t f; /* f is a thread face index */

F_CENTROID (x, f,thread);
x = y[1] ;
F_PROFILE ( f,thread nv)
= .88*(1.-y*y/(.15*.15) );
end_f_loop (f,thread)

Sama August 29, 2012 01:37

It sometimes gives error in wrong line so I believe the problem is this line F_PROFILE ( f,thread nv) you should add a comma "," between thread and nv.

All times are GMT -4. The time now is 12:27.