
[Sponsors] 
Convectional term fvm::Sp(fvc::div(phi_), epsilon_) in RNGkEpsilon OF 1.7.1 missing 

LinkBack  Thread Tools  Display Modes 
May 25, 2011, 11:56 
Convectional term fvm::Sp(fvc::div(phi_), epsilon_) in RNGkEpsilon OF 1.7.1 missing

#1 
Senior Member

Hi!
I have a quistion: why this terms are missing in RNGkEpsilon model in epsilon and k equations? Code:
fvm::ddt(epsilon_) + fvm::div(phi_, epsilon_)  fvm::Sp(fvc::div(phi_), epsilon_)  fvm::laplacian(DepsilonEff(), epsilon_) ... fvm::ddt(k_) + fvm::div(phi_, k_)  fvm::Sp(fvc::div(phi_), k_)  fvm::laplacian(DkEff(), k_) the Code:
+ fvm::SuSp(fvc::div(phi_), epsilon_) ... + fvm::SuSp(fvc::div(phi_), k_) Only one remark: why there is no such treatment for kEpsilon model in OF1.6ext (in kEpsilon.C)? BTW the residuals normalization used now in OF is not appropriated, because it is connected with the source term and for the turbulent transport equations produces underestimated residuals level. Regards, Alexander
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at 

May 26, 2011, 02:35 

#2  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,904
Rep Power: 27 
Quote:
It seems you are trying to treat the convective term in nonconservative form (why?). If you think to: div(kU) = U . grad(k) + k div(U), you are discretizing U . grad(k), since you have the full convective term in conservative form at the line fvm::div(phi_, epsilon_) Best,
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. Last edited by alberto; May 26, 2011 at 10:08. 

May 26, 2011, 05:14 

#3 
Senior Member

... I ask because IT IS, for example, in realizableKE (incompressible) in OF 1.7.1:
Code:
// Dissipation equation tmp<fvScalarMatrix> epsEqn ( fvm::ddt(epsilon_) + fvm::div(phi_, epsilon_)  fvm::Sp(fvc::div(phi_), epsilon_)  fvm::laplacian(DepsilonEff(), epsilon_) == C1*magS*epsilon_  fvm::Sp ( C2_*epsilon_/(k_ + sqrt(nu()*epsilon_)), epsilon_ ) ); ... // Turbulent kinetic energy equation tmp<fvScalarMatrix> kEqn ( fvm::ddt(k_) + fvm::div(phi_, k_)  fvm::Sp(fvc::div(phi_), k_)  fvm::laplacian(DkEff(), k_) == G  fvm::Sp(epsilon_/k_, k_) ); Heh..., it is funny, the flux phi is divergence free... So why is it included? div(UK) k = U grad(k) + k div(U) = U grad(k) for incompressible liquid. That is well known transition between conservative and nonconservatives forms of the convectional term. Alberto, I am sorry, but would you be kind to clarify: is convectional term in RNG somehow different from those in standard and realizable kepsilon? And are you tallking about 1.7.x, which is not 1.7.1? Do you mean some development version?
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at 

May 26, 2011, 05:36 

#4 
Senior Member

So I agree with Alberto,
that U*grad(k) or U*grad(epsilon) or U*grad(omega) are discretized. Hmm..., why? Is it some error? For example, standard kepsilon, transport of kinetic energy is: dk/dt + div(U K) = div(D_k grad(k)) + G  epsilon There is no terms, from which we can get U*grad(k). Any comments? To avoid missunderstanding: I am not trying to put "div(U*k)  k*div(U) = U*grad(k)" in the OF source code, it is all already there))) I only noticed the difference between approaches how convectional term is discretized in RNGkEpsilon.C and in other incompressible RAS models. I recognized it while modifying RAS models for my solidification part.
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at Last edited by makaveli_lcf; May 26, 2011 at 09:49. Reason: To clarify the question. 

May 26, 2011, 10:15 

