CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Isnt Openfoam a staggered grid arrangement? (https://www.cfd-online.com/Forums/openfoam/187893-isnt-openfoam-staggered-grid-arrangement.html)

Katt May 17, 2017 15:35

Isnt Openfoam a staggered grid arrangement?
 
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 May 19, 2017 13:04

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?

ordinary May 19, 2017 18:41

Staggered of course. As long as it's allowed to treat mesh with bias factor it's staggered.

Katt May 22, 2017 13:06

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

LuckyTran May 26, 2017 00:02

Quote:

Originally Posted by Katt (Post 649853)
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?

Katt May 27, 2017 15:23

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.

LuckyTran May 27, 2017 15:50

Quote:

Originally Posted by Katt (Post 650550)
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.

Katt August 14, 2017 09:23

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?

pyroWinter August 15, 2017 09:16

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.

santiagomarquezd August 25, 2017 19:53

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.


All times are GMT -4. The time now is 05:35.