- **OpenFOAM Pre-Processing**
(*http://www.cfd-online.com/Forums/openfoam-pre-processing/*)

- - **DivphiU expression in incompressible solvers**
(*http://www.cfd-online.com/Forums/openfoam-pre-processing/62243-divphiu-expression-incompressible-solvers.html*)

In OpenFoam, the term (U . Ñ)UIn OpenFoam, the term (U . Ñ)U in N-S 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 U-110 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 |

U & fvc::grad(U)) wouldn't be 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 |

if the term (UÂ•Ñ)U could be nif the term (UÂ•Ñ)U could be non-conservative, 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" ? |

You can do whatever you like, 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 |

it is really nice of you to anit is really nice of you to anwer my question.
Yes, it is of some fun, but as well as *&^%#@ http://www.cfd-online.com/OpenFOAM_D...part/happy.gif 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. |

sorry. it should be
+sorry. it should be
<a,Ñb> + <Ñb,a> Exactly, I wanna solve U <u',Ñu> + <Ñu,u'> |

at first, I thought your transat 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 P-28 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 |

if so, then i can come to the 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.cfd-online.com/OpenFOAM_D...tml?1132700141 |

All times are GMT -4. The time now is 04:46. |