The UDF code in C has changed.

BOUNDARY CONDITIONS

The new macro to use is DEFINE_PROFILE( (unction name, thread,nv)

Here is a example to introduce a parabolic profile at the inlet :

 INITIAL CONDITIONS

The macro tu use is DEFINE_INIT. Here is an example of initialization of a parabolic inlet in the domain :

#include "udf.h"

DEFINE_INIT(Init_Vitesse, thread, nv)

{

cell_t c;

real y[ND_ND];

begin_c_loop(c,thread) {

C_CENTROID(y,c,thread);

C_U(c,thread)=10.0 * y[1] / 0.01* (1 - y[1] / 0.02) ;

}

end_c_loop(c,thread)

}

The user defined function is well compiled but we don't know how to use it. There was a special command in Fluent 4.0 and we don't know how to use it in Fluent 5.0 , so we couldn't test it.

Back