CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Diffusion term in OpenFOAM (https://www.cfd-online.com/Forums/openfoam-programming-development/124403-diffusion-term-openfoam.html)

 MatzeS October 4, 2013 08:00

Diffusion term in OpenFOAM

Hello,

checking the term turbulence->divDevReff(U) I came up with the following question:

The diffusion term for incompressible flows should look somehow like this (here, I ignored the viscosity):
And this can be transformed to this:
fvc::laplacian(U)
But when I implement that into OpenFOAM, those terms give different results. I assume it is connected to the discretization schemes, but even when I use linear for all schemes, it gives me different results.
So, what do I do wrong? What do I miss? Is it because of wall-functions or boundary conditions?
Any comment is appreciated...

Regards,
Matze

 jherb February 12, 2014 10:23

I think this wiki page might explain what is going on here:
http://openfoamwiki.net/index.php/Bu...DevReff.28U.29

Also have a look at this thread (the difference between compressible and incompressible models goes away if the continuity equation is fulfilled after convergence of the solution):
http://www.cfd-online.com/Forums/ope...ivdevreff.html

 Bernhard February 12, 2014 10:43

Quote:
 Originally Posted by MatzeS (Post 455031) Hello, checking the term turbulence->divDevReff(U) I came up with the following question: The diffusion term for incompressible flows should look somehow like this (here, I ignored the viscosity): fvc::div(fvc::grad(U)+fvc::grad(U)().T()) And this can be transformed to this: fvc::laplacian(U) But when I implement that into OpenFOAM, those terms give different results. I assume it is connected to the discretization schemes, but even when I use linear for all schemes, it gives me different results. So, what do I do wrong? What do I miss? Is it because of wall-functions or boundary conditions? Any comment is appreciated... Regards, Matze
You ignored viscosity in your derivation. The turbulent viscosity is not constant, so you can't pull it through the differential.

 MatzeS February 12, 2014 10:55

Hello,