ignore increase in oxygen/fuel mass fraction

This commit is contained in:
ignis 2017-08-18 17:25:23 +09:00
parent 454d0c8cf0
commit ff1d790f3b

View file

@ -5,7 +5,7 @@
{
scalarField Ytemp(Ysize, 0.0);
for(label i=0 ; i<Ysize ; i++) //mass fraction integration over an eta-space for species i
for(label i = 0 ; i < Ysize ; i++) //mass fraction integration over an eta-space for species i
{
for(label k=0 ; k<=group ; k++)
{
@ -18,9 +18,19 @@
}
}
for(label i=0 ; i<Ysize ; i++)
Switch ignoreOFIncrease = true;
Switch oxygenIncrease = Ytemp[o2index] > Y[o2index][celli];
Switch fuelIncrease = Ytemp[fuelindex] > Y[fuelindex][celli];
if( ignoreOFIncrease && (oxygenIncrease || fuelIncrease))
{
Y[i][celli] = Ytemp[i];
// Do not update Yi
}
else
{
for(label i = 0 ; i < Ysize ; i++)
{
Y[i][celli] = Ytemp[i];
}
}
}
}