CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Discretization (https://www.cfd-online.com/Forums/openfoam/92225-discretization.html)

 hawkeye321 September 6, 2011 19:29

Discretization

Hi Guys

As you all may know, the form of the discretized momentum equation that have been used in OpenFOAM's icoFoam solver is based on the general Scalar Transport equation which has term "del.(U Phi)" and has been discretized in the following way

"fvm :: div(phi, U)"

My question is that how can I discretize it based on familar N.S. equation form which includes U.del(Phi).

I tried "U & (fvc::grad(phi))" but it produced the follwoing error

"no match for ‘operator&’ in ‘Foam::operator+(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam::DimensionedField<Type, Foam::volMesh>&)"

 chegdan September 7, 2011 17:30

Quote:
 Originally Posted by mahdiiowa (Post 323204) Hi Guys As you all may know, the form of the discretized momentum equation that have been used in OpenFOAM's icoFoam solver is based on the general Scalar Transport equation which has term "del.(U Phi)" and has been discretized in the following way "fvm :: div(phi, U)" My question is that how can I discretize it based on familar N.S. equation form which includes U.del(Phi). I tried "U & (fvc::grad(phi))" but it produced the follwoing error "no match for ‘operator&’ in ‘Foam::operator+(const Foam::tmp >&, const Foam::DimensionedField&)" I would appriciate your commments.
div(phi,U) is actually your div(UU) term in the NS equation. As you probably know already:

div(UU) = U & grad(U) + U*div(U)

for incompressible flow at a low residual...div(U) goes to zero and