CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   source energy involving temperature gradient (

isabel July 14, 2008 06:40

source energy involving temperature gradient
Hello friends,

I have seen a discussion about temperature gradient in FLUENT in a CFD forum. I have the same problem. I want to compute a source energy "cte*gradient. My code is:

#include "udf.h"

DEFINE_SOURCE (fuente_energia, c, t, dS, eqn)

{ real gradT; real fuentee; real cte = 15500; begin_c_loop(c,t) {

gradT = C_T_G(c,t)[0];

fuentee = -cte*gradT;

dS[eqn]= -cte */I am not sure*/ }

end_c_loop(c,t) return fuentee;


But when I iterate, I have a violation error.

Can you help me, please?

Greetings from Spain.

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