# rhoCentralFoam: making sense of the diffusive corrector equation for energy

 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 13, 2013, 04:22 rhoCentralFoam: making sense of the diffusive corrector equation for energy #1 New Member   Tatu Pinomaa Join Date: Oct 2012 Location: Finland Posts: 16 Rep Power: 13 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

 February 13, 2013, 05:21 #2 Member   Alexander Join Date: Mar 2009 Posts: 49 Rep Power: 17 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)

February 13, 2013, 06:20
#3
New Member

Tatu Pinomaa
Join Date: Oct 2012
Location: Finland
Posts: 16
Rep Power: 13

Quote:
 Originally Posted by sahas 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

February 13, 2013, 07:21
#4
Member

Alexander
Join Date: Mar 2009
Posts: 49
Rep Power: 17
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.

 February 13, 2013, 07:30 #5 Member   Alexander Join Date: Mar 2009 Posts: 49 Rep Power: 17 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

 February 19, 2013, 08:19 #6 New Member   Tatu Pinomaa Join Date: Oct 2012 Location: Finland Posts: 16 Rep Power: 13 I reported the issue with the last two terms as a bug http://www.openfoam.org/mantisbt/view.php?id=751