CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   energy source problem (

fluboy January 7, 2010 12:19

energy source problem
Dear All

I am a beginner in UDF

I need to set a energy source in a solid (W/m3)

And the energy source is temperature dependent

I got this error message:

FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save cas/data under new name.
3. Exit programme and restart to continue.
4. Report error to your distributor.
Error object

My UDF is as follow

#include "udf.h"

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

real temp;
real source;

temp = C_W(c,t);

if (temp<293 && temp>290)
source = 1000.;
source = 0.;
return source;

pls give me some direction and suggestion.


coglione January 8, 2010 04:36

C_W(c,t) will return the z-velocity which does not make too much sense for a solid. Maybe C_T(c,t) is what you actually want to use.


fluboy January 10, 2010 09:56

Thank you, coglione

I will try it!!

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