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

UEqns.H

Go to the documentation of this file.
00001 fvVectorMatrix UaEqn(Ua, Ua.dimensions()*dimVol/dimTime);
00002 fvVectorMatrix UbEqn(Ub, Ub.dimensions()*dimVol/dimTime);
00003 
00004 {
00005     volTensorField Rca = -nuEffa*(fvc::grad(Ua)().T());
00006     Rca = Rca + (2.0/3.0)*sqr(Ct)*I*k - (2.0/3.0)*I*tr(Rca);
00007 
00008     surfaceScalarField phiRa =
00009       - fvc::interpolate(nuEffa)
00010        *mesh.magSf()*fvc::snGrad(alpha)/fvc::interpolate(alpha + scalar(0.001));
00011 
00012     UaEqn =
00013     (
00014         (scalar(1) + Cvm*rhob*beta/rhoa)*
00015         (
00016             fvm::ddt(Ua)
00017           + fvm::div(phia, Ua, "div(phia,Ua)")
00018           - fvm::Sp(fvc::div(phia), Ua)
00019         )
00020 
00021       - fvm::laplacian(nuEffa, Ua)
00022       + fvc::div(Rca)
00023 
00024       + fvm::div(phiRa, Ua, "div(phia,Ua)")
00025       - fvm::Sp(fvc::div(phiRa), Ua)
00026       + (fvc::grad(alpha)/(fvc::average(alpha) + scalar(0.001)) & Rca)
00027      ==
00028     //  g                        // Buoyancy term transfered to p-equation
00029       - fvm::Sp(beta/rhoa*dragCoef, Ua)
00030     //+ beta/rhoa*dragCoef*Ub    // Explicit drag transfered to p-equation
00031       - beta/rhoa*(liftCoeff - Cvm*rhob*DDtUb)
00032     );
00033 
00034     UaEqn.relax();
00035 
00036 
00037     volTensorField Rcb = -nuEffb*fvc::grad(Ub)().T();
00038     Rcb = Rcb + (2.0/3.0)*I*k - (2.0/3.0)*I*tr(Rcb);
00039 
00040     surfaceScalarField phiRb =
00041        - fvc::interpolate(nuEffb)
00042         *mesh.magSf()*fvc::snGrad(beta)/fvc::interpolate(beta + scalar(0.001));
00043 
00044     UbEqn = 
00045     (
00046         (scalar(1) + Cvm*rhob*alpha/rhob)*
00047         (
00048             fvm::ddt(Ub)
00049           + fvm::div(phib, Ub, "div(phib,Ub)")
00050           - fvm::Sp(fvc::div(phib), Ub)
00051         )
00052 
00053       - fvm::laplacian(nuEffb, Ub)
00054       + fvc::div(Rcb)
00055 
00056       + fvm::div(phiRb, Ub, "div(phib,Ub)")
00057       - fvm::Sp(fvc::div(phiRb), Ub)
00058 
00059       + (fvc::grad(beta)/(fvc::average(beta) + scalar(0.001)) & Rcb)
00060      ==
00061     //  g                        // Buoyancy term transfered to p-equation
00062       - fvm::Sp(alpha/rhob*dragCoef, Ub)
00063     //+ alpha/rhob*dragCoef*Ua   // Explicit drag transfered to p-equation
00064       + alpha/rhob*(liftCoeff + Cvm*rhob*DDtUa)
00065     );
00066 
00067     UbEqn.relax();
00068 }
00069 
00070 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines