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

error of Interpreted udf

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2001, 03:29
Default error of Interpreted udf
  #1
Zhang Junmei
Guest
 
Posts: n/a
Dear Sir or madam,

Thanks for your help in recent days very much! As a new learner,your help is important to me. If you have some free time, would you please to give me a favor again?

Now, I will deal with an unsteady flow problem. The velocity of inlet is connected with time and position. If I use a transient profile to describe the velocity condition, it seems that the velocity must be spatially uniform and vary only in time. So I think maybe I shall use UDF to handle this condition.

Because the velocity can be expressed as small straightforward function, I choose the interpreted UDF to deal with the boundary condition. I following the manual to compile the UDF step by step, such as: 1) Copy the c source code and the case file in my working directory. 2) Start fluent from my working directory. 3) Read my case file. 4) Compile my UDF using the Interpreted UDFs panel.

After I press " compile" in the panel, the Error information expressed on the screen, such as : Errorrofile_v.c.txt:line 2:syntax error.

I don't know why and how to deal with this problem.

Would you please to give me a favor? BTW, profile_v.c.txt is the C source code I copy from the manual to test the correct of using UDF.

Thanks for your help very much! And hope to hear from you as soon as possible!

Regards and cheer Zhang Junmei

  Reply With Quote

Old   December 7, 2001, 08:55
Default Who can help me?Please give me some help!
  #2
Zhang Junmei
Guest
 
Posts: n/a
Dear all, would you please to give me some advice on interpreted UDF? Thanks a lot!
  Reply With Quote

Old   December 9, 2001, 22:27
Default Is there anyone accustom to UDF?Please to help me!
  #3
Zhang Junmei
Guest
 
Posts: n/a
Hello everyone,

As a new learned of Fluent, I want your help very much!

If you are accustomed to UDF,please healp me! Thanks very much!

Regards and cheer

Zhang Junmei
  Reply With Quote

Old   December 11, 2001, 10:54
Default Re: error of Interpreted udf
  #4
Mark Willetts
Guest
 
Posts: n/a
The error message that you are getting indicates an error in your source code on line 2 of the file profile_v.c.txt. Are you sure you have copied the example in the manual exactly? Also, check whether you are using the correct format for the source code containing the UDF, since this changed slightly for fluent version 5. It is very difficult to help you further without seeing you actual source code. Hope this helps. Regards, Mark
  Reply With Quote

Old   December 11, 2001, 20:53
Default Can you give me a further help,Mark?
  #5
Zhang Junmei
Guest
 
Posts: n/a
Dear Mark,

Thanks for your help very much! To check the accurate of UDF, I use the parabolic inlet velocity first. Just as the following code file, it is copied from the manual of Fluent.

#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position)

{ 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, position) = 2*0.172417855-

y*y/(.01*.01)*2*.172417855;

}

end_f_loop(f, thread) }

So would you please to help me find the error of this code?

And now I am wondering that maybe the error is not due to the code itself. For example if I don't write the correct name of c source code in the panel of Source File name, fluent will inform me that line 1:syntax error.Therefore maybe the informed syntax error is not really an error of syntax.

And from the manual I know that in the parallel version of FLUENT on a network of Windows NT machines, I shall organize my files in a special way, such as creating a subdirectory in the Fluent.Inc directory called udf with write permission.Therefor whether the error of this interpreted UDF is due to the version problem?

Thanks for your help very much! And hope to hear from you as soon as possible!

Best wishes, Zhang Junmei

  Reply With Quote

Old   December 12, 2001, 04:27
Default Re: Can you give me a further help,Mark?
  #6
Mark Willetts
Guest
 
Posts: n/a
The code compiles with no problems on my machine, indicating that your problem lies elsewhere.

However, I did have problems at first with my c compiler which created a line 1:syntax error. I'm not sure what platform your running on, but if you've installed the /contrib component from the "Prepost" CD (standard for Windows NT installation) try selecting the "Use Contributed CPP" button at the bottom of the "Interpreted UDFs" panel.

Hopefully this will solve your problem.

Regards

Mark
  Reply With Quote

Old   December 12, 2001, 08:03
Default Thanks for your help !
  #7
Zhang Junmei
Guest
 
Posts: n/a
Dear sir,

Thanks for your help very much!

Your advice give me a big help. Fllowing your advice, I can realize the UDF of Fluent.

I am very appreciate for your help!

Happy Christmas! Regards and cheer Zhang Junmei
  Reply With Quote

Reply

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
Interpreted UDF Bikash FLUENT 10 December 3, 2019 00:52
UDF - Interpreted works and compiled doesn't AlwaysLearning FLUENT 9 October 30, 2018 00:52
A Problem of Fluent Interpreted UDF: parse error knight Fluent UDF and Scheme Programming 25 August 16, 2018 10:26
Interpreted UDF in parallel David Chabot Fluent UDF and Scheme Programming 8 May 30, 2012 03:18
compiled or interpreted udf Aireen FLUENT 11 August 25, 2005 00:54


All times are GMT -4. The time now is 10:47.