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

About DEFINE_ADJUST

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 3, 2006, 06:02
Default About DEFINE_ADJUST
  #1
sagga
Guest
 
Posts: n/a
Hello. I'm beginner in UDF. My first example is DEFINE_ADJUST .The source code can interprete but when i'm hooking in User define function hooks. then it is not work. Does anybody know what is it going on ??

Thank you very much sagga

This is the source code

#include "udf.h"

DEFINE_ADJUST(my_adjust, d) { Thread *t; /* Integrate dissipation. */ real sum_diss=0.; cell_t c;

thread_loop_c (t,d) {

begin_c_loop (c,t)

sum_diss += C_D(c,t)*

C_VOLUME(c,t);

end_c_loop (c,t) }

printf("Volume integral of turbulent dissipation: %g\n", sum_diss); }

  Reply With Quote

Old   February 3, 2006, 10:49
Default Re: About DEFINE_ADJUST
  #2
RoM
Guest
 
Posts: n/a
Output from solver to cortex is buffered and you printf probably gets stuck in the message buffer. Until fluent solver decides to flush the buffer you wont see your message. Workaround is to use "Message" instead of "printf" but this will not work in interpreted mode so you will have to compile your udf.

RoM
  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



All times are GMT -4. The time now is 14:49.