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

UDF parse error

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2010, 11:38
Default UDF parse error
  #1
New Member
 
Join Date: Nov 2009
Posts: 4
Rep Power: 16
ajConsu is on a distinguished road
Hello, I´m trying to interpret an UDF that changes the value of the roughness constant:
#include "udf.h"

DEFINE_PROFILE(Cs,t,i)

{
face_t f;
begin_f_loop(f,t)
{
F_PROFILE(f,t,i) = 4.22112;
}

end_f_loop(f,t)
}
I have the error: "line 2: parse error".
I´ve tried to interpret it from "Fluent.Inc/ntbin/ntx86" too and I have the same result.

Help me please!

P.S.: I think I have used the same UDF before and it worked.
ajConsu is offline   Reply With Quote

Old   May 12, 2010, 12:01
Default
  #2
tez
New Member
 
Tez
Join Date: Oct 2009
Posts: 12
Rep Power: 16
tez is on a distinguished road
I don't see any error in your code.
Depending upon your fluent version, Cs might be an internal variable/or function in fluent.
You could change it to something else and try.
tez is offline   Reply With Quote

Old   May 12, 2010, 12:20
Default
  #3
New Member
 
Join Date: Nov 2009
Posts: 4
Rep Power: 16
ajConsu is on a distinguished road
I changed Cs, [DEFINE_PROFILE(XXX,t,i)], and still have the problem.

The line 2 is the line under #include "udf.h" and it´s a blank line.
If I insert another lines at the start of the UDF, the error always appears in the same line, under #include "udf.h".
ajConsu is offline   Reply With Quote

Old   May 12, 2010, 12:45
Default
  #4
tez
New Member
 
Tez
Join Date: Oct 2009
Posts: 12
Rep Power: 16
tez is on a distinguished road
Your code compiles in my machine. I am using a 64 bit linux compiler. Have you compiled other UDFs successfully? Your problem could be compiler related.
tez is offline   Reply With Quote

Old   May 14, 2010, 07:12
Default
  #5
New Member
 
Join Date: Nov 2009
Posts: 4
Rep Power: 16
ajConsu is on a distinguished road
Quote:
Originally Posted by tez View Post
Your code compiles in my machine. I am using a 64 bit linux compiler. Have you compiled other UDFs successfully? Your problem could be compiler related.
Thank you very much.
Yes, I have compiled other UDF´s in the same machine succesfully. The machine es a 64 bit linux too.
However, I´ve tried to compile this UDF in other machines and it doesn´t work.

I think I´m doing it well:
Fluent 3ddp
Define>User-Defined>Functions>Interpreted
I chose the UDF (browse) and click "Interpret"

In the 64 bit linux, at first I interpret the UDF and then I compile it.
ajConsu is offline   Reply With Quote

Reply

Tags
parse error, roughness, udf

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 18:54
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." sega OpenFOAM Community Contributions 12 February 17, 2010 09:30
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 17:38


All times are GMT -4. The time now is 04:32.