1.1.4.3. Ghost Cell Boundary Conditions

1.1.4.3.1. Boundary Conditions for Incompressible Navier Stokes

In dimensionless form, the Navier-Stokes Equations are:

(1)\[\nabla \cdot \mathbf{u} = 0\]
(2)\[{\partial \mathbf{u} \over \partial t} + \mathbf{u} \cdot \nabla \mathbf{u}= -\nabla p + {1 \over Re} \nabla^2 \mathbf{u}\]

The independent variable is \(\mathbf{x} \in \Omega\)

Initial Conditions are (some function for the initial conditions), with the the velocity divergence free in the domain \(\Omega\) i.e. \(\nabla \cdot \mathbf{u}_0 = 0\)

(3)\[\mathbf{u}(\mathbf{x},t_0) = \mathbf{u}_0(\mathbf{x})\]

Boundary Conditions are at \(\mathbf{x} \in \Gamma = \partial \Omega\)

(4)\[\mathbf{u}(\mathbf{x},t) = \mathbf{u}_\Gamma (\mathbf{x},t)\]

Global Mass Conservation these are at the inflow or outflow boundaries (\(\mathbf{n}\) is the vector normal to the boundary \(\Gamma\))

(5)\[\oint_\Gamma \mathbf{n} \cdot \mathbf{u}_\Gamma d \sigma = 0\]

In practice, B.C.s are stipulated separately for the different types:

  • inflow

  • outflow

  • solid surface

  • far field

../_images/boundary_conditions.png
  • No slip at body surface \(\Rightarrow \mathbf{u}_\Gamma = \mathbf{u}_{body}\) (=0 usually)

  • Pressure at surface is not known - no equation for p (we have to derive one - e.g. Poisson Equation) - PPE (Pressure Poisson Equation) - the divergence of convection

(6)\[\nabla^2 p = -\nabla \cdot (\mathbf{u} \cdot \nabla \mathbf{u})\]

Need to use (2) and (6) ((6) ensures continuity, as the divergence of velocity has been set to zero in it’s derivation)

Still don’t know BCs for pressure, we have replaced the Continuity Equation ((1)) with the Poisson Equation ((6)), so we have increased the order of the equations by one, which means we would need an additional boundary condition, which we don’t have.

1.1.4.3.2. Fractional Step Method or Projection Method

1.1.4.3.2.1. Method used by Rempfer (2006)

  • Step 1: Omit pressure term in NS and find intermediate velocity - for explicit formulation (we could use implicit):

(7)\[{{\mathbf{u}^* - \mathbf{u}^n} \over {\Delta t}} = -(\mathbf{u}^n \cdot \nabla) \mathbf{u}^n + {1 \over Re} \nabla^2 \mathbf{u}^n\]
  • Step 2: Apply no slip boundary condition:

(8)\[\left . \mathbf{u}^* \right |_\Gamma = \mathbf{u}_\Gamma (\mathbf{x}, t^{n+1}) \quad \mathbf{x} \in \Gamma\]
  • Step 3: \(\mathbf{u}^*\) is not necessarily divergence free, so restore divergence free velocity by introducing a “projector” \(\tilde{p}\): (this is the projection in the Pressure Projection Method)

(9)\[{{ \mathbf{u}^{n+1} - \mathbf{u}^* } \over {\Delta t}} = -\nabla \tilde{p}^{n+1} \quad \mathbf{x} \in \Gamma\]
  • Step 4: Apply Continuity Equation at \(n+1\) (divergence free condition):

(10)\[\nabla \cdot \mathbf{u}^{n+1} = 0\]
  • Step 5: Apply boundary condition using normal vector:

(11)\[\left . \mathbf{n} \cdot \mathbf{u}^{n+1} \right |_\Gamma = \mathbf{n} \cdot \mathbf{u}_\Gamma (\mathbf{x},t^{n+1})\]

Observations: \(\tilde{p}\) is not identical with pressure - we have taken two steps so the equations contain an error. The pressure is a pseudo pressure (numerical pressure) - all it does is correct the velocity so it’s divergence free

(12)\[\nabla^2 \tilde{p}^{n+1} ={ {\nabla \cdot \mathbf{u}^*} \over \Delta t}\]

Kim and Moin (1984) Say that the pressure, p is given by:

\[p = \tilde{p} + {{\Delta t} \over {2 Re}} \nabla^2 \tilde{p}\]

Equation for \(\tilde{p}\)

\[\nabla^2 \tilde{p}^{n+1} = {{\nabla \cdot \mathbf{u}^*} \over {\Delta t}}\]

