
[Sponsors] 
Computing node, cell and face incidence in 3D structured meshes 

LinkBack  Thread Tools  Search this Thread  Display Modes 
March 24, 2020, 07:30 
Computing node, cell and face incidence in 3D structured meshes

#1 
New Member
Rafael March
Join Date: Mar 2020
Posts: 5
Rep Power: 6 
I'm developing a PDE discretization algorithm for fluid flow in porous media that works on 3D uniform structured meshes. For this algorithm, I often have to traverse the mesh nodes and get the ids of all the faces and all the cells connected to the node. Another common operation is to traverse the cells and get the ids of their faces.
Because my grid is of the simplest type, I don't want to use a mesh generator. Instead, knowing that I have only these three operations (let's call them get_node_cells(node_id), get_node_faces(node_id), get_cell_faces(cell_id)), I would like to assume a consistent numbering system and work out explicit expressions for these. In 2D this is relatively easy to be done. I have simply sketched a simple example (5 cells x 5 cells) and figured out the general rule for these operations based on the number of cells in x and y direction. In 3D it gets complicated because you can barely visualize or sketch a simple example. Has anyone faced a similar challenge and would be able to shed light on this problem? Maybe there's a mathematical "shortcut" to get these node and cell entities? Thanks! 

March 24, 2020, 12:01 

#2  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 
Quote:
I think that the topology on uniform cartesian grid is very simple, you just assume that one of the i,j,k integers represent a spatial position x(i),y(j),z(k). To each position you can associate the faces face_x(i,j,k), face_y(i,j,k), face_z(i,j,k), for example using the notation that are staggered backward. A generic nonnodal position can be located into the volume built by the faces face_x(i,j,k),face_x(i+1,j,k),face_y(i,j,k),face_y (i,j+1,k),face_z(i,j,k),face_z(i,j,k+1) 

April 1, 2020, 10:38 

#3 
Senior Member

As mentioned by Filippo, they are just staggered, nothing really fancy, unless you stored them in some non obvious way for a fully structured grid.
However, let me add that, today, if it actually still makes sense to use structured grids, is because they allow to avoid storing stuff here and there, because you can easily calculate them. That is, if you need something on a node, you should be able to compute it on the fly, exactly because you know exactly where the node is with respect to its neighbors. 

Tags 
finite volume method, mesh and grid, structured mesh. 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
[Other] refineWallLayer Error  Yuby  OpenFOAM Meshing & Mesh Conversion  2  November 11, 2021 11:04 
[ICEM] Error in mesh writing  helios  ANSYS Meshing & Geometry  21  August 19, 2021 14:18 
[Netgen] Import netgen mesh to OpenFOAM  hsieh  OpenFOAM Meshing & Mesh Conversion  32  September 13, 2011 05:50 
[blockMesh] BlockMeshmergePatchPairs  hjasak  OpenFOAM Meshing & Mesh Conversion  11  August 15, 2008 07:36 
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues  michele  OpenFOAM Meshing & Mesh Conversion  2  July 15, 2005 04:15 