{ word alphaScheme("div(phi,alpha)"); word alpharScheme("div(phirb,alpha)"); surfaceScalarField phir = phic*interface.nHatf(); for (int gCorr=0; gCorr 0.0 && alpha1[celli] > 0.0) { Sp[celli] -= dgdt[celli]*alpha1[celli]; Su[celli] += dgdt[celli]*alpha1[celli]; } else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0) { Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]); } } surfaceScalarField phiAlpha1 = fvc::flux ( phi, alpha1, alphaScheme ) + fvc::flux ( -fvc::flux(-phir, alpha2, alpharScheme), alpha1, alpharScheme ); MULES::explicitSolve(geometricOneField(), alpha1, phi, phiAlpha1, Sp, Su, 1, 0); surfaceScalarField rho1f = fvc::interpolate(rho1); surfaceScalarField rho2f = fvc::interpolate(rho2); rhoPhi = phiAlpha1*(rho1f - rho2f) + phi*rho2f; alpha2 = scalar(1) - alpha1; } Info<< "Liquid phase volume fraction = " << alpha1.weightedAverage(mesh.V()).value() << " Min(alpha1) = " << min(alpha1).value() << " Min(alpha2) = " << min(alpha2).value() << endl; }