CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF about source term (http://www.cfd-online.com/Forums/fluent/31269-udf-about-source-term.html)

tian April 12, 2003 21:39

UDF about source term
 
hi,all, i want to add a constant value A to u equation source, the udf is low, it's right?

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

{ real A; real source;

source += A; /* A- constant */

return source;

}

thanks.

tian

Sebeci April 12, 2003 23:50

Re: UDF about source term
 
Hi It is right, but you should add dS[eqn]=0 and only it's need to wiite source=A on your code.(if A is constant (dS/du)=0)

I hope this help you


tian April 17, 2003 00:34

Re: UDF about source term
 
Hi, Sebeci, thank you. you said that if A is constant,dS/du =0, but in fact, in my u equation, add A to the U equation source, if the dS/du not equal 0, how to do?

tian

Senthil May 2, 2003 09:17

Re: UDF about source term
 
that derivative dS is the derivative of the source term w.r.t. the corresponding variable(in single/multi phase flow-both).. So if A is constant, then the derivative should be zero for any transport eqn.

bye


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