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

UDF: Parse error line 3

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2005, 09:39
Default UDF: Parse error line 3
  #1
CJ
Guest
 
Posts: n/a
I am having numerous problems trying to get fluent to read my c file. Initially I had the problem of it stating a parse error line 1, now I have moved my case file and c file to the ntx86 folder, and when loading my case it says:

Building...

grid,

materials,

interface,

domains,

mixture

zones, cpp -IC:\FLUENT.INC\fluent6.0/src -IC:\FLUENT.INC\fluent6.0/cortex/src -IC:\FLUENT.INC\fluent6.0/client/src -IC:\FLUENT.INC\fluent6.0/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" myprog.cError: myprog.c: line 3: parse error.

It says something similar to the last few lines when i try to load the c file in interpreted UDF's. My c file is:

#include udf.h

DEFINE_PROFILE(inlet_x_velocity, thread, index) {

real x[ND_ND];

real y;

face_t f;

begin_f_loop(f,thread)

{

F_CENTROID(x,f,thread);

y = x[1];

F_PROFILE(f, thread, index) = 20. - y*y/(.0745*.745)*20.;

}

end_f_loop(f,thread) }

Thanks for any help!
  Reply With Quote

Old   March 1, 2005, 09:44
Default Re: UDF: Parse error line 3
  #2
Andrew Garrard
Guest
 
Posts: n/a
Does udf have to be in quotes in #include "udf.c"

Just a thought

?
  Reply With Quote

Old   March 1, 2005, 10:12
Default Re: UDF: Parse error line 3
  #3
CJ
Guest
 
Posts: n/a
Absolutely excellent, it worked! Thankyou!
  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A Problem of Fluent Interpreted UDF: parse error knight Fluent UDF and Scheme Programming 25 August 16, 2018 10:26
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 06:43
parse error in transient udf spring FLUENT 1 July 6, 2010 06:26
UDF parse error at profile function line Wiggy Fluent UDF and Scheme Programming 1 July 27, 2009 15:59
UDF parse error on line 1 ..... (Unusual) Amit Maha FLUENT 4 June 30, 2006 12:15


All times are GMT -4. The time now is 01:58.