View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002596 | OpenFOAM | Feature | public | 2017-06-29 12:00 | 2017-07-02 15:03 |
Reporter | alexandross | Assigned To | henry | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | suspended | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 14.04 |
Summary | 0002596: Gauss linear gradient scheme results in zeroth-order accuracy | ||||
Description | Although strictly speaking this is not a bug in the code, I was advised in the cfd-online forum to report this issue here. We have recently performed a study that shows that the Gauss gradient scheme is inconsistent on unstructured meshes (it does not converge to the actual gradient but to a skewness-dependent operator). Furthermore, we used it for the finite volume solution of a Poisson equation using unstructured meshes and the discretisation error does not decrease with grid refinement, i.e. the finite volume method is zeroth-order accurate. For some of the tests we used OpenFOAM. Our study can be found here: https://arxiv.org/abs/1606.05556 | ||||
Steps To Reproduce | The setup is described in section 6.2 of the aforementioned paper. Using salome, tesselate a square domain (in 2D) with the Gmsh algorithm, or a cubic domain (in 3D) with either the Gmsh or Netgen algorithms. Set up the right-hand side (source term) of a Poisson equation accordingly so that the solution to the Poisson equation is a pre-selected function, and solve it using laplacianFoam, modified to account for the source term, with gradSchemes set to "Gauss linear". Calculate the discretisation errors, and repeat with a finer grid again and again. The discretisation errors do not converge towards zero with grid refinement. If the procedure is repeated with gradSchemes set to "leastSquares", the discretisation errors converge towards zero at a second-order rate. | ||||
Additional Information | As mentioned, this issue does not concern a bug in the code but is due to defects in the numerical method itself. Possible actions to deal with it could be: 1. To advise users to use the Gauss linear gradient only on structured meshes. 2. To make the leastSquares gradient the default scheme. 3. To modify the Gauss linear scheme according to the iterative procedure described in our paper. 4. To implement alternative, consistent schemes based on the Gauss theorem, similar to the "vertex-based" Gauss gradient of Fluent, or the method with the auxiliary cell described in our paper. Thanks for your consideration. | ||||
Tags | consistency, gauss gradient, order of accuracy, unstructured grids | ||||
|
> 1. To advise users to use the Gauss linear gradient only on structured meshes. Gauss linear gradient is very stable and robust and a good starting point for any simulation and we recommend it for general purpose use. > 2. To make the leastSquares gradient the default scheme. leastSquares can be more accurate than Gauss linear but is a lot less stable and could not be recommended for all simulations and cannot be the default. > 3. To modify the Gauss linear scheme according to the iterative procedure described in our paper. We would be happy to include your method as an alternative rather than a replacement for the current Gauss linear scheme. Are you planning on contributing the code to the OpenFOAM Foundation for inclusion in OpenFOAM releases? > 4. To implement alternative, consistent schemes based on the Gauss theorem, similar to the "vertex-based" Gauss gradient of Fluent, or the method with the auxiliary cell described in our paper. This is already available in OpenFOAM by using pointLinear interpolation in conjunction with Gauss gradient and has been demonstrated to be equivalent to what Fluent recommends for use on tet-meshes. |
|
OK, but the users must be warned about the zeroth-order accuracy issue. It's better to try a consistent gradient scheme first, such as leastSquares, and if they run into convergence difficulties to switch to Gauss linear, viewing the results with skepticism. I think that Fluent has set their default scheme to least-squares, and they add a note in the manual that the Gauss linear ("cell-based") gradient is faster but of much lower accuracy on distorted meshes (although they do not specifically attribute this to inconsistency of the scheme). Concerning the iterative procedure that is described in our paper, it is currently implemented in my own Fortran code. I am a beginner OpenFOAM user, but I intend to invest some time learning and using the software. I will be very happy to contribute in any way that I can. |
|
Please reopen this report when you are ready to contribute your iterative procedure. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-06-29 12:00 | alexandross | New Issue | |
2017-06-29 12:00 | alexandross | Tag Attached: gauss gradient; order of accuracy; consistency; unstructured grids | |
2017-06-29 12:15 | henry | Note Added: 0008278 | |
2017-06-29 12:16 | henry | Priority | urgent => normal |
2017-06-29 12:16 | henry | Category | Bug => Feature |
2017-07-01 08:26 | alexandross | Tag Detached: gauss gradient; order of accuracy; consistency; unstructured grids | |
2017-07-01 08:26 | alexandross | Tag Attached: consistency | |
2017-07-01 08:26 | alexandross | Tag Attached: gauss gradient | |
2017-07-01 08:26 | alexandross | Tag Attached: order of accuracy | |
2017-07-01 08:26 | alexandross | Tag Attached: unstructured grids | |
2017-07-01 09:30 | alexandross | Note Added: 0008316 | |
2017-07-02 15:03 | henry | Assigned To | => henry |
2017-07-02 15:03 | henry | Status | new => closed |
2017-07-02 15:03 | henry | Resolution | open => suspended |
2017-07-02 15:03 | henry | Note Added: 0008318 |