CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Face areas affect scheme switching criterion for leastSquares (https://www.cfd-online.com/Forums/openfoam-bugs/62459-face-areas-affect-scheme-switching-criterion-leastsquares.html)

7islands June 30, 2008 08:31

Description: The switching-to
 
Description:
The switching-to-Gauss criterion at line 253 of leastSquaresVectors.C<pre> if (det(dd[celli]) <3)</pre> is affected by face areas of the cell, since dd has the dimension of face areas. Probably this is not what you meant.

Source file:
OpenFOAM-1.4.1/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastS quaresVectors.C

Version:
OpenFOAM 1.4.1

Notes:
None

Takuya

henry June 30, 2008 10:35

Thanks for the bug-report. Th
 
Thanks for the bug-report. The problem is that in the previous incarnation dd was not area-weighted and the switching based on dd was correct. When I added the area-weighting (which gives better accuracy for distorted meshes) I did not notice that the switching needed updating -- sorry about that.

Actually the switching was never that successful; on bad meshes the least-squares would still fail because not enough cells were switched to Gauss. This whole issue needs more work so for 1.5 I propose to remove the switching and will re-instate it after we have had time to develop a more reliable switching criterion.

H

7islands July 4, 2008 00:44

Thanks for the answer. Removin
 
Thanks for the answer. Removing the switching stuff worked like a charm. My solidDisplacementFoam cases are now physically reasonable and agrees nicely with solutions of statically indeterminate frames. I happened to have got even smoother gradients for a bad mesh region with rather aggressive setting of extendedLeastSquares (extendedLeastSquares 7.0), which does not do face area weighting AFAIK. But it may depend on cases.

Hope the patched version in openfoam-extend SVN repo to be fixed as well since without the fix leastSquares is mostly useless unless the case is 2D or the total face area of a cell is of order of a square meter.

Takuya

henry July 4, 2008 02:40

I am glad you have found exten
 
I am glad you have found extendedLeastSquares useful. It seemed like a great idea when I implemented it to solve some of the stability problems of leastSquares on VERY bad meshes but unfortunately it didn't help and reverting to Gauss for the bad cells seems to be the only way forward.

We are now developing and testing higher-order schemes which are formally more accurate than leastSquares on distorted meshes and hope to release this functionality in the version after 1.5.

Henry


All times are GMT -4. The time now is 09:46.