37 lines
1.3 KiB
C
37 lines
1.3 KiB
C
|
|
forAll(rho, celli)
|
|
{
|
|
if(F_total[celli] > 0)
|
|
{
|
|
scalarField Ytemp(Ysize, 0.0);
|
|
|
|
for(label i = 0 ; i < Ysize ; i++) //mass fraction integration over an eta-space for species i
|
|
{
|
|
for(label k=0 ; k<=group ; k++)
|
|
{
|
|
for(label j=0 ; j<=etamax ; j++)
|
|
{
|
|
pdf[j] = Peta[j][celli];
|
|
f[j] = QiCMC[(k*(etamax+1)+j)*Ysize + i];
|
|
}
|
|
Ytemp[i] += Ffrac[k][celli]*integration(deltaftn[celli], MFcut, Neta, pdf, f);
|
|
}
|
|
}
|
|
|
|
Switch ignoreOFIncrease = true;
|
|
Switch oxygenIncrease = Ytemp[o2index] > Y[o2index][celli];
|
|
Switch fuelIncrease = Ytemp[fuelindex] > Y[fuelindex][celli];
|
|
if( ignoreOFIncrease && (oxygenIncrease || fuelIncrease))
|
|
{
|
|
// Do not update Yi
|
|
}
|
|
else
|
|
{
|
|
for(label i = 0 ; i < Ysize ; i++)
|
|
{
|
|
Y[i][celli] = Ytemp[i];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|