CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF debugging

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

LinkBack Thread Tools Display Modes
Old   August 10, 2005, 12:47
Default UDF debugging
Posts: n/a
Hi all, attached below is the UDF I use to prescribe a 2d inlet velocity as a function of time. Although it compiles fine, I would like to see printed the value of the variable t (see below) using the printf function. I've place such command at 2 place in the code without getting the output on my screen. Am I doing something wrong? I used to be able to do it with version 6.1 but since I changed for v.6.2 am having difficulty. Any clues would be helpful.

Best Regards


DEFINE_PROFILE(un_vel2, thread, position)

{ real x[ND_ND];

float t, velocity,w,y,z;

face_t f;

t = RP_Get_Real("flow-time");

w=floor (t);


printf ("Time is: %6.2f\n",t);

if (z<0.4)

velocity = 1-(cos(5*z*3.14159));



begin_f_loop(f, thread) {

printf ("Time is: %6.2f \n",z);


y = x[1];

F_PROFILE(f, thread, position) = velocity - y*y/(.0065*.0065)*velocity;

} end_f_loop(f, thread)

  Reply With Quote

Old   August 11, 2005, 12:43
Default Re: UDF debugging
Posts: n/a
Hi, FYI: 'printf' function does not work for compiled UDF in Version 6.2. Replace 'printf' by 'Message' for compiled UDF.
  Reply With Quote


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
On debugging a Womersley Profile UDF david FLUENT 3 August 7, 2017 03:49
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
help debugging Beam deflection UDF josik_1982 Fluent UDF and Scheme Programming 0 December 19, 2010 18:36
UDF - Debugging techniques PK FLUENT 2 February 6, 2007 17:44
Debugging 3d parabolic udf david FLUENT 4 June 13, 2005 14:20

All times are GMT -4. The time now is 22:19.