
[Sponsors] 
rhoCentralFoam: making sense of the diffusive corrector equation for energy 

LinkBack  Thread Tools  Display Modes 
February 13, 2013, 05: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: 7 
Hello!
I'm puzzled with the diffusive corrector equation for energy in rhoCentralFoam, found on lines 232238 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 ); Code:
+ fvc::laplacian(turbulence>alpha(), e) // laminar heat diffusion  fvc::laplacian(k, T) // effective heat diffusion calculated with T Tatu 

February 13, 2013, 06:21 

#2 
Member
Alexander
Join Date: Mar 2009
Posts: 48
Rep Power: 10 
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, 07:20 

#3  
New Member
Tatu Pinomaa
Join Date: Oct 2012
Location: Finland
Posts: 16
Rep Power: 7 
Thanks for the reply!
Quote:
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:
Code:
volScalarField k("k", thermo.Cp()*muEff/Pr); So do you mean I should use mut instead of muEff, i.e. Code:
volScalarField k("k", thermo.Cp()*mut/Pr); 

February 13, 2013, 08:21 

#4  
Member
Alexander
Join Date: Mar 2009
Posts: 48
Rep Power: 10 
Quote:
Quote:
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, 08:30 

#5 
Member
Alexander
Join Date: Mar 2009
Posts: 48
Rep Power: 10 
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, 09:19 

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

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
swak4foam building problem  GGerber  OpenFOAM Installation  54  April 24, 2015 16:02 
Error bulding swak4Foam  sfigato  OpenFOAM Installation  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 20:08 
DecomposePar links against liblamso0 with OpenMPI  jens_klostermann  OpenFOAM Bugs  11  June 28, 2007 17:51 