13 double gasvalue, foamvalue,alphasum,corrector,foamold,gasold;
15 forAll(mesh.C(), celli)
18 gasvalue = alpha1[celli];
19 foamvalue = alpha2[celli];
21 foamold = alpha2.oldTime()[celli];
22 gasold = alpha1.oldTime()[celli];
23 alphasum = gasvalue + foamvalue;
25 while (alphasum > 1.0)
27 if (gasvalue > foamvalue)
29 gasvalue = gasvalue - (Foam::mag(gasvalue - gasold))*corrector;
33 foamvalue = foamvalue - (Foam::mag(foamvalue - foamold))*corrector;