CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   define source model (https://www.cfd-online.com/Forums/fluent/42077-define-source-model.html)

 greg August 21, 2006 06:01

define source model

Hi. In define source model we have such statement:

DEFINE_SOURCE(enrg_src, cell, mix_th, dS, eqn)

What is dS and eqn responsible for?

How this affect on energy source (code below)?

DEFINE_SOURCE(enrg_src, cell, mix_th, dS, eqn) { Thread *pri_th, *sec_th; real m_dot; real T_SAT = 100; real lambda1 = 1; real lambda2 = 1; real q = 1000;

if(C_T(cell, mix_th)>=T_SAT) {

m_dot = -(12* lambda1 * (fabs(C_T(cell,sec_th)-T_SAT)) * 1)/q;

dS[eqn] = -(12* lambda1 * 1)/q;}

else {

m_dot =(12* lambda2 * (fabs(C_T(cell,pri_th)-T_SAT)) * 1)/q;

dS[eqn] = (12* lambdaH2O * 1)/q;}

thank you for help

Re: define source model

The dS[eqn] function is used to linearise the source term to make the solution more stable. It doesnt change the final solution, it just guides it in the right direction. You can find a more detailed explanation on the CFD Wiki at http://www.cfd-online.com/Wiki/Sourc..._linearization

 greg August 22, 2006 08:56

Re: define source model

thanks for help :)

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