Go to the documentation of this file.00001 {
00002 word scheme("div(phi,alpha)");
00003 word schemer("div(phir,alpha)");
00004
00005 surfaceScalarField phic("phic", phi);
00006 surfaceScalarField phir("phir", phia - phib);
00007
00008 if (g0.value() > 0.0)
00009 {
00010 surfaceScalarField alphaf = fvc::interpolate(alpha);
00011 surfaceScalarField phipp = ppMagf*fvc::snGrad(alpha)*mesh.magSf();
00012 phir += phipp;
00013 phic += fvc::interpolate(alpha)*phipp;
00014 }
00015
00016 for (int acorr=0; acorr<nAlphaCorr; acorr++)
00017 {
00018 fvScalarMatrix alphaEqn
00019 (
00020 fvm::ddt(alpha)
00021 + fvm::div(phic, alpha, scheme)
00022 + fvm::div(-fvc::flux(-phir, beta, schemer), alpha, schemer)
00023 );
00024
00025 if (g0.value() > 0.0)
00026 {
00027 ppMagf = rUaAf*fvc::interpolate
00028 (
00029 (1.0/(rhoa*(alpha + scalar(0.0001))))
00030 *g0*min(exp(preAlphaExp*(alpha - alphaMax)), expMax)
00031 );
00032
00033 alphaEqn -= fvm::laplacian
00034 (
00035 (fvc::interpolate(alpha) + scalar(0.0001))*ppMagf,
00036 alpha,
00037 "laplacian(alphaPpMag,alpha)"
00038 );
00039 }
00040
00041 alphaEqn.relax();
00042 alphaEqn.solve();
00043
00044 #include "packingLimiter.H"
00045
00046 beta = scalar(1) - alpha;
00047
00048 Info<< "Dispersed phase volume fraction = "
00049 << alpha.weightedAverage(mesh.V()).value()
00050 << " Min(alpha) = " << min(alpha).value()
00051 << " Max(alpha) = " << max(alpha).value()
00052 << endl;
00053 }
00054 }
00055
00056 rho = alpha*rhoa + beta*rhob;