CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   gaussGrad (http://www.cfd-online.com/Forums/openfoam/87209-gaussgrad.html)

pino@JAEA April 13, 2011 23:44

gaussGrad
 
I have a question for gaussGrad.

00106 forAll(mesh.boundary()[patchi], facei)
00107 {
00108 igGrad[pFaceCells[facei]] += pSf[facei]*pssf[facei];
00109 }
00110 }
00111
00112 igGrad /= mesh.V();

In the 112 line, why igGrad is divided by mesh.V().

In the case of FVM, I understand that volume integration of grad(p) is sum of surface value of p. So, I can not understand the meaning of 112 line.

Please comment or advice for me.

Thanks in advance.

lzw2003 August 24, 2011 23:02

1 Attachment(s)
Hi,

according to the Gauss' divergence theorem,
http://www.cfd-online.com/Forums/att...1&d=1314240973,
the gradient at node p is calculated by integrate phi at the closed surface around the node.


All times are GMT -4. The time now is 02:58.