CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Temperature Gradient Problem [C_T_G(c,t)] (https://www.cfd-online.com/Forums/fluent-udf/71271-temperature-gradient-problem-c_t_g-c-t.html)

sagga18 December 22, 2009 15:49

Temperature Gradient Problem [C_T_G(c,t)]
 
Hi everyone

I tried to print the temperature gradient inside my channel 3D with conjugate heat.

And, I used the define_adjust to get the data from zone ID#5.
When I set up the case, I answered 'yes' to the question "Keep temporary memory from being freed?"
Also, I defined 4 user defined memories.

Problem is when I hooked this code in define_adjust, and It iterate.
It was not working.

Would anybody can help me?
Thank you very much in advance.

Sagga





#include "udf.h"

DEFINE_ADJUST(print_c_centroids, domain,t)
{
real xc[ND_ND];
cell_t c;
int ID5 = 5;
Thread *thread5 = Lookup_Thread(domain, ID5);

begin_c_loop(c, thread5)
{
C_CENTROID(xc,c,thread5);
C_UDMI(c,thread5,0)=C_T_G(c,thread5)[0];
C_UDMI(c,thread5,1)=xc[0];
C_UDMI(c,thread5,2)=xc[1];
C_UDMI(c,thread5,3)=xc[2];
printf("Value = %f, x = %f, y = %f, z = %f\n",C_UDMI(c,thread5,0),C_UDMI(c,thread5,1),C_UD MI(c,thread5,2),C_UDMI(c,thread5,3));
}
end_c_loop(c,thread)

}

sagga18 January 4, 2010 16:03

This problem has been solved.........I have just found why my code di not work.

Thanks

sagga

titanchao June 30, 2013 22:04

Quote:

Originally Posted by sagga18 (Post 241467)
This problem has been solved.........I have just found why my code di not work.

Thanks

sagga

Hi Sagga, it seems I am experiencing exactly the same problem. Could you please let me know why C_T_G in your code had not worked and how you fixed it?

Thank you very much!

CZ


All times are GMT -4. The time now is 05:24.