Is there a corrected Gauss gradient scheme?
Hi,
I have been looking at the accuracy of the Gauss linear gradient scheme for a simple case compared with the analytical solution, and it is exactly correct for a perfectly orthogonal mesh. But it is inaccurate if the grid is non-orthogonal. Is there any corrected version of the Gauss linear gradient scheme where the non-orthogonality is corrected for explicitly? I have also tried leastSquares but it seems to give strange gradients in the boundary cells. extendedLeastSquares seems to work the best but I am not entirely sure how it works. Philip |
OK,
I found that you can specify explicit correction like this (as described here): Code:
gradSchemes However, leastSquares gives me much better results on non-orthogonal grids. I was getting strange incorrect gradients in the boundary cells using leastSquares but this was solved by commenting and uncommenting a few lines in OpenFOAM-1.6-ext/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C. I commented the following lines (lines 140 to 151): Code:
// Original version: closest distance to boundary Code:
// Better version of d-vectors: Zeljko Tukovic, 25/Apr/2010 |
All times are GMT -4. The time now is 11:56. |