ENH: Time: access to libs
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / interFoam / alphaEqn.H
blobd19ae9bb702d0be3752e33f4feaad92cb8dd4bff
2     word alphaScheme("div(phi,alpha)");
3     word alpharScheme("div(phirb,alpha)");
5     surfaceScalarField phic(mag(phi/mesh.magSf()));
6     phic = min(interface.cAlpha()*phic, max(phic));
7     surfaceScalarField phir(phic*interface.nHatf());
9     for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
10     {
11         surfaceScalarField phiAlpha
12         (
13             fvc::flux
14             (
15                 phi,
16                 alpha1,
17                 alphaScheme
18             )
19           + fvc::flux
20             (
21                 -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
22                 alpha1,
23                 alpharScheme
24             )
25         );
27         MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
29         rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
30     }
32     Info<< "Liquid phase volume fraction = "
33         << alpha1.weightedAverage(mesh.V()).value()
34         << "  Min(alpha1) = " << min(alpha1).value()
35         << "  Max(alpha1) = " << max(alpha1).value()
36         << endl;