CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Issues with swak4Foam gradient (https://www.cfd-online.com/Forums/openfoam-programming-development/206350-issues-swak4foam-gradient.html)

Egge September 4, 2018 11:22

Issues with swak4Foam gradient
 
Hi guys,


I am calculating the dissipation of the turbulent kinetic energy with swak4foam. Compared to DNS-Data I got good agreemant in the domain bad a far to high value at the wall. So I tried another version, which I called version 2



Code:

gradUiMeanXjGradUiMeanXj
                {
                        type expressionField;
                        dimension [0 2 -3 0 0 0 0];
                        fieldName "gradUiMeanXjGradUiMeanXj";
                        expression "pow(gradUMean.xx,2) + pow(gradUMean.xy,2) + pow(gradUMean.xz,2) + pow(gradUMean.yx,2) + pow(gradUMean.yy,2) + pow(gradUMean.yz,2) + pow(gradUMean.zx,2) + pow(gradUMean.zy,2) + pow(gradUMean.zz,2)"; //tr=Trace
                        autowrite yes;
                        outputControl outputTime;
                }

This is one term to calculate the dissipation. This version is working good, also in the wall region.


In my first version I calculated e.g. this term

Code:

pow(gradUMean.xx,2)
in that way (version 1)

Code:

pow(grad(UMean.x).x,2)
.

In my eyes both versions are equal but version 1 gives to high values near the wall.


Can someone explain me please what is going wrong?


Thanks in advance


Egge


All times are GMT -4. The time now is 18:34.