BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / twoPhaseEulerFoam / alphaEqn.H
blob8f1ad9df8e3387677a5e4d1b9f61e88236dd3524
2     word scheme("div(phi,alpha)");
3     word schemer("div(phir,alpha)");
5     surfaceScalarField phic("phic", phi);
6     surfaceScalarField phir("phir", phia - phib);
8     if (g0.value() > 0.0)
9     {
10         surfaceScalarField alphaf(fvc::interpolate(alpha));
11         surfaceScalarField phipp(ppMagf*fvc::snGrad(alpha)*mesh.magSf());
12         phir += phipp;
13         phic += fvc::interpolate(alpha)*phipp;
14     }
16     for (int acorr=0; acorr<nAlphaCorr; acorr++)
17     {
18         fvScalarMatrix alphaEqn
19         (
20              fvm::ddt(alpha)
21            + fvm::div(phic, alpha, scheme)
22            + fvm::div(-fvc::flux(-phir, beta, schemer), alpha, schemer)
23         );
25         if (g0.value() > 0.0)
26         {
27             ppMagf = rUaAf*fvc::interpolate
28             (
29                 (1.0/(rhoa*(alpha + scalar(0.0001))))
30                *g0*min(exp(preAlphaExp*(alpha - alphaMax)), expMax)
31             );
33             alphaEqn -= fvm::laplacian
34             (
35                 (fvc::interpolate(alpha) + scalar(0.0001))*ppMagf,
36                 alpha,
37                 "laplacian(alphaPpMag,alpha)"
38             );
39         }
41         alphaEqn.relax();
42         alphaEqn.solve();
44         #include "packingLimiter.H"
46         beta = scalar(1) - alpha;
48         Info<< "Dispersed phase volume fraction = "
49             << alpha.weightedAverage(mesh.V()).value()
50             << "  Min(alpha) = " << min(alpha).value()
51             << "  Max(alpha) = " << max(alpha).value()
52             << endl;
53     }
56 rho = alpha*rhoa + beta*rhob;