initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / applications / solvers / multiphase / interPhaseChangeFoam / gammaEqnSubCycle.H
blobc6355d6fb0b9ce882c5c3e904df1ecb8842dbe9c
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 nGammaCorr
15     (
16         readLabel(piso.lookup("nGammaCorr"))
17     );
19     label nGammaSubCycles
20     (
21         readLabel(piso.lookup("nGammaSubCycles"))
22     );
24     surfaceScalarField phic = mag(phi/mesh.magSf());
25     phic = min(interface.cGamma()*phic, max(phic));
27     volScalarField divU = fvc::div(phi);
29     dimensionedScalar totalDeltaT = runTime.deltaT();
31     if (nGammaSubCycles > 1)
32     {
33         for
34         (
35             subCycle<volScalarField> gammaSubCycle(gamma, nGammaSubCycles);
36             !(++gammaSubCycle).end();
37         )
38         {
39 #           include "gammaEqn.H"
40         }
41     }
42     else
43     {
44 #       include "gammaEqn.H"
45     }
47     if (nOuterCorr == 1)
48     {
49         interface.correct();
50     }
52     rho == gamma*rho1 + (scalar(1) - gamma)*rho2;