CFD Online Logo CFD Online URL
Home > Forums > FLUENT

udf help

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

LinkBack Thread Tools Display Modes
Old   April 28, 2008, 02:27
Default udf help
Posts: n/a
hello every one

my udf is interpreted well and running but the value of alpha is not udf goes like this....any guesses ?

thanks in advance

#include "udf.h" #include"mem.h" #include"math.h" #include"complex.h" #include"unsteady.h"

DEFINE_INIT(initial, domain) { cell_t cell; Thread *thread; real x[ND_ND];

thread_loop_c (thread,domain)


begin_c_loop_all (cell,thread)



C_UDMI(cell, thread, 0) = 0.0001;


end_c_loop_all (cell,thread)

} }

#define ko 32631.0 #define E 167400.0 #define R 8.314 #define Q 77.5

#define m 0.524 #define n 1.476 #define vof 0.5

DEFINE_SOURCE(heat_gen,cell,thread,ds,eqn) { real x[ND_ND];

real alpha,source;

C_CENTROID(x, cell, thread);

alpha=C_UDMI(cell,thread,0)+(pow(ko*exp(-E/(5*R*C_T(cell,thread))),5))*pow(alpha,m)*pow(alpha ,n);


source=1890*Q*vof*(pow(ko*exp(-E/(5*R*C_T(cell,thread))),5))*pow(alpha,m)*pow(alpha ,n);


return source; }
  Reply With Quote

Old   April 29, 2008, 08:17
Default Re: udf help
Posts: n/a
I am no expert in Fluent but it seems like your alpha is a local variable. So, can it be the case, that alpha is reinitialized every time step? since the calculation of alpha itself depends on alpha, maybe it is always equal to zero on the RHS of your equation.
  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

All times are GMT -4. The time now is 05:54.