|
[Sponsors] |
October 1, 2018, 10:05 |
Gradient Calculation on cell vertices
|
#1 |
Member
Join Date: Mar 2015
Posts: 35
Rep Power: 11 |
Hello OpenFoam-community,
I have found many publications using the least-square-method to calculate the gradient of a scalarField at cell vertices (and not at cell centers). Now I need to do this as well for my code, but can not find the Header-File or the function to do this. The User-Manual and the Programmer-Manual mention gradient at cell centers only. Is there an already written Header-file in OpenFoam to calculate gradient at cell vertices? Thanks a lot, K.C. |
|
October 2, 2018, 07:22 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Dear K.C.,
do you mean cell vertices or face centers? Out of the box I just have the following in mind: - calculate the gradient at face centers - interpolate the gradients at face centers to cell vertices
__________________
Keep foaming, Tobias Holzmann |
|
October 2, 2018, 08:29 |
|
#3 |
Member
Join Date: Mar 2015
Posts: 35
Rep Power: 11 |
Hello Tobi,
thanks for your reply. I mean the cell vertices (e.g. 8 for a cube). A cell consists of faces. A face consists of edges and the edge connects two vertices/points. So I want to calculate a pointVectorField and not a surfaceVectorField. Furthermore I dont know how you would calculate the vector gradient on faces (except by interpolation). The surface normal Gradient can't be interpolated into a vector on vertices in my opinion. Can you explain a bit more detailed? Greets, K.C. |
|
October 2, 2018, 09:06 |
|
#4 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Quote:
[quote] ... calculate the vector gradient on faces (except by interpolation). [/code] Out of the box, I donīt think that this is possible. However, you could check the least square schemes available in OpenFOAM to get a better feeling how they do it here (also available for point and edge limiting stuff or something like that). Maybe this is what you are searching for.
__________________
Keep foaming, Tobias Holzmann |
||
October 4, 2018, 11:28 |
|
#5 | ||
Member
Join Date: Mar 2015
Posts: 35
Rep Power: 11 |
Quote:
it was your idea of calculating gradient on faces. I hoped you had an idea of calculating gradient in vector form on faces. But maybe I missunderstood you. Quote:
|
|||
October 4, 2018, 14:01 |
|
#6 | ||
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Quote:
Just see: Code:
Unknown grad scheme linear Valid grad schemes are : 11 ( Gauss cellLimited cellLimited<Venkatakrishnan> cellLimited<cubic> cellMDLimited edgeCellsLeastSquares faceLimited faceMDLimited fourth leastSquares pointCellsLeastSquares ) Quote:
The gradient calculation I meant was gradient calculation at cell center, interpolate to face center and interpolate to edges. However, this is not what you were searching for.
__________________
Keep foaming, Tobias Holzmann |
|||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Periodic flow using Cyclic - comparison with Fluent | nusivares | OpenFOAM Running, Solving & CFD | 30 | December 12, 2017 05:35 |
[General] Wrong Calculation of Cell Volume | olli191 | ParaView | 1 | August 3, 2016 04:09 |
Difference between cell gradient and cell derivative macros | mohammadx90 | Fluent UDF and Scheme Programming | 2 | February 7, 2015 19:40 |
Journal file error | magicalmarshmallow | FLUENT | 3 | April 4, 2014 12:25 |
Prediction of gradient at the cell center for cell-centered finite volume method | openfoammaofnepo | Main CFD Forum | 4 | March 23, 2014 15:07 |