CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)

 Michal October 15, 2001 09:09

How to obtain a temperature gradient directly from the solver for the UDF purposes? Does any macro exist to compute temperature gradient?

 ravi October 15, 2001 15:13

C_T_G(c,t)[i] -- cell_t c, Thread *t, int i : gives you temperature gradient component.

C_T_G(c,t) -- cell_t c, Thread *t : gives you temperature gradient vector.

 Michal October 16, 2001 01:26

Thanks very much for Your help!

 Greg Perkins October 16, 2001 06:02

You may need to be careful when using these macros depending upon what you are doing with them. They are not generally applicable for calculating gradients at faces - ie for flux calculations. As far as I can work out they return the gradients between neighbouring cells in the specified direction.

Greg

 Michal October 19, 2001 04:09

I just only want to check value of temperature gradient at my computational domain but when I use

C_UDMI(c,t,i)= C_T_G(c,t)[0];

my UDF is compiled correctly but Fluent send a SEGMENTATION VIOLATION error.

What could be a reason of that?

 Greg Perkins October 19, 2001 05:19

Did you define sufficient space for your udm's??

 Michal October 19, 2001 05:39

Yes, I defined u sufficient space for UDMI's...

My domain is axissymetric and I make:

C_UDMI(c,t,0) = C_T_G(c,t)[0] for axial direction C_UDMI(c,t,1) = C_T_G(c,t)[1] for radial direction

Is it correct?

 Avinash kadam December 3, 2001 12:24