CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Node and cell in cell centred system

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2018, 03:55
Default Node and cell in cell centred system
  #1
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Hi all,

if I have a cell centred cfd software, are the number of node and number of cell coincident?
lucamirtanini is offline   Reply With Quote

Old   November 23, 2018, 05:15
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
They are not exactly coincident but scale similarly, thus they are roughly the same. For example, if along a direction you have N cells, there are N+1 nodes in 1D.


In contrast, the number of faces is typically a factor k higher (around 3 for hexaedral grids).
lucamirtanini likes this.
sbaffini is offline   Reply With Quote

Old   November 23, 2018, 05:42
Default
  #3
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Thanks a lot for the answer. In my case it is a cartesian grid. Why n+1?
If I consider I a face and * a node

I*I*I*I*I*I*I

I count 6 cell and 6 node. I am missing something?
lucamirtanini is offline   Reply With Quote

Old   November 23, 2018, 06:11
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Start by constructing the 1D grid, for example on a domain [0,L] you have


x(i)=(i-1)*h i=1,2,...N+1


This way L=x(N+1)=N*h.


Now you can define the centroid of the FV



xc(i)=(x(i)+x(i+1))/2 i=1,2...N




Now, should be clear also for a 2D case. Of course, some specific care on the boundaries can require to consider further nodes
FMDenaro is offline   Reply With Quote

Old   November 23, 2018, 06:25
Default
  #5
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Actually, there are 7 I and 6 * ...

Let's first distinguish cells, from nodes and faces for a 3D grid as in 1D faces and nodes coincides.

A 3D cartesian cell has 1 cell (center), 6 faces and 8 nodes. In 1D we have 1 cell (center) and 2 nodes.

If I is a node and * is a cell, in 1D you have:

I*I*I

that is 3 nodes and 2 cells. Thus, in 1D, for N cells you get N+1 nodes. Basically, you have a cell for each node but, to close the last cell in the line you need an additional node.

If we go to 3D, cells and nodes are trivial, you have Nx*Ny*Nz cells and (Nx+1)*(Ny+1)*(Nz+1) nodes.

Faces are slightly more complex. You have 3 groups of faces. Those with x normal, y normal and z normal respectively.

For those with x normal, there are Ny*Nz faces for each of the Nx+1 planes with x normal. As per nodes in 1D, faces bound the cells, thus we count also the last Nx+1 group of faces. Yet, in the x plane there are only Ny*Nz cells with a face.

The same goes for faces with y normal, which are Nx*Nz*(Ny+1), and those with z-normal, which are Nx*Ny*(Nz+1).

Summing up:

Nx*Ny*Nz cells
(Nx+1)*(Ny+1)*(Nz+1) nodes
(Nx+1)*Ny*Nz+Nx*(Ny+1)*Nz+Nx*Ny*(Nz+1) faces

thus you can see the original claim on number of nodes roughly equivalent to number of cells and number of faces approximatively 3 times higher.
lucamirtanini likes this.
sbaffini is offline   Reply With Quote

Old   November 23, 2018, 06:29
Default
  #6
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Thank u for your answer Paolo! So do I need to end always with a node at the boundary? Because I use fds ( a nist software) and there are not node at the boundaries (maybe not in the graphic interface). (I was sure that the boundary conditions in fds were placed at the faces of the cells)
lucamirtanini is offline   Reply With Quote

Old   November 23, 2018, 07:40
Default
  #7
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
If you see the file attached, in the software that I use some variables are stored in the centroid of the cell, other are stored at the boundary.
In this case do you think does it make sense to count the nodes? Sorry but maybe I am simply confused because of this.
Attached Images
File Type: png cell.PNG (35.3 KB, 15 views)
lucamirtanini is offline   Reply With Quote

Old   November 23, 2018, 11:25
Default
  #8
New Member
 
Join Date: Nov 2018
Posts: 10
Rep Power: 8
Luc_27 is on a distinguished road
Hi guys,

If the cells are N and by assuming/by definition each cell has 1 node, there is no way that the nodes can be N+1.

If we take a simle grid in 1D with N cells, we will have N nodes and N+1 faces.
Luc_27 is offline   Reply With Quote

