CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF error !! (https://www.cfd-online.com/Forums/fluent/80951-udf-error.html)

stage81 October 12, 2010 04:27

UDF error !!
 
xr xr plaese

lehoang_mai October 12, 2010 09:07

Hey, hello stage81! I got it.
for your problem, I think UDF is:

/**************************************/
#include "udf.h"

DEFINE_SOURCE(energy_source,c,t,dS,eqn)
{
real x[ND_ND];
real source;

C_CENTROID(x,c,t);

if (x[1]==10.)

source = 10000.;
else
source = 0.;

return source;
}
/******************************************/
Best wish for you!

stage81 October 12, 2010 10:14

Quote:

Originally Posted by lehoang_mai (Post 278804)
Hey, hello stage81! I got it.
for your problem, I think UDF is:

/**************************************/
#include "udf.h"

DEFINE_SOURCE(energy_source,c,t,dS,eqn)
{
real x[ND_ND];
real source;

C_CENTROID(x,c,t);

if (x[1]==10.)

source = 10000.;
else
source = 0.;

return source;
}
/******************************************/
Best wish for you!

and you know why I have this error when i compile UDF ?
for the UDF, I improved it :)

lehoang_mai October 12, 2010 14:36

You haven't correctly write UDF :)

stage81 October 12, 2010 14:39

Quote:

Originally Posted by lehoang_mai (Post 278860)
You haven't correctly write UDF :)

NOT THis Udf, but i have a correct udf


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