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) } |
This problem has been solved.........I have just found why my code di not work.
Thanks sagga |
Quote:
Thank you very much! CZ |
All times are GMT -4. The time now is 05:24. |