By considering BCs (8) (11) \(\Rightarrow \quad \left . \mathbf{n} \cdot \nabla \tilde{p}^{n+1} \right |_\Gamma = 0\)

Or:

(13)\[{{\partial \tilde{p}^{n+1}} \over {\partial n}} = 0\]

i.e. homogeneous Neumann Boundary Condition

Highly controversial issue

1.1.4.3.2.2. Method by Gresho and Sani (1987)

Another paper has an alternate method - take the normal of the momentum equation at the boundary to set pressure normal to boundary, everywhere else use Poisson Equation, Continuity Equation and ordinary Momentum Equation, i.e.

\[{\partial u \over \partial t} + \nabla P = \nu \nabla^2 u - u \cdot \nabla u = f\]

and

\[\nabla \cdot ({\partial u \over \partial t}) = 0 \qquad \text{in} \ \Omega\]

these imply

\[\nabla^2 P = \nabla \cdot f \qquad \text{in} \ \Omega\]

also

\[{\partial P \over \partial n} = \mathbf{n} \cdot (f - ({\partial u \over \partial t})) \qquad \text{on} \ \Gamma\]

Again this gives a Neumann boundary condition - but Rempfer says that this is not correct

It looks like one method says that the velocity should be normal to the boundary and the other that pressure should be normal to the boundary.

1.1.4.3.2.3. Method by Kim and Moin

Say that pressure boundary conditions are not important because of the use of a staggered grid - could be naive

1.1.4.3.3. Ghost Cells

1.1.4.3.3.1. Method by Harlow and Welsh

  • Use of “Ghost Cells” - for reflection of field variables near a wall.

  • Normal pressure is not a condition set directly at the wall, but implied by the values either side of the wall.

  • The same is true for velocity.

Hence, in this scheme there is no difference between the opinions of Rempfer (2006) and Gresho and Sani (1987), although the opinion of Kim and Moin (1984) is clearly slightly misleading.

1.1.4.3.3.2. Boundary Conditions at Rigid Walls

Rigid walls may be of two types:

  • No-slip

  • Free-slip (could be a plane of symmetry - or a greased surface)

../_images/wall.png
  • At the wall \(v = 0\)

  • On the fluid side \(v \ne 0\)

  • On the outside \(v' = -v\) (no slip)

  • On the outside \(v' = +v\) (free slip)

Harlow and Welch use these velocity BCs in order to set the pressure BCs using “Ghost Cells”. The velocity at the wall is not set directly, but is implied by the pressure BCs.

Free slip wall

Vertical wall: from the momentum equation for \(u\) (with the reversal of all normal velocities and no change in the tangential velocity):

For a wall at \(i+{1 \over 2}\), the implied wall velocity \(\forall j\) is:

\[u_{i+{1 \over 2}} = 0\]

In the Ghost Cell, the velocities are:

\[u_{i+{3 \over 2}} = -u_{i+{1 \over 2}}\]
\[u_{i+{1}} = -u_{i}\]

Hence, the pressure BCs to set is:

\[\psi' = \psi \pm g_x \Delta x\]

\(+ \Rightarrow\) fluid is on the left of the wall

\(- \Rightarrow\) fluid is on the right of the wall

Similarly for a Horizontal wall at \(j + {1 \over 2}\):

\[\psi' = \psi \pm g_y \Delta y\]

\(+ \Rightarrow\) fluid is below the wall

\(- \Rightarrow\) fluid is above the wall

No slip wall

Vertical wall: from the momentum equation for \(u\) (with the reversal of all tangential velocities and no change in the normal velocity):

For a wall at \(i+{1 \over 2}\), the implied wall velocity \(\forall j\) is:

\[u_{i+{1 \over 2}} = 0\]

In the Ghost Cell, the velocities are:

\[u_{i+{3 \over 2}} = u_{i+{1 \over 2}}\]
\[u_{i+{1}} = u_{i}\]

Hence, the pressure BCs to set is:

\[\psi' = \psi \pm g_x \Delta x \pm ({{2 \nu u_{i-{1 \over 2}}} \over {\Delta x}})\]

\(+ \Rightarrow\) fluid is on the left of the wall

\(- \Rightarrow\) fluid is on the right of the wall

Similarly for a Horizontal wall at \(j + {1 \over 2}\):

\[\psi' = \psi \pm g_y \Delta y \pm ({{2 \nu v_{j-{1 \over 2}}} \over {\Delta y}})\]

\(+ \Rightarrow\) fluid is below the wall

\(- \Rightarrow\) fluid is above the wall