CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   How to understand "Y[inertIndex] = scalar(1) - Yt" in YEqn.H (https://www.cfd-online.com/Forums/openfoam-programming-development/123805-how-understand-y-inertindex-scalar-1-yt-yeqn-h.html)

zqlhzx September 21, 2013 09:59

How to understand "Y[inertIndex] = scalar(1) - Yt" in YEqn.H
 
Hi Foamers:
As we can see the following codes in YEqn.H:

{
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (Y[i].name() != inertSpecie)
{
volScalarField& Yi = Y[i];
solve
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
kappa*chemistry.RR(i),
mesh.solver("Yi")
);
Yi.max(0.0);
Yt += Yi;
}
else
{
inertIndex = i;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}
What does the "Y[inertIndex]"meas?How can I understand it?and what does the "Y[inertIndex]"use?
Thanks in advance!

Moslem September 22, 2013 04:55

I guess:
It is mass fraction of the inert species.
For example the N2 mass fraction in the following:
CH4+2(O2+3.76N2) --> CO2+2H2O+7.52N2

zqlhzx September 22, 2013 06:40

Thanks Moslem,I think you are right!

sonGoku May 31, 2018 18:34

what is Yt ?
 
Hi people ,
can u explain me what is Yt
initialised in the code as -
volScalarField Yt(0.0*Y[0]);

zhangyan June 1, 2018 07:09

Quote:

Originally Posted by sonGoku (Post 694201)
Hi people ,
can u explain me what is Yt
initialised in the code as -
volScalarField Yt(0.0*Y[0]);



Y_total exclude the inertSpecie

sonGoku June 1, 2018 12:36

thnx zhanGyan


All times are GMT -4. The time now is 10:39.