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

My compiled UDF doesn't print a value but my interpreted UDF does.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 24, 2022, 09:13
Question My compiled UDF doesn't print a value but my interpreted UDF does.
  #1
New Member
 
Ahmad Koolivand
Join Date: Aug 2022
Location: Shiraz,Iran
Posts: 3
Rep Power: 2
AhmadKoolivand is on a distinguished road
Send a message via Skype™ to AhmadKoolivand
Hello everyone. when I compile below UDF, printf function does not work in a transient simulation but when I interpret it, it does work and the value is printed in the console. How can I fix it with compiled UDFs?

#include"udf.h"

double au;
double a;
int n;

DEFINE_ADJUST(bubble_velocity,domain)
{
#if !RP_HOST
Thread *t;
Thread *st;
cell_t c;
real FCV[ND_ND];
n=0;
au=0;
a=0;
thread_loop_c(t,domain)
{
st=THREAD_SUB_THREAD(t,1);
begin_c_loop_int(c,t)
{
C_CENTROID(FCV,c,t);
au+=C_VOF(c,st)*C_U(c,t)*C_VOLUME(c,t);
a+=C_VOF(c,st)*C_VOLUME(c,t);
n+=1;
}

end_c_loop_int(c,t)
}

printf("n: %d\n", n);
#endif




}
AhmadKoolivand is offline   Reply With Quote

Reply

Tags
compiled, complilation, printf, udf

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
UDF library trying to load is not compiled for parallel use on the current platform Arjunsajith Fluent UDF and Scheme Programming 10 December 9, 2021 07:47
Print data from UDF to txt file fazzesco FLUENT 3 April 29, 2021 04:13
Compiled Vs Interpreted UDF in Fluent 15 Far Fluent UDF and Scheme Programming 1 August 2, 2014 07:48
how to quit compiled or interprited UDF tian FLUENT 0 April 9, 2003 00:53
error of Interpreted udf Zhang Junmei FLUENT 6 December 12, 2001 09:03


All times are GMT -4. The time now is 18:13.