CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Temperature Gradient Problem [C_T_G(c,t)]

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 22, 2009, 16:49
Default Temperature Gradient Problem [C_T_G(c,t)]
  #1
New Member
 
Suabsakul Gururatana
Join Date: Dec 2009
Posts: 4
Rep Power: 16
sagga18 is on a distinguished road
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)

}

Last edited by sagga18; January 4, 2010 at 17:01.
sagga18 is offline   Reply With Quote

Old   January 4, 2010, 17:03
Default
  #2
New Member
 
Suabsakul Gururatana
Join Date: Dec 2009
Posts: 4
Rep Power: 16
sagga18 is on a distinguished road
This problem has been solved.........I have just found why my code di not work.

Thanks

sagga
sagga18 is offline   Reply With Quote

Old   June 30, 2013, 23:04
Default
  #3
New Member
 
CZ
Join Date: Jun 2013
Posts: 9
Rep Power: 13
titanchao is on a distinguished road
Quote:
Originally Posted by sagga18 View Post
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
titanchao is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
(Heattransfer) Temperature boundary condition problem suitup OpenFOAM Bugs 15 October 14, 2010 23:18
Temperature gradient macros ameyadurve Fluent UDF and Scheme Programming 1 October 9, 2009 14:16
Applying temperature gradient Wiggy FLUENT 0 July 14, 2009 13:20
source energy involving temperature gradient isabel FLUENT 0 July 14, 2008 07:40
Temperature gradient Michal FLUENT 7 December 3, 2001 12:24


All times are GMT -4. The time now is 14:15.