CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

rhoCentralFoam: making sense of the diffusive corrector equation for energy

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2013, 04:22
Default 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
tatu is on a distinguished road
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
tatu is offline   Reply With Quote

Old   February 13, 2013, 05:21
Default
  #2
Member
 
Alexander
Join Date: Mar 2009
Posts: 49
Rep Power: 17
sahas is on a distinguished road
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)
sahas is offline   Reply With Quote

Old   February 13, 2013, 06:20
Default
  #3
New Member
 
Tatu Pinomaa
Join Date: Oct 2012
Location: Finland
Posts: 16
Rep Power: 13
tatu is on a distinguished road
Thanks for the reply!

Quote:
Originally Posted by sahas View Post
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
tatu is offline   Reply With Quote

Old   February 13, 2013, 07:21
Default
  #4
Member
 
Alexander
Join Date: Mar 2009
Posts: 49
Rep Power: 17
sahas is on a distinguished road
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 is offline   Reply With Quote

Old   February 13, 2013, 07:30
Default
  #5
Member
 
Alexander
Join Date: Mar 2009
Posts: 49
Rep Power: 17
sahas is on a distinguished road
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
sahas is offline   Reply With Quote

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

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 10:57
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 02:53.