CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF:line 6: parse error. (https://www.cfd-online.com/Forums/fluent/48587-udf-line-6-parse-error.html)

Jiying Liu June 24, 2008 03:30

UDF:line 6: parse error.
 
Hi: I have tried several times,but there is error. Can anyone please help me with this program or give me some advice?

Error: D:\001\udf-k.c: line 6: parse error.

My short code is as follows: #inlude "udf.h" #define UMEAN 1.1 #define Y 500. #define DEL 0.1 #define B 0.28 DEFINE_PROFILE(k_profile, t, i) { real y; real ufree; real x[ND_ND]; face_t f; ufree=UMEAN*pow(DEL,B); begin_f_loop(f,t) { F_CENTROID(x,f,t); y=x[1]; F_PROFILE(f,t,i)=pow((0.0247-0.235*y/Y)*ufree*pow(y,B),2.)/1.08; } end_f_loop(f,t) }


Jiying Liu June 24, 2008 03:37

Re: UDF:line 6: parse error.
 
#inlude "udf.h"

#define UMEAN 1.1

#define Y 500.

#define DEL 0.1

#define B 0.28

DEFINE_PROFILE(k_profile, t, i)

{

real y;

real ufree;

real x[ND_ND];

face_t f;

ufree=UMEAN*pow(DEL,B);

begin_f_loop(f,t)

{

F_CENTROID(x,f,t);

y=x[1];

F_PROFILE(f,t,i)=pow((0.0247-0.235*y/Y)*ufree*pow(y,B),2.)/1.08;

}

end_f_loop(f,t)

}


cfd_newbie June 25, 2008 20:01

Re: UDF:line 6: parse error.
 
Just a typo mistake, instead of:

#include "udf.h"

you have

#inlude "udf.h"

Advice: use a syntax highlighting editor for writing your code (ex. on Linux gvim, Emacs ... on Windows try Programmers Notepad).


Jiying Liu July 6, 2008 21:23

Re: UDF:line 6: parse error.
 
oh,thanks a lot.

Jiying Liu July 6, 2008 21:24

Re: UDF:line 6: parse error.
 
oh,oh,thanks a lot.


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