CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF reading the temperature gradient (https://www.cfd-online.com/Forums/fluent/31531-udf-reading-temperature-gradient.html)

Fabian May 23, 2003 04:15

UDF reading the temperature gradient
 
Hello,

does anybody know how to acces the z-component of the temperature gradient with an UDF? My UDF works well as long as I define a certain value to the temperature gradient, but when I try it with :

' dT_dz = C_T_G(cell,thread)[3]; '

FLUENT gives me an Error:

' FLUENT received fatal signal (ACCESS_VIOLATION) '

Greetings Fabian


ap May 29, 2003 20:18

Re: UDF reading the temperature gradient
 
Gradients are not defined at the first iteration. Put that command in an if like this:

if(Data_Valid_P()) { ... }



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