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

Isnt Openfoam a staggered grid arrangement?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 17, 2017, 15:35
Default Isnt Openfoam a staggered grid arrangement?
  #1
New Member
 
Katt
Join Date: May 2017
Posts: 24
Rep Power: 2
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, 13:04
Default
  #2
New Member
 
Katt
Join Date: May 2017
Posts: 24
Rep Power: 2
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, 18:41
Default
  #3
Member
 
Emre
Join Date: Nov 2015
Location: Izmir, Turkey
Posts: 50
Rep Power: 4
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, 13:06
Default
  #4
New Member
 
Katt
Join Date: May 2017
Posts: 24
Rep Power: 2
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, 00:02
Default
  #5
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,944
Rep Power: 26
LuckyTran will become famous soon enoughLuckyTran will become famous soon enough
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?
LuckyTran is offline   Reply With Quote

Old   May 27, 2017, 15:23
Default
  #6
New Member
 
Katt
Join Date: May 2017
Posts: 24
Rep Power: 2
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.
Katt is offline   Reply With Quote

Old   May 27, 2017, 15:50
Default
  #7
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,944
Rep Power: 26
LuckyTran will become famous soon enoughLuckyTran will become famous soon enough
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.

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

Old   August 14, 2017, 09:23
Default
  #8
New Member
 
Katt
Join Date: May 2017
Posts: 24
Rep Power: 2
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, 09:16
Default
  #9
New Member
 
David Buentello
Join Date: Jan 2017
Posts: 13
Rep Power: 2
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, 19:53
Default
  #10
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 438
Rep Power: 17
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.
__________________
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

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 0 January 1, 2014 20:21
Question regarding non-uniform FVM staggered grid and order accuracy quarkz Main CFD Forum 2 October 26, 2012 03:11
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
staggered grid arrangement esinticik FLUENT 1 July 18, 2009 11:13
Grid Independent Solution Chuck Leakeas Main CFD Forum 2 May 26, 2000 11:18


All times are GMT -4. The time now is 21:07.