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

full cell stencil with parallelisation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2012, 15:51
Default full cell stencil with parallelisation
  #1
Member
 
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 63
Rep Power: 17
matthias is on a distinguished road
Hi,

I'm trying to get the cell centered values surrounding an arbitrary given cell in a certain volField, i.e. volVectorField U. First I have used a search algorithm that finds for a given cell all neighbour cells and returns the cell values but all in all, it's not working in parallel due to missing diagonal dependencies in the mesh.

Afterwards, I got a hint that the extendedStencil stuff could possibly be used for this. So I'm trying to make it work but ...hmm ... no success till now (especially not in parallel).

Code:
 CPCCellToCellStencil wideStencil(mesh());

 forAll(mesh().C(), lcellI)
 {
       const labelList& cell27Stencil=wideStencil[lcellI];
 
       forAll(cell27Stencil, cellI)
       {
          // now it becomes tricky ...

         // that's not working since the global addressing of the volField is wrong
         Pout << " center value: " << unFilteredField().[cell27Stencil[cellI]] << endl;
        
       }
  }
Furthermore I have no idea how to get correctly the values from the boundary fields (and processor patches) using the stencil stuff.

So I would be grateful for suggestions how to solve this messy problem! Maybe somebody has already done this or has some experience with the stencil stuff.


Best regards

Matthias
matthias is offline   Reply With Quote

Old   April 13, 2012, 12:48
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
Hi Matthias,

While I don't have much experience in this matter, there is an extended stencil implementation of leastSquares here:

/OpenFOAM/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/extendedLeastSquaresVectors.C


You might be able to gain some insight if you haven't already checked it out.

Good luck,

Kyle
kmooney is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FvMatrix coefficients shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 15:38
extended cell stencil tomislav_maric OpenFOAM Programming & Development 4 February 1, 2012 10:38
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


All times are GMT -4. The time now is 20:23.