#5  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,904
Rep Power: 27 
Hi,
Quote:
As a consequence, they are implementing U . grad(k) = div(U, k)  k div(U), to avoid using U & grad(k), and use the conservative flux. What is not clear to me is why not implementing directly div(phi, k), as in the original equation from the literature?
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

May 26, 2011, 11:04 

#6 
Senior Member

Sometimes for the discretization (e.g. for the finite differences method) it is easier to use nonconservative form of the convectional term
div(U*k) = k*div(U)+U & grad(k) But here we get the wrong term. So I will try direct conservative form and compare the results.
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at 

May 26, 2011, 11:25 

#7  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,904
Rep Power: 27 
Quote:
Quote:
div(U*k) = U & grad(k) if div(U) = 0. Now, since numerically it is not exactly zero, they probably enforce the "incompressible form" by using the term U & grad(k) = div(U*k)  k*div(U) This in OpenFOAM becomes fmv::div(phi, k)  fvm::Sp(fvc::div(phi), k), since using phi and not U does not introduce errors, being phi corrected to enforce conservation after solving for p.
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. Last edited by alberto; May 26, 2011 at 11:28. Reason: typo and note 

May 26, 2011, 16:14 

#8 
Senior Member

Alberto, thanks! I got it:
Code:
U = U* + delta U* = U  delta U*  exact solution, delta  error vector div(U*) = 0 (1) div(U) = div(U*) + div(delta) = div(delta) (2) Code:
div(U*.k) = U*&grad(k) Code:
Err1 = div(U.k)  U*&grad(k) = k.div(U*) + U*&grad(k) + k.div(delta) + delta&grad(k)  U*&grad(k) Code:
Err1 = k.div(delta) + delta&grad(k) = k.div(U) + delta&grad(k) div(U.k)  k.div(U) we reduce the calculation error to the delta&grad(k) ))) I am curious, does it worth to use such approach for other scalar equations? E.g. for heat transfer... It would be really nice to here some comment from developers, why they decided to use this method for the turbulence modeling?
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at 

July 19, 2012, 11:53 

#9 
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 13 
I have the same questions, I feel very confused:
1. Is using "fvm::SuSp(fvc::div(phi_), epsilon_)" better using " fvm::Sp(fvc::div(phi_), epsilon_)"? 2. For other transport equations, should we use this approach? Why it is commented out from RNG kepsilon?
__________________
~ Daniel WEI  Boeing Research & Technology  China Beijing, China 

July 20, 2012, 03:24 

#10 
Senior Member

Hi Daniel!
1. Using SuSp operator is to increase matrix diagonal influence. With Sp operator it goes always to the diagonal and can reduce diagonal elements which makes its solution more problematic for the linear solver. 2. If you check OpenFOAMext such approach is used in all RANS model (*reffering to the source code.... yap! it's there!). I am just using it for RANS models and for energy equation as well. But I did not make any test if it is better for the scalar equation in general. Let's do it! What are your suggestions for the benchmark? It should be some simple case...
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben FranzJosefStr. 18 A  8700 Leoben Österreich / Austria Tel.: +43 3842  402  3125 http://smmp.unileoben.ac.at 

July 20, 2012, 11:06 

#12 
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 13 
Hmm, Two more questions,
1. When to use source term explicitly and when shall one use it implicitly using Sp or Susp? 2. In ke formulation, why epsilon is solved first instead of k? Thanks
__________________
~ Daniel WEI  Boeing Research & Technology  China Beijing, China 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
SimpleFoam k and epsilon bounded  nedved  OpenFOAM Running, Solving & CFD  13  November 4, 2013 15:13 
Missing Term in RASModels  ngj  OpenFOAM Bugs  17  February 29, 2012 08:05 
ATTENTION! Reliability problems in CFX 5.7  Joseph  CFX  14  April 20, 2010 15:45 
SimpleFoam k and epsilon bounded  nedved  OpenFOAM Running, Solving & CFD  1  November 25, 2008 21:21 
bouyancy term in epsilon equation  Michael  Main CFD Forum  1  June 25, 1999 10:20 