Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / multiphase / settlingFoam / kEpsilon.H
blob67dbfc7b5069a3a5f170a0533e571a217adc078f
1 if(turbulence)
3     if (mesh.changing())
4     {
5         y.correct();
6     }
8     dimensionedScalar k0("k0", k.dimensions(), SMALL);
9     dimensionedScalar epsilon0("epsilon0", epsilon.dimensions(), SMALL);
11     volScalarField divU = fvc::div(phi/fvc::interpolate(rho));
13     tmp<volTensorField> tgradU = fvc::grad(U);
14     volScalarField G = 2*mut*(tgradU() && dev(symm(tgradU())));
15     tgradU.clear();
17     volScalarField Gcoef =
18         alphak*Cmu*k*(g & fvc::grad(rho))/(epsilon + epsilon0);
20 #   include "wallFunctions.H"
22     // Dissipation equation
23     fvScalarMatrix epsEqn
24     (
25         fvm::ddt(rho, epsilon)
26       + fvm::div(phi, epsilon)
27       - fvm::laplacian
28         (
29             alphaEps*mut + mul, epsilon,
30             "laplacian(DepsilonEff,epsilon)"
31         )
32      ==
33         C1*G*epsilon/k
34       - fvm::SuSp(C1*(1.0 - C3)*Gcoef + (2.0/3.0*C1)*rho*divU, epsilon)
35       - fvm::Sp(C2*rho*epsilon/k, epsilon)
36     );
38 #   include "wallDissipation.H"
40     epsEqn.relax();
41     epsEqn.solve();
43     bound(epsilon, epsilon0);
46     // Turbulent kinetic energy equation
48     solve
49     (
50         fvm::ddt(rho, k)
51       + fvm::div(phi, k)
52       - fvm::laplacian(alphak*mut + mul, k, "laplacian(DkEff,k)")
53      ==
54         G
55       - fvm::SuSp(Gcoef + 2.0/3.0*rho*divU, k)
56       - fvm::Sp(rho*epsilon/k, k)
57     );
59     bound(k, k0);
62     //- Re-calculate viscosity
63     mut = rho*Cmu*sqr(k)/(epsilon + epsilon0);
65 #   include "wallViscosity.H"
68 mu = mut + mul;