The Stokes equations are $$-\Delta \mathbf u + \nabla p = f \text{, in }\Omega,$$ and $$ -\nabla \cdot \mathbf u = g, \text{ in } \Omega$$ where $\mathbf u = \left( u, v \right)$ is the flow velocity, and $p$ is the pressure.

I tried to solve the equations by the finite difference method and marker-and-cell scheme, and I found this paper. It helps.

Simply put, I generate a 2D structured mesh. For vertical element faces, the unknown is $u$. For horizontal element faces, the unknown is $v$.

But I have a question about dealing with the case when the element face is near the boundary of the domain.

The paper said that a ghost value should be introduced, as the figure below shows.

enter image description here

The paper presented a formula to interpolate the ghost value: $$\left(u_{0, j} + u_{1,j}\right)/2=u_D\left(x_j, 1\right)$$, here I want the (red) boundary to have a Dirichlet boundary condition $v = 0$. As I understood, $u_D$ here is $v = 0$.

The thing I do not understand is: the boundary is horizontal, and its variable is $v$, but either $u_{1,j}$ or $u_{0,j}$ is the vertical component of the flow velocity. Why can we use a known horizontal component value (at the red boundary) to interpolate the ghost value which is a vertical component of the flow velocity?

Can anyone help me?


1 Answer 1


The paper is not specifying a Dirichlet $v=0$ at $y=1$, but $u=u_D$ at $y=1$. This could be used as a wall slip condition: for $u_D=0$, you have a no slip boundary wall; that is, the flow tangential to the wall is zero. For $u_D \neq 0$, you could also interpret this as a no slip boundary wall, however the wall is moving with some fixed horizontal velocity $u_D$.

There are of course other interpretations of what setting a Dirichlet boundary condition on $u$ means, these are just two possible examples.

  • $\begingroup$ So, that means: apart from $v = 0$ (non-penetration) imposed at the boundary ($y = 0$), a $u_D$ is also needed at that boundary (non-slip or slip), in order to introduce the ghost value. Am I correct? $\endgroup$ May 30, 2023 at 6:47
  • 1
    $\begingroup$ yes, you specify both v and u at the wall. $\endgroup$ May 31, 2023 at 4:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.