|
[Sponsors] |
June 28, 2006, 15:49 |
UDF parse error on line 1 ..... (Unusual)
|
#1 |
Guest
Posts: n/a
|
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 |
|
June 28, 2006, 18:39 |
Re: UDF parse error on line 1 ..... (Unusual)
|
#2 |
Guest
Posts: n/a
|
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 |
|
June 28, 2006, 18:45 |
Re: UDF parse error on line 1 ..... (Unusual)
|
#3 |
Guest
Posts: n/a
|
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.
|
|
June 29, 2006, 10:26 |
Re: UDF parse error on line 1 ..... (Unusual)
|
#4 |
Guest
Posts: n/a
|
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 |
|
June 30, 2006, 13:15 |
Re: UDF parse error on line 1 ..... (Unusual)
|
#5 |
Guest
Posts: n/a
|
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
help with UDF for contact angle based on contact line velocity | gandesk | Fluent UDF and Scheme Programming | 14 | October 29, 2012 14:58 |
UDF parse error | alemenchaca | FLUENT | 0 | July 1, 2009 20:45 |
errors | Fahad | Main CFD Forum | 0 | March 23, 2004 14:20 |
Problems of Duns Codes! | Martin J | Main CFD Forum | 8 | August 15, 2003 00:19 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |