CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   rhoCentralFoam: making sense of the diffusive corrector equation for energy (http://www.cfd-online.com/Forums/openfoam-solving/113133-rhocentralfoam-making-sense-diffusive-corrector-equation-energy.html)

 tatu February 13, 2013 05:22

rhoCentralFoam: making sense of the diffusive corrector equation for energy

Hello!

I'm puzzled with the diffusive corrector equation for energy in rhoCentralFoam, found on lines 232-238 in rhoCentralFoam.C. If I understood correctly, the effect of viscous stress tensor, T, is included completely in the predictor equation in line 217, representing the div(T.u) term. Therefore only the contribution of effective heat diffusion is left for the corrector equation. To me it would make more sense to make the corrector equation to be simply
Code:

solve
(
fvm::ddt(rho, e) - fvc::ddt(rho, e)
- fvm::laplacian(turbulence->alphaEff(), e) // effective heat diffusion
);

The last two terms in the corrector equation:
Code:

+ fvc::laplacian(turbulence->alpha(), e) // laminar heat diffusion

- fvc::laplacian(k, T)  // effective heat diffusion calculated with T

Why are these two terms used? The latter term describes the effective (laminar + turbulent) heat diffusion according to temperature T. Also, why is then the diffusion coefficient alpha in the former term, and not alphaEff?

Tatu

 sahas February 13, 2013 06:21

As far as I understand in energy equation diffusive term should have T (not e). But for calculation stabilization it is necessary to include diffusive term while solving equation. Since the equation is solving for e, diffusive term should include e so the term fvm::laplacian(turbulence->alphaEff(), e) is appeared. In corrector step one should replace that term with the right one fvc::laplacian(k, T).

About alpha and alphaEff - I do not know why they are different. May be this is an error? In laminar case it is not essential (alpha==alphaEff)
Or more probable: k is "laminar" diffusive coefficient (heat conductivity). alphaEff = alpha + alpha_turb, alpha ~ k/Cv (e=Cv*T). So alphaEff - alpha = alpha_turb. Seemingly for turbulent case it is not so important: use laplacian(alpha_turb, e) or laplacian(k_turb,T) whereas in laminar case it can be significant (when Cv is not constant as I see)

 tatu February 13, 2013 07:20

Quote:
 Originally Posted by sahas (Post 407577) As far as I understand in energy equation diffusive term should have T (not e). But for calculation stabilization it is necessary to include diffusive term while solving equation. Since the equation is solving for e, diffusive term should include e so the term fvm::laplacian(turbulence->alphaEff(), e) is appeared. In corrector step one should replace that term with the right one fvc::laplacian(k, T).
Lets see if I understood this correctly:
In principle, e is able to describe diffusivity as well as T (because e=Cv*T in a "fully converged" solution). The three last terms in the corrector equation are used then to make e and T consistent with each other, so that e --> Cv*T?

Quote:
 Or more probable: k is "laminar" diffusive coefficient (heat conductivity). alphaEff = alpha + alpha_turb, alpha ~ k/Cv (e=Cv*T).
In rhoCentralFoam.C, k is defined as
Code:

volScalarField k("k", thermo.Cp()*muEff/Pr);
so k is the effective (turbulent + laminar) diffusive coefficient, not the laminar, right?
So do you mean I should use mut instead of muEff, i.e.

Code:

volScalarField k("k", thermo.Cp()*mut/Pr);
Tatu

 sahas February 13, 2013 08:21

Quote:
 Lets see if I understood this correctly: In principle, e is able to describe diffusivity as well as T (because e=Cv*T in a "fully converged" solution). The three last terms in the corrector equation are used then to make e and T consistent with each other, so that e --> Cv*T?
I think you are right. It is need to look more deeply in the problem for me :)

Quote:
 so k is the effective (turbulent + laminar) diffusive coefficient, not the laminar, right?
Yes, you are right again. I have not looked in the code for long time ago and I've forgotten something.

muEff = mu + mut, so k is k_turb + k. Thus my second suggestion about alpha and alphaEff is not true. So one should look in code for the definition of alpha and alphaEff.

 sahas February 13, 2013 08:30

By the way k_turb should be Cp*mut/Pr_turb where Pr_turb is usually 0.9. So definition of k as Cp*muEff/Pr is wrong

 tatu February 19, 2013 09:19

I reported the issue with the last two terms as a bug
http://www.openfoam.org/mantisbt/view.php?id=751

 All times are GMT -4. The time now is 12:31.