CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   gauss grad no correction for coupled boundary??!! (http://www.cfd-online.com/Forums/openfoam/95480-gauss-grad-no-correction-coupled-boundary.html)

doubtsincfd December 19, 2011 19:19

gauss grad no correction for coupled boundary??!!
 
In the code for gauss gradient (gaussGrad.c), the grad calcuation at the boundary is done as:

forAll(vsf.boundaryField(), patchi)
{
if (!vsf.boundaryField()[patchi].coupled())
{
const vectorField n
(
vsf.mesh().Sf().boundaryField()[patchi]
/ vsf.mesh().magSf().boundaryField()[patchi]
);

gGrad.boundaryField()[patchi] += n *
(
vsf.boundaryField()[patchi].snGrad()
- (n & gGrad.boundaryField()[patchi])
);
}
}

So is there no correction for coupled patches?? I am getting embarrassingly wrong values of gradient at cyclic patch.

Second question: In the same code, calculation of grad has been done for three sets of mesh entities:
1. On face centers on patch
2. On cell centers adjacent to patch
3. On all inside cell centers

Is my understanding correct?


All times are GMT -4. The time now is 20:22.