Forward compatibility: flex
[foam-extend-3.2.git] / applications / solvers / multiphase / compressibleInterDyMFoam / alphaEqnsSubCycle.H
blob32a7163130ebe623fec24babb865c2a4f8bb9322
2     label nAlphaCorr
3     (
4         readLabel(piso.lookup("nAlphaCorr"))
5     );
7     label nAlphaSubCycles
8     (
9         readLabel(piso.lookup("nAlphaSubCycles"))
10     );
12     surfaceScalarField phic = mag(phi/mesh.magSf());
13     phic = min(interface.cAlpha()*phic, max(phic));
15     fvc::makeAbsolute(phi, U);
16     volScalarField divU = fvc::div(phi);
17     fvc::makeRelative(phi, U);
19     if (nAlphaSubCycles > 1)
20     {
21         dimensionedScalar totalDeltaT = runTime.deltaT();
22         surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
24         for
25         (
26             subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
27             !(++alphaSubCycle).end();
28         )
29         {
30 #           include "alphaEqns.H"
31             rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
32         }
34         rhoPhi = rhoPhiSum;
35     }
36     else
37     {
38 #       include "alphaEqns.H"
39     }
41     if (oCorr == 0)
42     {
43         interface.correct();
44     }