## Fluids

#### FLUENT Boundary conditions UDF (heat flux – convective losses – rediation losses

• 100041488
Subscriber

Hi folks,

I am creating my first UDF and I have a problem, I do not understand how to read the face wall temperature

. Can anyone help me?. The code is almost ready except how to input this temperature. Many thanks in advance.

PS: If i set up temperature at 500 K all calculus are ok, but I would need to read the real one!

#include "udf.h"

#define QMAX 407400 /* W/m2 */

#define EEPSILON 0.1

#define TAU 5.67e-8

#define T_AIRE 300

#define H_AIRE 40 /* convective coef.W/m2K */

/* profile for heat flux*/

DEFINE_PROFILE(heatflux_profile, t, i)

{

/* variable declaration */

real centroide[ND_ND]; /* vector position */

real x;

real y;

face_t f;

cell_t cell;

real seno; /* heat distribution */

real T_p; /* wall temperature */

begin_f_loop(f, t)

{

F_CENTROID(centroide,f,t);

x=centroide[0]; /* valor del cntroide en la componente x */

y=centroide[1]; /* valor del cntroide en la componente y */

seno=y/sqrt((x*x)+(y*y));

T_p = 500; /* I NEED TO FIND THE FUNCTION IN ORDER TO READ THE WALL TEMPERATURE, DO NOT WHY F_T(f,t) DOES NOT WORK  */

if (0 < y)

{

F_PROFILE(f,t,i)=(QMAX*seno)-TAU*((T_p*T_p*T_p*T_p )-(EEPSILON*T_AIRE*T_AIRE*T_AIRE*T_AIRE))-H_AIRE*(T_ p-T_AIRE);

} else {

F_PROFILE(f,t,i)=0;

}

}

end_f_loop(f, t)

}