CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

UDF parse error on line 1 ..... (Unusual)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 28, 2006, 14:49
Default UDF parse error on line 1 ..... (Unusual)
  #1
Amit Maha
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
  Reply With Quote

Old   June 28, 2006, 17:39
Default Re: UDF parse error on line 1 ..... (Unusual)
  #2
tim
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
  Reply With Quote

Old   June 28, 2006, 17:45
Default Re: UDF parse error on line 1 ..... (Unusual)
  #3
Yuhao
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.
  Reply With Quote

Old   June 29, 2006, 09:26
Default Re: UDF parse error on line 1 ..... (Unusual)
  #4
Amit Maha
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
  Reply With Quote

Old   June 30, 2006, 12:15
Default Re: UDF parse error on line 1 ..... (Unusual)
  #5
Vidya Raja
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
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 19:45
errors Fahad Main CFD Forum 0 March 23, 2004 14:20
Problems of Duns Codes! Martin J Main CFD Forum 8 August 14, 2003 23:19
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 08:25.