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

Temperature gradient: Does the C_T_G macro work ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 23, 2011, 16:59
Default Temperature gradient: Does the C_T_G macro work ?
  #1
New Member
 
Join Date: Feb 2011
Posts: 4
Rep Power: 15
tumbao is on a distinguished road
Hi CFD mates,

I want to compute the temperature gradient in different solid zones of the domain. I found that the macro C_T_G can perform this task but I did not manage to get it working. Fluent always gives the same error: "Segmentation Violation"

Why ? How to solve this issue ?

I have looked here and there on the internet and I found many people who have the same problem, but I couldnt find any solution. Is it possible that there is a problem with the macro C_T_G itselft ?

Here is my code (which is basically the same as in the UDF guide of Fluent):


DEFINE_ON_DEMAND(Temp_grad_ondemand)
{
Domain *d;
cell_t c;
Thread *t;
d = Get_Domain(1);

thread_loop_c(t,d)
{
begin_c_loop(c,t)
{

C_UDMI(c,t,1) = NV_MAG(C_T_G(c,t));

}
end_c_loop(c,t)
}

}

Thanks mates !
tumbao is offline   Reply With Quote

Old   December 21, 2011, 05:55
Default
  #2
Member
 
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16
johnwinter is on a distinguished road
Hi tumbao,

Did you add header file mem.h in your udf?? and also did you run the text command solve/set/expert??

This will Keep temporary solver memory from being freed?.
Note that when you do this, all of the gradient data is retained, but the calculation requires more memory to run
johnwinter is offline   Reply With Quote

Old   July 6, 2016, 16:13
Default
  #3
New Member
 
Apiano Morais
Join Date: Apr 2016
Posts: 10
Rep Power: 10
Apiano is on a distinguished road
You need to allow the derivatives in order to store gradients.
Apiano is offline   Reply With Quote

Reply

Tags
c_t_g, error, problem, segmentation violation, temperature gradient


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
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45
Temperature gradient macros ameyadurve Fluent UDF and Scheme Programming 1 October 9, 2009 14:16
Temperature gradient tsherk86 OpenFOAM Running, Solving & CFD 2 August 5, 2008 15:42
why convergence depend on temperature gradient daiga CFX 0 March 5, 2008 09:21
Temperature gradient? Cote CFX 1 February 8, 2007 10:03


All times are GMT -4. The time now is 18:19.