UDF parse error on line 1 ..... (Unusual)
Hi,
I get the following error message when i interpret the example udf from the fluent tutorial. cpp -IC:\Fluent.Inc\fluent6.1.22/src -IC:\Fluent.Inc\fluent6.1.22/cortex/src -IC:\Fluent.Inc\fluent6.1.22/client/src -IC:\Fluent.Inc\fluent6.1.22/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" S:\My Documents\Test_parabolic_inlet_udf.c Error: S:\My Documents\Test_parabolic_inlet_udf.c: line 1: parse error. THE UDF used is as follows: /************************************************** ******************** udfexample.c UDF for specifying a steady-state velocity profile boundary condition ************************************************** ********************/ #include "udf.h" /* must be at the beginning of every UDF you write */ DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f,thread) /* loops over all faces in the thread passed in the DEFINE macro argument */ { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f,thread,index) = 20. - y*y/(.0745*.0745)*20.; } end_f_loop(f,thread) } This is really annoying giving parse error on line 1. Could somebody PLEASE HELP!!!!!!!!!! Thank you for your time and patience. Sincerely, Amit Maha |
Re: UDF parse error on line 1 ..... (Unusual)
Seems your udf works well on my computer. Problem is you should save it in another directory. Maybe the space in "My Document" caused the error. By the way, you'd better format the code when post it. :)
Tim |
Re: UDF parse error on line 1 ..... (Unusual)
I met a similar problem. After checking, I found the problem comes from the folder name in which you saved udf. The "space" in the name leads to the mistake of compilation.
|
Re: UDF parse error on line 1 ..... (Unusual)
Thank You Tim and Yuhao for your time and comments. I'll check it out in a different folder. I appreciate your help!
Sincerely, Amit Maha |
Re: UDF parse error on line 1 ..... (Unusual)
Hi,
Make sure that there are no spaces in your working directory. Also, the case and data files and the UDF files SHOULD be in the same directory. Vidya |
All times are GMT -4. The time now is 11:09. |