I have used a MATLAB finite difference code to solve a lid driven cavity flow, based on a Stream function-Vorticity formulation of the viscous, incompressible Navier Stokes equations. Details about the method can be found here.

I want to change the code to simulate the flow around a square box in a rectangular domain, where the flow is uniform on the left side, and the flow is limited by the horisontal walls on the top and bottom. However, on the right side of the domain, where the flow exits, I have no idea how to express the boundary conditions.

How can I express the boundary conditions on the right side? Is it even possible for this method?


(In the following I assume twodimensional with main flowin positive x direction, the velocity vector is considered $\vec{u} = (u \quad v)^T$)

The boundary conditions you could apply to the outlet:

  1. homogeneous Neumann for the streamwise velocity and no tangential stress, i.e. $\frac{\partial u}{\partial x}$ and $v = 0$
  2. If zour flow is turbulent you might want a proper outflow condition based on the wave equation: $\frac{\vec{u}}{t} + \vec{c} \frac{\vec{u}}{\vec{x}} = 0$ with $\vec{c}$ the convective outlet velocity which should be in the order of your bulk velocity.

Both these conditions ignore pressure. From a physical point of view your method then needs to generate the pressure gradient driving the flow. I think that formulation does allow that but I have never worked with it. Another issue that you have to keep in mind is that your domain needs to be long enough to allow the pressure gradient to develop behind the obstacle. Or in other words you need to simulate the whole wake (or the most part of it). If you cut through the wake your solver might not even converge.

It should be possible to reformulate both boundary conditions to streamfunction and vorticity values. The first option is probably the simpler one as it only requires $\omega = 0$ and the streamlines to be horizontal.


Your Answer

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

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