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

kEpsilon.H

Go to the documentation of this file.
00001 if(turbulence)
00002 {
00003     if (mesh.changing())
00004     {
00005         y.correct();
00006     }
00007 
00008     tmp<volTensorField> tgradUb = fvc::grad(Ub);
00009     volScalarField G = 2*nutb*(tgradUb() && dev(symm(tgradUb())));
00010     tgradUb.clear();
00011 
00012     #include "wallFunctions.H"
00013 
00014     // Dissipation equation
00015     fvScalarMatrix epsEqn
00016     (
00017         fvm::ddt(beta, epsilon)
00018       + fvm::div(phib, epsilon)
00019       - fvm::laplacian
00020         (
00021             alphaEps*nuEffb, epsilon,
00022             "laplacian(DepsilonEff,epsilon)"
00023         )
00024       ==
00025          C1*beta*G*epsilon/k
00026        - fvm::Sp(C2*beta*epsilon/k, epsilon)
00027     );
00028 
00029     #include "wallDissipation.H"
00030 
00031     epsEqn.relax();
00032     epsEqn.solve();
00033 
00034     epsilon.max(dimensionedScalar("zero", epsilon.dimensions(), 1.0e-15));
00035 
00036 
00037     // Turbulent kinetic energy equation
00038     fvScalarMatrix kEqn
00039     (
00040         fvm::ddt(beta, k)
00041       + fvm::div(phib, k)
00042       - fvm::laplacian
00043         (
00044             alphak*nuEffb, k,
00045             "laplacian(DkEff,k)"
00046         )
00047       ==
00048         beta*G
00049       - fvm::Sp(beta*epsilon/k, k)
00050     );
00051     kEqn.relax();
00052     kEqn.solve();
00053 
00054     k.max(dimensionedScalar("zero", k.dimensions(), 1.0e-8));
00055 
00056     //- Re-calculate turbulence viscosity
00057     nutb = Cmu*sqr(k)/epsilon;
00058 
00059     #include "wallViscosity.H"
00060 }
00061 
00062 nuEffa = sqr(Ct)*nutb + nua;
00063 nuEffb = nutb + nub;
00064 
00065 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines