CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

extended cell stencil

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By tomislav_maric

Reply
 
LinkBack Thread Tools Display Modes
Old   January 30, 2012, 07:40
Default extended cell stencil
  #1
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 259
Blog Entries: 5
Rep Power: 11
tomislav_maric is on a distinguished road
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?
tomislav_maric is offline   Reply With Quote

Old   January 31, 2012, 09:40
Default
  #2
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 259
Blog Entries: 5
Rep Power: 11
tomislav_maric is on a distinguished road
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.

tomislav_maric is offline   Reply With Quote

Old   January 31, 2012, 17:24
Default
  #3
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 277
Rep Power: 9
kmooney is on a distinguished road
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!
kmooney is offline   Reply With Quote

Old   February 1, 2012, 04:38
Default
  #4
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 259
Blog Entries: 5
Rep Power: 11
tomislav_maric is on a distinguished road
Quote:
Originally Posted by kmooney View Post
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!
Thanks a lot for the advice! I've tried this as well, but ended up using volPointInterpolation + face average + Gauss linear, it gives great results!

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.
hua1015 likes this.
tomislav_maric is offline   Reply With Quote

Old   February 1, 2012, 10:38
Default
  #5
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 259
Blog Entries: 5
Rep Power: 11
tomislav_maric is on a distinguished road
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....
tomislav_maric is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Me, what's the Cell Above any given cell in 3D. gomane8 Main CFD Forum 3 September 11, 2011 21:29
Cells with t below lower limit Purushothama CD-adapco 2 May 31, 2010 21:58
How to determine the direction of cell face vectors on processor patches sebastian_vogl OpenFOAM Programming & Development 0 October 26, 2009 13:10
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
Warning 097- AB CD-adapco 6 November 15, 2004 05:41


All times are GMT -4. The time now is 22:21.