CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   gauss grad no correction for coupled boundary??!! (

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().magSf().boundaryField()[patchi]

gGrad.boundaryField()[patchi] += n *
- (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 09:16.