CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Wall Normal Temperature Gradient (

Daniel Tanner April 30, 2009 13:59

Wall Normal Temperature Gradient
I would like to access the temperature gradients normal to my wall boundary. Consider steady laminar flow in a cylindrical pipe. I solve the energy equation using a constant temperature at the wall and wish to access the wall normal temperature gradients at each face of the wall boundary (i.e., dT/dn).

How can I do this? (I am familiar with UDF's). There appears to be no F_T_G() macro and I am not sure how to calculate the face value from the cell centroid (C_F_G()).

Help would be appreciated.

contrarian May 2, 2009 06:14

You can assume that the cell gradient is equal to the face gradient and dot it with the face area.
You can also get the face normal temperature gradient from the flux: divide the face heat flux with the thermal conductivity.

Daniel Tanner May 2, 2009 07:53

Thanks for the reply. I understand how to do it conceptually but I'm having problems implementing it. I have attached a basic UDF below which I cannot get to work! I just want to save the wall temperature to UDM. It compiles and executes without error but the UDM values are zero everywhere (I have set the UDM in Fluent).

#include "udf.h"

Domain *domain=Get_Domain(1);
Thread *t;
face_t f;

int Zone_ID=5; /* Found in Fluent BC panel and identifies Wall */


F_UDMI(f, t, 0) = F_T(f,t);

Any ideas why this does not work?

contrarian May 2, 2009 09:51

F_T may not be populated on load. Could you try after doing one iteration?

Daniel Tanner May 2, 2009 11:57

Sorry and thanks for the help. I found the problem. The UDF was working fine, but Fluent cannot display the F_UDMI data as it is stored at the face, i.e., it can only display cell centered data.

I'll have to think of another way to do it.

contrarian May 3, 2009 00:01

You can may be store the F_UDMI at C_UDMI(c0,t0).

Maryam-A September 20, 2015 13:10

I would appreciate if anyone can help me.
I wanted to return derivative of UDS as wall boundary value, but I face with "fatal signal" that I found this because of boundary condition UDS.:(
this is part of my udf for B.C of UDS( volume fraction of nanoparticle in my case)

Thread *t;
cell_t c;



All times are GMT -4. The time now is 06:47.