eEqn.H 1.01 KB
Newer Older
1 2 3
{
    tmp<volScalarField> tcp(thermo->Cp());
    const volScalarField& cp = tcp();
4
    rhoCp = rho*cp;
5 6 7

    kappaEff = thermo->kappa() + rho*cp*turbulence->nut()/Prt;

8
    pDivU = dimensionedScalar("pDivU", p.dimensions()/dimTime, Zero);
9 10 11 12 13 14

    if (thermo->pDivU())
    {
        pDivU = (p*fvc::div(rhoPhi/fvc::interpolate(rho)));
    }

15 16 17 18 19 20 21 22 23
    const surfaceScalarField rhoCpPhi(fvc::interpolate(cp)*rhoPhi);

    Pair<tmp<volScalarField>> vDotAlphal = mixture->mDot();

    const volScalarField& vDotcAlphal = vDotAlphal[0]();
    const volScalarField& vDotvAlphal = vDotAlphal[1]();
    const volScalarField vDotvmcAlphal(vDotvAlphal - vDotcAlphal);

    fvScalarMatrix TEqn
24
    (
25 26 27 28 29 30
         fvm::ddt(rhoCp, T)
       + fvm::div(rhoCpPhi, T, "div(rhoCpPhi,T)")
       - fvm::Sp(fvc::ddt(rhoCp) + fvc::div(rhoCpPhi), T)
       - fvm::laplacian(kappaEff, T)
       + thermo->hc()*vDotvmcAlphal
       + pDivU
31 32
    );

33 34
    TEqn.relax();
    TEqn.solve();
35 36 37 38

    Info<< "min/max(T) = " << min(T).value() << ", "
        << max(T).value() <<endl;
}