CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Confirmation needed about calculation of divergence (http://www.cfd-online.com/Forums/openfoam-post-processing/77034-confirmation-needed-about-calculation-divergence.html)

Pascal_doran June 10, 2010 18:55

Confirmation needed about calculation of divergence
 
Hi all,

I created an post processing utility to calculate the divergence of U. I started with the 'vorticity' utility and just changed curl(U) for div(U). Then I compile it without problem.

But when I run the utility I got :

Code:

keyword div(U) is undefined in dictionary "/home/ag74290/OpenFOAM/ag74290-1.6.x/run/test/system/fvSchemes::divSchemes"
So I add the fellowing line div(U) Gauss linear to:

Code:

divSchemes
{
    default        none;
    div(phi,U)      Gauss linear;
    div(U)          Gauss linear;
}

in the /home/ag74290/OpenFOAM/ag74290-1.6.x/run/test/system/fvSchemes file and everything seems to work.

My question: Why do I need to add this line in the fvScheme file?

Thank you,

Pascal

niklas June 11, 2010 02:41

Quote:

Originally Posted by Pascal_doran (Post 262534)
Hi all,
My question: Why do I need to add this line in the fvScheme file?

The div-operator needs a discretization-scheme (all operators do) and this is not
decided until you actually use it.

So when you call on any operator, it first looks for which scheme to use and then calculate the result.

N


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