
[Sponsors] 
November 15, 2005, 11:26 
In OpenFoam, the term (U . Ñ)U

#1 
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 10 
In OpenFoam, the term (U . Ñ)U in NS equation is expressed as div(phi,U),where phi is ï»¿surfaceScalarField, and phi = ï»¿linearInterpolate(Uo) & mesh.Sf(). I don't understand this.
I think it can also expressed as U . ÑU, (inner product),which in OpenFoam is ï»¿U & fvc::grad(U)).(why not in this way?) in OpenFoam, div(phi,U) is said to mean Ñ . (UU), and flux f=U see User Guide U110 createPhi.H ï»¿#ifndef createPhi_H #define createPhi_H // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "Reading/calculating face flux field phi\n" << endl; surfaceScalarField phi ( IOobject ( "phi", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), linearInterpolate(U) & mesh.Sf() ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif 

November 15, 2005, 12:29 
U & fvc::grad(U)) wouldn't be

#2 
Senior Member
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 10 
U & fvc::grad(U)) wouldn't be conservative. The FVM for all transport equations is to discretise
div(phi q) where q is the unknown variable  could be k, epsilon, temperature, whatever... or in this case any of the components of the velocity. Applying Gauss theorem to the cell converts this into a sum of the fluxes through the faces of the cell, which is what ensures conservation. Of course you do need to get the flux from somewhere, which is what the interpolation is there for. It is a bit difficult to grasp at first, but we do need to make a distinction between velocity and flux. This is standard practice in FV CFD codes. not just FOAM. Have a look at a textbook in the area (my favourite is Versteeg + Malalasekera) Gavin 

November 23, 2005, 06:50 
if the term (UÂ•Ñ)U could be n

#3 
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 10 
if the term (UÂ•Ñ)U could be nonconservative, mathematically, put the physical meaning aside, is it ok to use U & fvc::grad(U))?
or will it cause a inconvergent solution when using the solver, like the residual very large, even "nan" ? 

November 23, 2005, 10:59 
You can do whatever you like,

#4 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,806
Rep Power: 25 
You can do whatever you like, but the
U & fvc::grad(U) will be explicit, with the appropriate effects on stability, convergence etc. I would go for div(U U)  U div(U) which is the same as U & grad(U) but can be made implicit in both terms (or course, you need to write this in the FOAM language. Mind the fluxes, etc.) :) Have fun, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

November 24, 2005, 08:09 
it is really nice of you to an

#5 
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 10 
it is really nice of you to anwer my question.
Yes, it is of some fun, but as well as *&^%#@ I would not think of expressing the term in div()terms, and also difficult for me to transform in this way. I want to ask further: 2 vectors : a, b Could you give me suggestion what is the proper way to express <a,Ñb> + <b,Ña> ? Thanks again. 

November 25, 2005, 09:46 
at first, I thought your trans

#7 
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 10 
at first, I thought your transformation
U & fvc::grad(U) = div(U U)  U div(U) is wrong. later i think there is a mistake in Programmer's Guide, page P28 equation (2.5) should it be : dTij/dxj ? dT11/dx1 + dT12/dx2 + dT13/dx3 dT21/dx1 + dT22/dx2 + dT23/dx3 dT31/dx1 + dT32/dx2 + dT33/dx3 

November 25, 2005, 10:14 
if so, then i can come to the

#8 
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 10 
if so, then i can come to the conclusion :
(U'Â•Ñ)U = ÑÂ•(U U') = U'Â•(ÑU) Then, (U'Â•Ñ)U = fvm::div(phi, U') is that right? http://www.cfdonline.com/OpenFOAM_D...tml?1132700141 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Pressure force calculation in incompressible solvers  philippose  OpenFOAM Running, Solving & CFD  8  August 26, 2015 10:57 
Incompressible vs compressible solvers  James  Main CFD Forum  5  January 19, 2009 06:15 
SonicFoam divphiU  dimi  OpenFOAM Running, Solving & CFD  3  June 25, 2007 05:47 
NSincompressible and compressible flow solvers  ag  Main CFD Forum  2  September 27, 2005 06:18 
CEL expression  Henry  CFX  2  August 7, 2004 12:16 