CFD Online URL
[Sponsors]
Home > Forums > FLUENT

UDF debugging

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 10, 2005, 13:47
Default UDF debugging
  #1
david
Guest
 
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);

z=t-w;

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

if (z<0.4)

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

else

velocity=0;

begin_f_loop(f, thread) {

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

F_CENTROID(x,f,thread);

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, 13:43
Default Re: UDF debugging
  #2
david
Guest
 
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

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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
On debugging a Womersley Profile UDF david FLUENT 1 December 2, 2011 05:56
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 15:20


All times are GMT -4. The time now is 12:38.