|
[Sponsors] |
"Gauss linear" gradient makes OpenFOAM zeroth-order accurate on unstructured meshes |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 20, 2017, 04:16 |
|
#21 | |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
For completeness, ESi also have their own bugtracker:
http://www.openfoam.com/code/bug-reporting.php Quote:
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
||
July 21, 2017, 07:00 |
|
#22 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
Quote:
For example StarCCM+ has their default scheme set to Least Square gradients and they also encourage people to use for the reasons (more accuracy) you mentioned. My own code favours least square method. Starccm is known to be more stable (even with least square method) compared to openFOAM with Gauss scheme. (I think the same about FVUS with LSQR being more stable than openfoam with green gauss). Last Guass method and its improvements are very important because not only the gradients but the whole finite volume method is dependent on Gauss integration. |
||
July 21, 2017, 08:00 |
|
#23 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Ansys (probably the largest user base by a margin) also favours Gauss scheme for general meshes.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
July 21, 2017, 09:15 |
|
#24 | |
New Member
Alexandros Syrakos
Join Date: Jun 2017
Posts: 13
Rep Power: 9 |
Quote:
https://www.sharcnet.ca/Software/Ans...rivatives.html I don't know if the Gauss gradient was originally the default but they switched to the least-squares at some point in time. |
||
July 21, 2017, 10:26 |
|
#25 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
I looked it up in the Ansys AIM help, which I thought was based on Fluent and thus used the same settings (apparently I was wrong). The "Automatic" setting uses Green-Gauss node based when the mesh contains tets or wedges.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
July 21, 2017, 10:45 |
|
#26 | |
New Member
Alexandros Syrakos
Join Date: Jun 2017
Posts: 13
Rep Power: 9 |
Quote:
The iterative Gauss method (calc_grad_iGSl.f) is based on a very simple idea (see eq. 22 of my arXiv paper): the iterative loop such as the "iterloop" loop in calc_grad_GSl is replaced by the outer iterations of the flow solver, which are performed anyway. For example, if the SIMPLE solver is used, the gradient is calculated once at the beginning of each SIMPLE outer iteration; with calc_grad_iGSl the gradient is computed in one pass (no iterations) using the gradient estimate of the previous SIMPLE iteration to account for skewness. At convergence the gradient at the new SIMPLE iteration should be the same as that of the previous SIMPLE iteration. Hence the array "grad", holding the new gradient estimate, has intent(inout) in calc_grad_iGSl (as opposed to intent(out) in calc_grad_GSl). This exploitation of the outer iteration involves a relatively small penalty, in that the outer iterations converge somewhat more slowly (see table 1 of the paper). To be honest, I have used this new scheme only for the purposes of this paper, i.e. only for solving a Poisson equation, not a flow problem. I normally use the least-squares gradient. I've tested it only in 2D, but the subroutine should be exactly the same in 3D. The scheme you are referring to is probably the one depicted in figure 6, where indeed extension to 3D would be more involved. Last edited by alexandross; July 22, 2017 at 11:16. |
||
July 21, 2017, 23:19 |
|
#27 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
Quote:
It is not that clear cut. Least square gradients come in Fluent very very late and they have possibly not bothered to change the default. It is probable that they did not need to change the default. Do you know that their default convective scheme is first order upwind scheme, while Starccm always had Second order upwind scheme as default. It does not mean that they Fluent favours first order upwind scheme over second order upwind. Their thinking is that they provide simplest default and user specelizes the solver later. Fluent people have made presentations etc showing how least square is a better scheme. All this does not point that they favour green gauss. We can only say their stance is not known. (They don't make categorical statements like Green Gauss is more stable etc like Henry did). Also the Starccm comment was to show that people are divided over it and there is no clear cut one side to chose green gauss. (their user base is not small). |
||
July 21, 2017, 23:22 |
|
#28 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
Quote:
This is very interesting comment. Because Fluent says that node based green gauss of similar accuracy as least square gradients. I think the possible reason is stability problems of LSQR method when skew and aspect is bad. |
||
July 22, 2017, 11:25 |
|
#29 |
New Member
Alexandros Syrakos
Join Date: Jun 2017
Posts: 13
Rep Power: 9 |
||
January 8, 2018, 12:07 |
Published paper
|
#30 |
New Member
Alexandros Syrakos
Join Date: Jun 2017
Posts: 13
Rep Power: 9 |
Happy new year to everyone.
I would like to inform the readers of this thread that a revised version of our paper has now been published in: Physics of Fluids 29, 127103 (2017) http://dx.doi.org/10.1063/1.4997682 (the texts in arXiv and ResearchGate have also been updated). |
|
January 9, 2018, 09:16 |
|
#31 |
Member
Join Date: Jun 2016
Posts: 31
Rep Power: 10 |
Very interesting topic, thank you for bringing it to our attention. From now on, I'll only use least squares thanks to your work.
|
|
January 13, 2020, 04:52 |
|
#32 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Dear alexandross,
Would you please tell us whether you can release the source code used for the publication, or not? It would be very useful for the community I believe, and the OpenFOAM maintainers would love to test it.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
January 14, 2020, 07:34 |
|
#33 | |
New Member
Alexandros Syrakos
Join Date: Jun 2017
Posts: 13
Rep Power: 9 |
Quote:
Thank you for your interest. I used my own custom Fortran code for most of the experiments in the publication (except for those with OpenFOAM, in which I only used the existing gradient schemes "Gauss linear" and "leastSquares", so there's nothing new there). I haven't made my own code publicly available because it's not very efficient and I would like to make some improvements first. Due to my use of custom data structures, it would not be easy to just extract the gradient routines from it and use them elsewhere. However, I did upload (in post #26 of this thread) my Green-Gauss subroutine and the corresponding iterative version that splits the iterations among the SIMPLE iterations (denoted \nabla^{d \infty} in the paper). Nevertheless, your question gives me the opportunity to mention that very recently we have written another paper (it is currently under review, but is available in arXiv, see below) where we propose a new family of gradient methods that are akin to the least-squares methods but also bear some resemblance to the Green-Gauss gradient, but are always at least first-order accurate. The paper can be found at https://arxiv.org/abs/1912.08064 or in my ResearchGate page. The experiments there were performed again with my own Fortran code, but my co-authors from the company Engys work with OpenFOAM and hopefully soon the corresponding OpenFOAM routines will be made available (it is up to them though). I will post a message here when this happens, informing everyone about where they can get the routines from. Best regards, Alexandros |
||
Tags |
finite volume method, gauss gradient, gradient accuracy, least-squares, unstructured grid |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 15:24 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |
How to compute UDS fourth order gradient | Emma66 | FLUENT | 1 | April 27, 2010 06:44 |
Higher Order FV Schemes for unstructured meshes | Apurva Shukla | Main CFD Forum | 4 | December 15, 2000 10:17 |