CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   C_YI in DEFINE_SOURCE (http://www.cfd-online.com/Forums/fluent/42797-c_yi-define_source.html)

Sad Thomas :( November 8, 2006 06:02

C_YI in DEFINE_SOURCE
 
Hi,

I'm trying to call the mass source of a species to use as a source term. The problem exists in part of a larger code; I've included an example of the problem below.

When I run the UDF I get an access violation.

Am I right to understand that the species index i in C_YI(c,t,i) refers to the species ID in Define > Phases?

DEFINE_SOURCE(test,cell,thread,dS,eqn) real mo2; mo2 = C_YI(cell,thread,0); source=2*mo2; dS[eqn] = 0; return source;

Many thanks for any help.

Thomas


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