Old   November 23, 2018, 11:34
Default
  #9
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
There is a confusion here between grid nodes and cells with their relative cell centers.

Of course we can use whatever nomenclature you want but, by convention in CFD literature on finite volume methods, the most used one is:

cells -> actual cells and their respective cell centers (which, thus, are not referred to as nodes)

faces -> the faces which make up the cells. E.g., 6 for hexaedra (3D), 4 for tetrahedra (3D), 4 for quadrilaterals (2D), 3 for triangles (2D), etc.

nodes -> the actual geometrical points by which a finite volume mesh is usually described. E.g., 8 for hexaedra, 4 for tetrahedra, 4 for quadrilaterals, 3 for triangles, etc.

To convince yourself on this nomenclature, try looking at the so called node centered finite volume method (in contrast to the cell centered one).

In 1D, of course, faces and nodes collapse into the same thing, but that's a very specific corner case. In 1D I would argue that nodes don't actually exist, only faces and cell centers (unfortunately, in my previous post, I did the contrary, talking about nodes instead of faces in 1D, ignoring the difficulty with the nomenclature you have).
FMDenaro likes this.
sbaffini is offline   Reply With Quote

Old   November 23, 2018, 11:40
Default
  #10
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by lucamirtanini View Post
Thank u for your answer Paolo! So do I need to end always with a node at the boundary? Because I use fds ( a nist software) and there are not node at the boundaries (maybe not in the graphic interface). (I was sure that the boundary conditions in fds were placed at the faces of the cells)
You will end up with faces and their respective nodes (not cell centers!!!) at the boundary. Boundary conditions for celle centered finite volume codes as FDS are applied on the (boundary) faces.

