FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

alphaEqn.H

Go to the documentation of this file.
00001 {
00002     word scheme("div(phi,alpha)");
00003 
00004     surfaceScalarField phir = phia - phib;
00005 
00006     Info<< "Max Ur Courant Number = "
00007         << (
00008                max
00009                (
00010                    mesh.surfaceInterpolation::deltaCoeffs()*mag(phir)
00011                   /mesh.magSf()
00012                 )*runTime.deltaT()
00013             ).value()
00014         << endl;
00015 
00016     for (int acorr=0; acorr<nAlphaCorr; acorr++)
00017     {
00018         fvScalarMatrix alphaEqn
00019         (
00020              fvm::ddt(alpha)
00021            + fvm::div(phi, alpha, scheme)
00022            + fvm::div(-fvc::flux(-phir, beta, scheme), alpha, scheme)
00023         );
00024         alphaEqn.relax();
00025         alphaEqn.solve();
00026 
00027         /*
00028         fvScalarMatrix betaEqn
00029         (
00030               fvm::ddt(beta)
00031             + fvm::div(phi, beta, scheme)
00032             + fvm::div(-fvc::flux(phir, scalar(1) - beta, scheme), beta, scheme)
00033         );
00034         betaEqn.relax();
00035         betaEqn.solve();
00036 
00037         alpha = 0.5*(scalar(1) + sqr(scalar(1) - beta) - sqr(scalar(1) - alpha));
00038         */
00039 
00040         beta = scalar(1) - alpha;
00041     }
00042 
00043     Info<< "Dispersed phase volume fraction = "
00044         << alpha.weightedAverage(mesh.V()).value()
00045         << "  Min(alpha) = " << min(alpha).value()
00046         << "  Max(alpha) = " << max(alpha).value()
00047         << endl;
00048 }
00049 
00050 rho = alpha*rhoa + beta*rhob;
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines