Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / interPhaseChangeFoam / alphaEqnSubCycle.H
blobb68160e62d44abdf268134e961e8648f547cc6d3
1 surfaceScalarField rhoPhi
3     IOobject
4     (
5         "rhoPhi",
6         runTime.timeName(),
7         mesh
8     ),
9     mesh,
10     dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0)
14     const dictionary& pimpleDict = pimple.dict();
16     label nAlphaCorr(readLabel(pimpleDict.lookup("nAlphaCorr")));
18     label nAlphaSubCycles(readLabel(pimpleDict.lookup("nAlphaSubCycles")));
20     surfaceScalarField phic(mag(phi/mesh.magSf()));
21     phic = min(interface.cAlpha()*phic, max(phic));
23     volScalarField divU(fvc::div(phi));
25     dimensionedScalar totalDeltaT = runTime.deltaT();
27     if (nAlphaSubCycles > 1)
28     {
29         for
30         (
31             subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
32             !(++alphaSubCycle).end();
33         )
34         {
35             #include "alphaEqn.H"
36         }
37     }
38     else
39     {
40         #include "alphaEqn.H"
41     }
43     if (pimple.nOuterCorr() == 1)
44     {
45         interface.correct();
46     }
48     rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;