Initial commit of NavalHydro package from Wikki to the ShipHydroSIG
[ShipHydroSIG.git] / src / navalFoam / alphaEqn.H
blob345d3c0d770055c7a5f2a268da0536db36e8ec22
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     label nAlphaSubCycles
10     (
11         readLabel(pimple.lookup("nAlphaSubCycles"))
12     );
14     if (nAlphaSubCycles > 1)
15     {
16         dimensionedScalar totalDeltaT = runTime.deltaT();
18         for
19         (
20             subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
21             !(++alphaSubCycle).end();
22         )
23         {
24             if (implicitAlpha)
25             {
26 #               include "alphaImplicit.H"
27             }
28             else
29             {
30 #               include "alphaMules.H"
31             }
32         }
33     }
34     else
35     {
36         if (implicitAlpha)
37         {
38 #           include "alphaImplicit.H"
39         }
40         else
41         {
42 #           include "alphaMules.H"
43         }
44     }
46     Info<< "Liquid phase volume fraction = "
47         << alpha1.weightedAverage(mesh.V()).value()
48         << "  Min(alpha1) = " << min(alpha1).value()
49         << "  Max(alpha1) = " << max(alpha1).value()
50         << endl;
52     interface.correct();
54     // Calculate density using limited alpha1
55     rho = twoPhaseProperties.rho();