Nodes (as defined by the typical nomenclature in CFD for finite volume methods) do not enter in any part of a cell centered finite volume method and you can basically forget about them (they actually enter in some exotic gradient discretizations, but that's not the point here).
lucamirtanini likes this.
sbaffini is offline   Reply With Quote

Old   November 23, 2018, 11:58
Default
  #11
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Luc_27 View Post
Hi guys,

If the cells are N and by assuming/by definition each cell has 1 node, there is no way that the nodes can be N+1.

If we take a simle grid in 1D with N cells, we will have N nodes and N+1 faces.



As Paolo wrote, the confusion is between the nodes in the grid generation and the construction of a FVs set over the grid. In practice the grid generation covers but the unknowns and the boundary nodes.
As a further example of difference, consider a structured grid and a staggered colocation of the variables.
FMDenaro is offline   Reply With Quote

Old   November 23, 2018, 12:05
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
For example, on a non-staggered and non-uniform grid I select the FVs and grid nodes this way
https://www.researchgate.net/publica...u47DBgIOBOsuhg
FMDenaro is offline   Reply With Quote

Old   November 23, 2018, 15:25
Default
  #13
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
You will end up with faces and their respective nodes (not cell centers!!!) at the boundary. Boundary conditions for celle centered finite volume codes as FDS are applied on the (boundary) faces.

Nodes (as defined by the typical nomenclature in CFD for finite volume methods) do not enter in any part of a cell centered finite volume method and you can basically forget about them (they actually enter in some exotic gradient discretizations, but that's not the point here).
First of all thank you for all your answers, they are very helpful.
Every CFD book that I ve read defines the nodes as the place where you calculate the solutions. In the software that I use the solution are calculated in different points, as I posted before. Does it make sense in this case talking about nodes? Btw I understood your explanation, but I am trying difficulties in comparing this explanation to the software that I use.
lucamirtanini is offline   Reply With Quote

Old   November 23, 2018, 15:34
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lucamirtanini View Post
First of all thank you for all your answers, they are very helpful.
Every CFD book that I ve read defines the nodes as the place where you calculate the solutions. In the software that I use the solution are calculated in different points, as I posted before. Does it make sense in this case talking about nodes? Btw I understood your explanation, but I am trying difficulties in comparing this explanation to the software that I use.



From FDS guide:


"The governing equations are approximated using second-order accurate finite differences on a collection
of uniformly spaced three-dimensional grids. Multiple meshes can be processed in parallel using Message
Passing Interface (MPI) libraries. Scalar quantities are assigned to the center of each grid cell; the velocity
components at the appropriate cell faces; and vorticity components at cell edges. This is what is commonly
referred to as a staggered grid [12, 13]. Its main purpose is to avoid “checker-boarding” in pressure-velocity
coupling by naturally representing the pressure cell velocity divergence, a very important thermodynamic
quantity in the model."


so, your confusion is due to the fact that a staggered colocation is used.
FMDenaro is offline   Reply With Quote

Old   November 23, 2018, 15:35
Default
  #15
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
If we disregard the variables on edges (which are non standard), I see from the picture you linked that variables are just defined in cell and face centers.

Typically, finite difference and fem codes define variables at nodes (besides node centered finite volume codes)
sbaffini is offline   Reply With Quote

Old   November 23, 2018, 16:04
Default
  #16
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
From FDS guide:


"The governing equations are approximated using second-order accurate finite differences on a collection
of uniformly spaced three-dimensional grids. Multiple meshes can be processed in parallel using Message
Passing Interface (MPI) libraries. Scalar quantities are assigned to the center of each grid cell; the velocity
components at the appropriate cell faces; and vorticity components at cell edges. This is what is commonly
referred to as a staggered grid [12, 13]. Its main purpose is to avoid “checker-boarding” in pressure-velocity
coupling by naturally representing the pressure cell velocity divergence, a very important thermodynamic
quantity in the model."


so, your confusion is due to the fact that a staggered colocation is used.
Yes it is because of this, do you think that in case of staggered grid it makes sense talking about node? because in a staggered grid you have several nodes per cell
lucamirtanini is offline   Reply With Quote

Old   November 23, 2018, 16:06
Default
  #17
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lucamirtanini View Post
Yes it is because of this, do you think that in case of staggered grid it makes sense talking about node? because in a staggered grid you have several nodes per cell



Yes, each variable defines a own set of nodes
FMDenaro is offline   Reply With Quote

Old   November 24, 2018, 04:59
Default
  #18
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Yes, each variable defines a own set of nodes
Thank you, so in case of staggered grid, there are much more nodes than cells, isn't it?
lucamirtanini is offline   Reply With Quote

Old   November 24, 2018, 05:39
Default
  #19
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lucamirtanini View Post
Thank you, so in case of staggered grid, there are much more nodes than cells, isn't it?



Not exactly. Consider the 2d case for example.




|-------|

|...i,j.. |

| ........|

|-------|


At the center you colocate the pressure node, then you have the staggered velocities v_n, v_s, u_e, u_w that allows for the divergence-free constraint to be ensured in (i,j).
Apparently, you have one cell (for the pressure ) and four unknown velocities (two different grids for vertical and horizontal components). Actually, the velocities have a own computational cell that is staggered, too. Thus, you must consider that each variable has its own FV. And if you consider for example the velocity u_e it is the same that you would write as u_w for the pressure cell i+1,j.


Try by yourself to graphic the sketch and you will understand.
FMDenaro is offline   Reply With Quote

Old   November 24, 2018, 06:32
Default
  #20
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Not exactly. Consider the 2d case for example.




|-------|

|...i,j.. |

| ........|

|-------|


At the center you colocate the pressure node, then you have the staggered velocities v_n, v_s, u_e, u_w that allows for the divergence-free constraint to be ensured in (i,j).
Apparently, you have one cell (for the pressure ) and four unknown velocities (two different grids for vertical and horizontal components). Actually, the velocities have a own computational cell that is staggered, too. Thus, you must consider that each variable has its own FV. And if you consider for example the velocity u_e it is the same that you would write as u_w for the pressure cell i+1,j.


Try by yourself to graphic the sketch and you will understand.
Yes I understand what it is a staggered grid, but the nodes are always more than the cells also with your explanation
lucamirtanini 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
[ICEM] Error in mesh writing helios ANSYS Meshing & Geometry 21 August 19, 2021 15:18
Export velocity in node or in cell center jpina FLUENT 2 November 6, 2015 13:42
[Gmsh] Cell to node connectivity after 'gmshToFoam' Jibran OpenFOAM Meshing & Mesh Conversion 1 June 8, 2015 10:09
Partition: cell count = 0 metmet FLUENT 1 August 31, 2014 20:41
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 16:03


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