|
[Sponsors] |
September 18, 2007, 10:03 |
quite simple UDF - but cannot be interpreted
|
#1 |
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 |
|
September 18, 2007, 10:22 |
Re: quite simple UDF - but cannot be interpreted
|
#2 |
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.
|
|
September 18, 2007, 10:27 |
Re: quite simple UDF - but cannot be interpreted
|
#3 |
Guest
Posts: n/a
|
many thanks, but there is still the same problem, still reporting line 1: parse error. Any other idea? Please
|
|
September 18, 2007, 11:37 |
Re: quite simple UDF - but cannot be interpreted
|
#4 |
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. |
|
September 18, 2007, 11:53 |
Re: quite simple UDF - but cannot be interpreted
|
#5 |
Guest
Posts: n/a
|
good idea, but I have already tried it. I am exhausted of it
|
|
September 18, 2007, 12:51 |
Re: quite simple UDF - but cannot be interpreted
|
#6 |
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 |
|
September 19, 2007, 01:28 |
Re: quite simple UDF - but cannot be interpreted
|
#7 |
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 |
|
September 19, 2007, 04:40 |
Re: quite simple UDF - but cannot be interpreted
|
#8 |
Guest
Posts: n/a
|
#include.udf
u must write it as header regards |
|
September 19, 2007, 05:07 |
Re: quite simple UDF - but cannot be interpreted
|
#9 |
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 |
|
September 19, 2007, 09:19 |
Re: quite simple UDF - but cannot be interpreted
|
#10 |
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 |
|
September 19, 2007, 09:23 |
Re: quite simple UDF - but cannot be interpreted
|
#11 |
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?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interpreted UDF | Bikash | FLUENT | 10 | December 3, 2019 01:52 |
Interpreted UDF in parallel | David Chabot | Fluent UDF and Scheme Programming | 8 | May 30, 2012 04:18 |
compiled and interpreted udf | mateus | FLUENT | 1 | May 11, 2011 07: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 |