CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   C_YI in DEFINE_SOURCE (

Sad Thomas :( November 8, 2006 07:02


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.


All times are GMT -4. The time now is 21:44.