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

quite simple UDF - but cannot be interpreted

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 18, 2007, 09:03
Default quite simple UDF - but cannot be interpreted
  #1
Bohis
Guest
 
Posts: n/a
Hello, I have still problems with interpreting my UDF. It looks like this: #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)=.5*(1-exp(-69.10887533*(y-.294642426)));

}

end_f_loop(f,thread) }

Fluent always reports the message: line 1: parse error

Do U have any idea?

Thanks in advance , Honza
  Reply With Quote

Old   September 18, 2007, 09:22
Default Re: quite simple UDF - but cannot be interpreted
  #2
Kasper
Guest
 
Posts: n/a
Try to replace "thread" with "t" everywhere in your code. Maybe also "index" with "i". Just an idea - see if it helps.
  Reply With Quote

Old   September 18, 2007, 09:27
Default Re: quite simple UDF - but cannot be interpreted
  #3
Bohis
Guest
 
Posts: n/a
many thanks, but there is still the same problem, still reporting line 1: parse error. Any other idea? Please
  Reply With Quote

Old   September 18, 2007, 10:37
Default Re: quite simple UDF - but cannot be interpreted
  #4
Kasper
Guest
 
Posts: n/a
I really have no idea.

But why don't you try to narrow down the error. Get rid of some of the code and see if you can isolate the error. Maybe it is something in your expression with the exponential. Try to make "= 1"; .

But I don't understand the "line 1" in the error. Everything looks all right.

  Reply With Quote

Old   September 18, 2007, 10:53
Default Re: quite simple UDF - but cannot be interpreted
  #5
Bohis
Guest
 
Posts: n/a
good idea, but I have already tried it. I am exhausted of it
  Reply With Quote

Old   September 18, 2007, 11:51
Default Re: quite simple UDF - but cannot be interpreted
  #6
Matt Richardson
Guest
 
Posts: n/a
I don't think that this is the issue, but where have you included math.h so that you can use the exp function? Is it included in one of the files that is included in udf.h (I didn't see it there)?

Matt
  Reply With Quote

Old   September 19, 2007, 00:28
Default Re: quite simple UDF - but cannot be interpreted
  #7
JSM
Guest
 
Posts: n/a
Hi Bohis,

Your udf is correct. There is no errors. Please check the following things.

1.While intrepreting the udf, the file path to hook the udf should not have any space between them. ex. c:\documents and settings\..... It is wrong. c:\project_name\check.c It is correct procedure 2. File name also should not contain the space.

Hope it will help you

with warm regards, JSM
  Reply With Quote

Old   September 19, 2007, 03:40
Default Re: quite simple UDF - but cannot be interpreted
  #8
Jones
Guest
 
Posts: n/a
#include.udf

u must write it as header

regards

  Reply With Quote

Old   September 19, 2007, 04:07
Default Re: quite simple UDF - but cannot be interpreted
  #9
Bohis
Guest
 
Posts: n/a
Hi everybody, especially JSM,

Itīs really working! Well, never spaces !! I have one special question? What is your nationality? I am interested in people nationalities which are visiting this pages.

many thanks
  Reply With Quote

Old   September 19, 2007, 08:19
Default Re: quite simple UDF - but cannot be interpreted
  #10
JSM
Guest
 
Posts: n/a
Hi Bohis,

Knowledge will come by experience and self interest to learn. Nothing special. This is the really good website from this we can share our knowledge. What is the reason to ask the nationality? My nationality is India.

with warm regards, JSM
  Reply With Quote

Old   September 19, 2007, 08:23
Default Re: quite simple UDF - but cannot be interpreted
  #11
Bohis
Guest
 
Posts: n/a
I think so. I am just interested in who you are, who help me I am from Czech Republic. Do you ever know It?
  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
Interpreted UDF in parallel David Chabot Fluent UDF and Scheme Programming 8 May 30, 2012 03:18
compiled and interpreted udf mateus FLUENT 1 May 11, 2011 06:09
simple rigid body motion UDF Dan FLUENT 0 January 11, 2006 06:48
help wanted on interpreting a simple UDF Suresh FLUENT 4 December 8, 2004 12:41
Interpreted UDF Bikash FLUENT 8 September 1, 2004 02:30


All times are GMT -4. The time now is 23:16.