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

Isnt Openfoam a staggered grid arrangement?

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By LuckyTran
  • 1 Post By Katt
  • 1 Post By LuckyTran
  • 3 Post By santiagomarquezd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2017, 16:35
Default Isnt Openfoam a staggered grid arrangement?
  #1
Member
 
Katt
Join Date: May 2017
Posts: 30
Rep Power: 9
Katt is on a distinguished road
Hi everyone;

Does OpenFOAM (especially interFOAM) use a collocated or staggered grid?

From most of the research papers, I come across the answer is collocated. It also makes sense as the pressure and velocity fields are represented as "volScalar" and "volVector" fields respectively.

But in the pEqn.H file where the pressure-velocity coupling is being made, I notice the face flux is being computed to obtain a divergence free velocity and later it is being reconstructed to get an approximate divergence free velocity field at the cell centre.

Isn't it that the velocity field computed at the face centres makes the system staggered?

Hope you can clarify my doubt;
Katty
Katt is offline   Reply With Quote

Old   May 19, 2017, 14:04
Default
  #2
Member
 
Katt
Join Date: May 2017
Posts: 30
Rep Power: 9
Katt is on a distinguished road
Can we have some healthy discussion here foamers? Something related to my previous comment is:
why PISO computes face centre flux and reconstructs the velocity field rather than directly computing the cell centre velocity field saying the fvm implementation is collocated?
Katt is offline   Reply With Quote

Old   May 19, 2017, 19:41
Default
  #3
Member
 
Emre
Join Date: Nov 2015
Location: Izmir, Turkey
Posts: 97
Rep Power: 11
ordinary is on a distinguished road
Staggered of course. As long as it's allowed to treat mesh with bias factor it's staggered.
ordinary is offline   Reply With Quote

Old   May 22, 2017, 14:06
Default
  #4
Member
 
Katt
Join Date: May 2017
Posts: 30
Rep Power: 9
Katt is on a distinguished road
The answer is: openfoam uses a mixed collocated and staggered grid approach. To preserve pressure-velocity coupling the flux is treated as a primary variable over velocity and later reconstruct the cell centre Velocity that will be used in the momentum equation. Reference: henrik rusche PhD pages 125-127

HTH
Katt is offline   Reply With Quote

Old   May 26, 2017, 01:02
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,762
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Katt View Post
The answer is: openfoam uses a mixed collocated and staggered grid approach. To preserve pressure-velocity coupling the flux is treated as a primary variable over velocity and later reconstruct the cell centre Velocity that will be used in the momentum equation. Reference: henrik rusche PhD pages 125-127

HTH
I never really understood the fuss and the need to distinguish between staggered or collocated grid in FVM. To me it's clear that FVM has cell centers where the cell values are stored and then face fluxes.

If you solve a pressure-correction equation (a la SIMPLE/PISO/PIMPLE) then it is clear that you solve for the face fluxes when you then impose to do the correction.

In the old days when FVM was not widely used it made sense to talk about collocated & staggered. In FVM there is also this idea, but it is much clearer to call them by their names in the FVM-sense, either cell values or face values. But where does the grid participate in this other than to determine the topology of the faces?
tariq likes this.
LuckyTran is offline   Reply With Quote

Old   May 27, 2017, 16:23
Default
  #6
Member
 
Katt
Join Date: May 2017
Posts: 30
Rep Power: 9
Katt is on a distinguished road
I completely agree with you but I guess we just have a different view. Taking FVM out for a while, there is a substantial difference between Staggered and Collocated grid arrangement of variables in terms of the computational effort and accuracy.

My question arises because all the research papers say the method implemented in OpenFOAM is "collocated" then why do you even bother to find the face values? Isn't that misleading?

I even came across a software named "Gerris" who do the same thing but there the main author "Popinet" says the method is "collocated" but the research papers using Gerris claim it is a staggered approach.

Overall, my opinion is that though the method is clear the naming conventions I believe are a bit different to real CFD terminology.
tariq likes this.
Katt is offline   Reply With Quote

Old   May 27, 2017, 16:50
Default
  #7
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,762
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Katt View Post
I completely agree with you but I guess we just have a different view. Taking FVM out for a while, there is a substantial difference between Staggered and Collocated grid arrangement of variables in terms of the computational effort and accuracy.

My question arises because all the research papers say the method implemented in OpenFOAM is "collocated" then why do you even bother to find the face values? Isn't that misleading?
If you take out FVM then you can do whatever you want. Don't ask what openfoam does then. That's illogical to ask what an FVM code does but to ignore that it is an FVM code.

In FVM you relate the change of the cell value to the fluxes across the faces. That is the Gauss divergence theorem which FVM relies on heavily, which allows you to construct the system of equations that need solving. You always need cell and face values. The question is which do you keep and store, and which do you reconstruct based on gradients. Or do you keep both? So beyond keeping track of whether you are talking about cell values vs face fluxes, I don't get why collocated vs staggered is needed to be discussed. Anyway, these are just my opinions.
tariq likes this.

Last edited by LuckyTran; May 28, 2017 at 00:12.
LuckyTran is offline   Reply With Quote

Old   August 14, 2017, 10:23
Default
  #8
Member
 
Katt
Join Date: May 2017
Posts: 30
Rep Power: 9
Katt is on a distinguished road
Hi,

I taught of asking a related question here due to similarity of the topic we discussed above.

I see how does the entire PISO algorithm work:
1. At the end of present time step, we store velocity at cell centers,
2. At the start of next time step, we interpolate these cell center data to face centers and lump all the source terms as momentum flux
3. Now we solve for the pressure based on continuity constraint and compute the continuity flux at the cell faces.
4. Then, reconstruct back the cell center velocity from the conserved flux.

Now my question:
When we do the interpolation in (2) and reconstruct in (4) dont we induce continuity errors?
Katt is offline   Reply With Quote

Old   August 15, 2017, 10:16
Default
  #9
New Member
 
David Buentello
Join Date: Jan 2017
Posts: 15
Rep Power: 9
pyroWinter is on a distinguished road
Hello Katt,
Regarding your last question, I am no expert thus I am not sure about my answer, but to my understanding, isnt this the reason we use the CFL condition and discretization schemes (e.g. upwind) to ensure the appropiate conservation/propagation of information as we calculate?
From what I have learned, OpenFOAM uses a complex mixture of collocated/staggered grids, as for example when you start working with multiphase simulations the domain is treated a bit differently than conventionally. For example, particle treatment in OpenFOAM for some schemes is interpolated then associated to the center of the element (where the particle may be found) thus making this an staggered approach.
pyroWinter is offline   Reply With Quote

Old   August 25, 2017, 20:53
Default
  #10
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
In some sense is collocated since you have p and U in cell centres, but the calculations are done with p in cells and U in the form of a flux, in faces, in an staggered fashion. The whole thing is in pEqn assembling and solving.
tariq, ancolli and Jun_93 like this.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Reply

Tags
collocated grid, staggered grid


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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
Question regarding non-uniform FVM staggered grid and order accuracy quarkz Main CFD Forum 2 October 26, 2012 04:11
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
staggered grid arrangement esinticik FLUENT 1 July 18, 2009 12:13
Grid Independent Solution Chuck Leakeas Main CFD Forum 2 May 26, 2000 12:18


All times are GMT -4. The time now is 02:37.