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

Position of cells in a orthogonal grid

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 5, 2008, 22:31
Default Hello, I'm using a structur
  #1
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Hello,

I'm using a structured (orthogonal squared cells) grid, and I need to implement an algorithm which requires the values of a variable in the "above"/"below", "left"/"right", "front"/"back" cells.

Is there a quick way to identify these cells?
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   February 6, 2008, 04:01
Default short answer: hmmm, sort of.
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
short answer: hmmm, sort of.

The fastest way as I see it is to access all the faces, check their face-normals and depending on their direction determine if they are left or right, et c.
from that create a mapping of left -> face i, right -> face j, et c.
(which of course require some mesh class hacking)

you probably only need to do this once for a static mesh and after this it should be fast.
niklas is offline   Reply With Quote

Old   February 6, 2008, 13:28
Default Hmmm. Thanks for your reply Ni
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Hmmm. Thanks for your reply Niklas.

I have a doubt on how the boundary cells are managed. I mean, I have 4 neighbours for the "internal" cells, but only 2 or 3 for the boundary cells, which are exceptions because they have one or more lacking "directions".

How that procedure can identify them?

Regards,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto 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
elliptic grid generation (orthogonal) vasu Main CFD Forum 8 October 28, 2015 16:20
[Other] 3D curvlinear orthogonal bodyfitted grid maka OpenFOAM Meshing & Mesh Conversion 1 February 13, 2014 13:17
orthogonal grid generation Bounecer Main CFD Forum 2 July 9, 2007 01:06
Poisson solver - orthogonal grid Fuka Main CFD Forum 0 May 11, 2006 12:19
2-D orthogonal grid generation Jenny Rhong Main CFD Forum 3 February 10, 2004 20:51


All times are GMT -4. The time now is 17:29.