
[Sponsors] 
June 14, 2013, 18:13 
Difference between UEqn in sonicFoam & Theory

#1 
Senior Member
Sasan Ghomi
Join Date: Sep 2012
Location: Iran  Tehran
Posts: 186
Rep Power: 7 
Hi Foamers ,
I found a difference between UEqn in sonicFoam and Ferziger's book (Computational Methods for fluid Dynamics ). In the code for UEqn in sonicFoam we have : Code:
fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) + turbulence>divDevRhoReff(U) ); solve(UEqn == fvc::grad(p)); But in the Ferziger's book (generally in theory) there is another equation : The last term in two equations are different . Please guide me that what is the origin of this difference ? And please correct me if I am wrong. I appreciate any help from you. Thanks and best regards, Sasan. Last edited by sasanghomi; June 27, 2013 at 03:42. 

June 26, 2013, 09:20 

#2 
Member
Valentin Wibaut
Join Date: Oct 2012
Posts: 45
Rep Power: 6 
Your ferziger's equation comes from incompressible theory, no? You haven't any term
dui/dxi 

June 26, 2013, 11:25 

#3 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,210
Rep Power: 20 
I think so
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. 

June 27, 2013, 01:34 

#4 
Member

Dear sasanghomi,
I found the same incongruence some time ago. I think that is a bug, but if you have some time you can review the Code:
divDevRhoReff is missing Best regards. Felipe G.
__________________
Felipe G 

June 27, 2013, 02:54 

#5  
Member
Valentin Wibaut
Join Date: Oct 2012
Posts: 45
Rep Power: 6 
Quote:
The term with 2/3 rho k is present in the equation. It is taken into account in the pressure (in the equation p = ps + 2/3 rho k). The results you have, after simulations, give you a pressure wich contains the real pressure and turbulent kinetic energy. 

June 27, 2013, 03:09 

#6 
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 11 
Hi,
have a closer look at the function: divDevRhoReff and you will find your "missing" term Regards, Christian 

June 27, 2013, 03:48 

#7 
Member

Hi to all,
Can you say me the OF version ? because at least in OF1.7.0 I can't find this term. http://www.cfdonline.com/Forums/ope...sonicfoam.html Maybe I looked in a wrong location in the code. sonicFoam pressure equation. Code:
rho = thermo.rho(); volScalarField rUA = 1.0/UEqn.A(); U = rUA*UEqn.H(); surfaceScalarField phid ( "phid", fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi) ) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix pEqn ( fvm::ddt(psi, p) + fvm::div(phid, p)  fvm::laplacian(rho*rUA, p) ); pEqn.solve(); if (nonOrth == nNonOrthCorr) { phi = pEqn.flux(); } } #include "rhoEqn.H" #include "compressibleContinuityErrs.H" Code:
tmp<fvVectorMatrix> kEpsilon::divDevRhoReff(volVectorField& U) const { return (  fvm::laplacian(muEff(), U)  fvc::div(muEff()*dev2(fvc::grad(U)().T())) ); } Best regards.
__________________
Felipe G 

June 27, 2013, 03:50 

#8 
Senior Member
Sasan Ghomi
Join Date: Sep 2012
Location: Iran  Tehran
Posts: 186
Rep Power: 7 

June 27, 2013, 03:56 

#9  
Senior Member
Sasan Ghomi
Join Date: Sep 2012
Location: Iran  Tehran
Posts: 186
Rep Power: 7 
Quote:
Which file have this equation for pressure ? Can you explain more and clarify the issue ? Thanks and best regards, Sasan. 

June 27, 2013, 04:12 

#10 
Member
Valentin Wibaut
Join Date: Oct 2012
Posts: 45
Rep Power: 6 
You will not find this term because it is into the pressure term. More clearly, the pressure in your equation isn't the real pressure. It is the real pressure+ 2/3 rho k.
But it is close to the real pressure because k << p 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
A question about UEqn sonicFoam  lfgmarc  OpenFOAM Programming & Development  6  February 1, 2015 17:49 
sonicFoam not matching shock theory  Alan  OpenFOAM Running, Solving & CFD  15  June 27, 2013 07:10 
Source term problem in UEqn of simpleFoam  fisch  OpenFOAM Programming & Development  1  June 17, 2011 10:57 
Difference between codes and representations  titio  OpenFOAM Running, Solving & CFD  3  July 3, 2009 07:58 
energy in sonicFoam  joern  OpenFOAM Running, Solving & CFD  0  June 16, 2009 15:53 