1.1.4.2. The Marker and Cell Method¶
1.1.4.2.1. Collocated vs. Staggered Grids¶
Illustration: consider a 1D Navier-Stokes System
On a standard collocated grid we have the following with FTCS:
1.1.4.2.2. Apply Pressure Correction Approach¶
Split the N-S Equations into two parts
Step One: Ignore pressure gradient in momentum equation for intermediate velocity (\(u^*\) is not divergence free). From Equation (4):
Step Two: Use intermediate velocity and correct it with the pressure (pressure enforces continuity) to obtain \(u^{n+1}\). From Equation (4):
Step Three: Use pressure correction Equation (6) to satsfy continuity, i.e. Equation (3) (just replace i in LHS of (6) with i+1 or i-1 and correct RHS)
Re-arranging this gives a form of the Poisson Equation, that ensures continuity:
This is similar to using FTCS on the divergence of the momentum equation and setting the divergence of velocity to zero, as shown in the Poisson Equation for pressure. The form here includes only the first term on the RHS of that complex expression.
1.1.4.2.3. Odd-Even Decoupling¶
Note:
The discretisation of pressure is on a \(2 \Delta x\) grid.
The discretisation of velocity is on a \(\Delta x\) grid.
In the final equation for \(p_i^n\) if the pressure used is at an even point on the grid, the velocity is at an odd point, this is called odd-even decoupling
Possible drawback of odd-even decoupling:
The pressure at point \(i\) is not influence by the velocity component \(u_i^n\) and viceversa \(\Rightarrow\) can result in high-frequency oscillations.
Stencil for \(p\): \(\quad i-2, \qquad i, \qquad i+2\)
Stencil for \(u^*\): \(\ \ \qquad i-1, \quad i+1\)
1.1.4.2.4. Demonstration of Odd-Even Decoupling¶
For the cavity flow, using:
41 x 41 mesh
dx = dy = 0.05
\(\nu\) = 0.01
Re = 200
Pressure is not monotonic due to odd-even decoupling
The stencil with the previous pressure correction method was:
Stencil for \(p\): \(\quad i-1, \qquad i, \ \qquad i+1\)
Stencil for \(u\): \(\quad i-1, \qquad \qquad \quad i+1\)
So the pressure at \(p_i\) is not influenced by \(u_i\)
(Source code, png, hires.png, pdf)
1.1.4.2.5. Solution to Odd-Even Decoupling¶
Define velocity and pressure on separate grids
Collocated grid (where odd-even decoupling took place):
Staggered grid (to prevent odd-even decoupling):
This solution was due to Harlow and Welch (1965)
What effect does this have on the discretised equations?
Continuity Equation written as:
“Fractional step” or “pressure correction”
As before, substitute (9) into (8)
How do we obtain \({u_{i+{1 \over 2}}^{*}}\) etc ?
Answer: Averaging We get values at \(i+{1 \over 2}\) and \(i-{1 \over 2}\) by averaging adjacent values
This makes the equations fully coupled and eliminates odd-even decoupling
1.1.4.2.6. Extension of Staggered Grid to 2D¶
This uses three independent grids:
One for \(p_{i,j}\) etc
One for \(u_{{i \pm {1 \over 2}}, {j}}\) etc
One for \(v_{i,{j \pm {1 \over 2}}}\) etc
Equations to be solved:
\(\psi \Rightarrow\) pressure divided by density
Conversion from Conservative Form to Non-Conservative Form (to check equivalence) via product rule:
1.1.4.2.7. Application of Finite Difference Method to Staggered Grid¶
1.1.4.2.8. Where is the Velocity Known?¶
Velocities \(u,v\) are known only at half mesh points - i.e. at mid points of vertical and horizontal cell edges.
Known at \(u_{i \pm {1 \over 2},j}\) and \(v_{i \pm {1 \over 2},j}\) etc
Unknown at \(u_{i,j}\) or \(u_{i \pm {1 \over 2},j \pm {1 \over 2}}\) etc
You need to average from the half mesh points
1.1.4.2.9. How do we get the Velocity at the Corners and Centre of the Cells?¶
The velocity is known at the midpoint of the cell edges
The velocity is unknown at the corners and centres of cells (e.g. points a, b, c and d)
So for example, if we wanted the following derivative:
At Point a:
Similarly for Point b
If we wanted to know this derivative:
At Point c:
At Point d:
1.1.4.2.10. Historical Notes¶
Harlow and Welch (1965) introduced the “Marker and Cell” method:
It included marker particles to follow free surfaces (now obsolete)
Current usage of “Marker and Cell” method (MAC method) means - “Projection Method using a Staggered Grid”