Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / solvers / multiphase / interPhaseChangeFoam / alphaEqnSubCycle.H
blobdd1d828030fa10b1e607e0081cb0b2fae02aba31
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     label nAlphaCorr
15     (
16         readLabel(piso.lookup("nAlphaCorr"))
17     );
19     label nAlphaSubCycles
20     (
21         readLabel(piso.lookup("nAlphaSubCycles"))
22     );
24     surfaceScalarField phic = mag(phi/mesh.magSf());
25     phic = min(interface.cAlpha()*phic, max(phic));
27     volScalarField divU = fvc::div(phi);
29     dimensionedScalar totalDeltaT = runTime.deltaT();
31     if (nAlphaSubCycles > 1)
32     {
33         for
34         (
35             subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
36             !(++alphaSubCycle).end();
37         )
38         {
39 #           include "alphaEqn.H"
40         }
41     }
42     else
43     {
44 #       include "alphaEqn.H"
45     }
47     if (nOuterCorr == 1)
48     {
49         interface.correct();
50     }
52     rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;