# Boundary conditions for Stream function-Vorticity method

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$)
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.
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.