Now that we have the iteration equations,
we need to set up the boundary conditions
on the sides of the rectangle of our domain.
Let's start with the free-stream boundary condition.
Let's have a quick look at
the polar coordinate system again,
so this is x,
this is y,
we have a point here.
This is the angle Theta,
this is r. We have
the unit vector in the x-direction, looks like this.
This is what we call I.
The unit vector in the r direction follows r,
this is what we call r hat.
The unit vector in the Theta direction
is in perpendicular
to r hat and in the direction of increasing Theta,
so this is what we call Theta-hat.
What is the free-stream boundary condition?
We have the velocity field in the free-stream.
In our non-dimensionalized system of equations,
we've used the velocity of the free-stream
to non-dimensionalize the system,
so then this one is
just the unit vector in the x-direction.
It has a magnitude over velocity equal to one.
Then if we decompose I into components
in the direction of r and in the direction of Theta,
this angle is Theta.
We do the trigonometry
using the fact that these are unit vectors.
This will be cosine Theta r hat
minus sine Theta hat.
That's our free-stream velocity.
But what we really need is
the free-stream values of the stream function.
We use the fact that the partial derivative of
the stream function with respect to Theta is equal to r,
the velocity in the r hat direction.
These will be free-stream values,
and here r,
u then is r cosine Theta.
Similarly, the partial derivative of
the stream function with respect to
r is equal to
negative of the velocity component
in the Theta direction.
That's the negative of negative sine Theta,
so that's equal to sine Theta.
These are the free-stream values for the stream function.
The derivative with respect to Theta is r cosine Theta.
The derivative with respect to r is sine Theta.
A simple solution of
these equations is that in the free-stream,
the stream function then is r sine Theta,
so that satisfies both differential equations.
It also satisfies the boundary conditions
on the middle line so that we
have Psi equals zero when Theta is equal to zero,
sine zero is zero,
and Pi sine Pi is also zero.
That's our boundary condition
in the free-stream for the stream function.
The boundary condition for the vorticity is quite simple.
There is no vorticity in the free-stream,
so that would be zero.
What we need in our computation
is these values on the grid.
We needed on the edges of the rectangle,
the free-stream occurs when
cosine is equal to its last grid point,
which will be cosine_n.
Remember we have n grid points in the cosine direction.
If we translate this now to the grid,
we have the stream function Psi at
the last grid point in the cosine direction,
that's n. For all the grid points
in the Theta direction is supposed to be
the largest value of r. The largest value of r in
our cosine variable will be e to the cosine n,
and that will be for all angles.
That will be sine Theta_j,
so that's the free-stream condition.
This is the rectangle grid
that are far right side of the rectangle.
Similarly for the vorticity Omega n,
j then for all j will be equal to zero.
These are our boundary conditions.
Let me summarize.
Once you have the iteration equations,
you then need the boundary conditions.
Here we talk about the free-stream boundary conditions.
We want to have
the free-stream velocity equal to
the unit vector in the x-direction.
In order for that to happen,
we need to set the stream function equal
to r sine Theta in the free-stream.
When we translate that to our grid,
that occurs when the variable cosine
is at its maximum value,
which is cosine_n,
and then the free stream boundary conditions
will be Psi of n,
j equal e^ cosine_n sine Theta_j.
The vorticity Omega sub n,
j is equal to zero.
This is what you will implement in your simulation code.
I'm Jeff Chasnov.
Thanks for watching,
and I'll see you in the next video.