Temperature gradient macros on face
How to obtain a temperature gradient directly from the solver for the UDF purposes? Does any macro exist to compute temperature gradient on a face?
my aim i to extract heat flux on a face! Thank you 
Quote:

Thanks, but i don't need of a heat flux, i want to know dt/dn i.e. gradient.
Bye. 
Quote:
Then use the UDS gradient on cell, distance vector to compute the temperature gradient on face. #include "udf.h" DEFINE_ON_DEMAND(test) { face_t f; cell_t c0; Thread *tf,*t0; Domain*domain=Get_Domain(1); real NV_VEC(dist_vector); real f_centoid[ND_ND],c_centroid[ND_ND]; real face_value,cell_value; thread_loop_f(tf, domain)/* loops over all face threads in a domain*/ { begin_f_loop(f, tf) /* loops over faces in a face thread */ { F_CENTROID(f_centoid,f,tf); //centroid of a face c0=F_C0(f,tf); t0=THREAD_T0(tf); C_CENTROID(c_centroid,c0,t0); //centroid of the neighbour cell NV_DD(dist_vector,=,f_centoid[0],f_centoid[1],0,,c_centroid[0],c_centroid[1],0); face_value=C_UDSI(c0,t0,0)+NV_DOT(C_UDSI_G(c0,t0,0 ),dist_vector); cell_value=C_UDSI(c0,t0,0); Message0("x coord.=%g,face value=%g,cell value=%g\n",f_centoid[0],face_value,cell_value); } end_f_loop(f, f_thread) } } 
convective boundary condition
after writing a similar face gradient, i have to give a mass convection boundary condition with the face and air, but i couldn't manage to put the cell (for air) and face (for solid face) together. can you help me?

I am solving a 2D problem. I want to calculate temperature gradient (and also write it) on the surface(line) whose end points I know. Can anyone tell me how to do it
Thank you 
All times are GMT 4. The time now is 21:44. 