0
$\begingroup$

I am solving the steady-state incompressible Stokes equations in 2D:

\begin{equation} \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} = 0, \end{equation}

\begin{equation} \mu\left[\frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2}\right] - \frac{\partial p}{\partial x} = 0, \end{equation} and \begin{equation} \mu\left[\frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2}\right] - \frac{\partial p}{\partial y} = 0. \end{equation}

I'm using finite differences with a staggered grid approach (velocities defined at the faces and pressure at the cell centers).

I'm struggling to find how to implement pressure boundary conditions in the left and bottom faces. My pressure stencil is an "L" stencil: I use $p_{i,j+1}$, $p_{ij}$, and $p_{i+1,j}$. Hence, at the left and bottom-left volumes, I don't use the pressure value in the "ghost cell". Any clue on how to implement pressure BCs in this setting? I would like, for instance, to validate my code with a parallel plate simulation (prescribed pressure at left and right faces, and no-slip at top and bottom faces).

$\endgroup$
  • 1
    $\begingroup$ The nature of the pressure field is that it is globally coupled. You should use a symmetric approximation of the gradient of the pressure, rather than the $L$ shaped stencil. $\endgroup$ – Wolfgang Bangerth Feb 6 at 2:20
  • $\begingroup$ Hi Wolfgang. I understand your comment, but it is very typical to solve the pressure-velocity system with an staggered grid. For the momentum in x direction, I center my difference equation in i+1/2,j. Then, pressure gradient in this equation is defined as (pi+1,j - pi,j)/dx. Conversely, as (pi,j+1 - pi,j)/dy for the momentum in y direction. I don't see anything wrong with this. It's a very standard discretization technique. However, I don't see details around about how to implement prescribed pressure BCs. $\endgroup$ – Rafael March Feb 14 at 16:46
  • $\begingroup$ But staggered grid is not equal to asymmetric finite difference stencils. There is no reason to use non-symmetric stencils. $\endgroup$ – Wolfgang Bangerth Feb 15 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.