|
[Sponsors] |
January 30, 2012, 07:40 |
extended cell stencil
|
#1 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Hi everyone,
mesh.cellCells() gives a cross-like 6 cell stencil for hex cells. I'm in need of a 27 cell stencil, or at least a wider stencil of computation surrounding a face. There are some classes in src/finiteVolume/fvMesh/extendedStencil that may help. I've been trying them out, and the faceToCellStencil (extended -//-) seems interesting, but for a simple 3D cavity case it builds up nothing: 0 sized label list. Does anyone here have any experience with these parts of the code? |
|
January 31, 2012, 09:40 |
|
#2 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Well, to answer myself:
take a look at CPCCellToCellStencil: it constructs a point based neighbourhood of the cell, thus picking up the 27 cell stencil often used for linear regression in the gradient reconstruction of sharp fields on structured meshes. The labelListList is filled with with per-cell constructed labels of the surrounding cells. The first label is the label of the cell in question, the rest are the labels of the surrounding cells. |
|
January 31, 2012, 17:24 |
|
#3 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
I just recently took a gander at the extendedLeastSquares fvScheme. That uses a point-to-cells connectivity that would return the 27 cell stencil for a hex mesh you are looking for.
Lines 164 on in leastSquaresVectors.C performs a loop over all cells connected to all the points bounding a given cell. Good Luck! |
|
February 1, 2012, 04:38 |
|
#4 | |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Quote:
I gave up on leastSquares when I read this: http://www.openfoam.com/mantisbt/view.php?id=141 check out the last comment in the discussion. For my fields, leastSquares did not help at all, I'll try extended once more and see what happens. |
||
February 1, 2012, 10:38 |
|
#5 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
I've tried the extendedLeastSquares with the minDet = 8 to get the most cells, and the gradient reconstruction is unstable (in a symmetric way with respect to the mesh alignment) for a sharp spherical field.
Kyle, do you have any docs on this class that you can share? I'm happy with my gradient computation right now, but I will maybe spend some time to assemble the 27 cell stencil, cell based symm tensor for the linear regression myself, if it turns out to be necessary at some point. I didn't analyze the code of extendedLs in depth, but it seems that the tensor is assembled based on owner-neighbour relationship, which will introduce problems for reconstruction of linear gradient (if it is xtremely sharp) in the skew direction.... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to determine the direction of cell face vectors on processor patches | sebastian_vogl | OpenFOAM Programming & Development | 1 | October 11, 2016 14:17 |
Help Me, what's the Cell Above any given cell in 3D. | gomane8 | Main CFD Forum | 3 | September 11, 2011 22:29 |
Cells with t below lower limit | Purushothama | Siemens | 2 | May 31, 2010 22:58 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |