CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   UDF for energy source term (

Muhammad Aamir Khan July 24, 2007 02:08

UDF for energy source term

i am doing my M.S thesis and i came through the problem that my energy source is function of distance.I wrote a UDF that got compiled and loaded, but it does not give correct results.I think there is some problem with my program.Will any of u please help me handling this problem.Iwill be thankful. The program is given below.

#include "udf.h" DEFINE_SOURCE(energy_source,cell,thread,dS,eqn) { real source; real x[ND_ND]; cell_t c;


if (x[0]<= 2.9)

{ source=2012389286.84188+16292985208.2144*x[0]+5818669134.05074*x[0]*x[0]-9845482131.38002*x[0]*x[0]*x[0]; }


source =0;

return source;


waiting for ur suggestions.

msureshkumar July 25, 2007 02:08

Re: UDF for energy source term
you have to include mass source terms in UDF.

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