[MUSIC]
We're ready now to set up a numerical method for the steady flow problem.
We're going to use a finite difference method which requires defining a grid.
We want to use the symmetry of the problem when the flow is steady.
And the symmetry if you remember, is that the velocity field
in the x-direction in the lower half of the plane is equal to
the velocity field in the x-direction in the upper half of the plane.
So we have u then is an even function,
while the vertical velocity has opposite signs.
So v (x- y) = -v(x, y).
So if it's flowing down on the top, it's flowing up in the bottom.
We want to translate this into the stream function and the scale of vorticity.
So we need to use that u is equal to the partial of psi with respect to y.
And omega is equal to the partial of v with respect to x
minus the partial of u with respect to y.
So these are the Cartesian coordinates definitions which you should
have done as a reading assignment, the homework assignment.
Okay, so now another principle that we need to use that if a function
is even in a variable then the derivative of the function is odd in the variable.
And if a function is odd in the variable,
the derivative of the function is even in the variable.
So if u is even in the y-variable, the derivative of psi and
the y variable if the derivative is even because u is even,
then the function psi and the y variable is odd.
So we have psi of (x- y) equals minus psi of (x, y).
If we look at the vorticity now,
x is not the variable that we're looking at the symmetry in.
So v is an odd function in y, u is an even function in y, but
the derivative of u with respect to y then is an odd function in y.
So omega then is an odd function in y.
Omega of x minus y equals minus omega of (x, y).
So both the stream function and the vorticity are odd functions.
Okay, so let's now set up our grid.
I'll put it down here.
So we're going to have square or rectangle that we're solving on.
This will be our psi coordinate.
I will mark this by subscript i,
this will be our theta coordinate.
I'll mark this by subscript j.
Psi then starts at 0 which will be the surface of the cylinder,
and then goes to some maximum value which I call psi max.
Theta starts at 0, o now is in the mid-line behind the cylinder, and
then goes around the top half of the plane until it gets to pi.
And that will be pi then will be the mid-line in front of the cylinder,
behind the cylinder in front of the cylinder.
So if I label this then, this is on the cylinder here.
This is the cylinder, this side, this then is the free stream,
Where we're the maximum distance away from the cylinder.
This one at theta equals 0 is behind,
it's on the mid-line, But
it's behind the cylinder, and
at theta equals pi is also on the mid-line,
but it's in front of the cylinder, okay?
And that's our domain of solution.
So we want to discretise now the equations on this domain.
So we discretise, we take psi sub i equals
(i- 1) times some grid spacing which I'll call h.
And here we're going to set i equal to 1, 2 to the maximum value which I'll call n.
Then we'll take theta and I'll use the j subscript,
theta sub j equals j- 1, and I'm going to use a square grid cell.
So I'm going to use the same grid spacing in both the psi variable and
the theta variable.
And here j will go from 1 to possibly some
other number which I'll call m, okay?
So what is this grid spacing h?
Well we know that theta goes from 0 to pi.
So when j equals m, theta has to be pi.
So we know that pi is equal to m- 1 times h,
which tells us then that our grid spacing h,
is equal to pi divided by the number
of theta points minus 1, okay?
So that's our grid spacing.
Now we can also figure out what the maximum value of psi is.
So the maximum value of psi is going to be i = n.
So (n- 1) times h, which is
pi divided by (n- 1), okay?
And that will be the maximum value here.
The typical simulation that you will do at least the one that I asked you to do for
your assessment is to choose n equals to m.
So if we take the same number of grid points in the psi
direction as in the theta direction, then we get psi
max is equal to pi, which means that our maximum radius,
remembering that the radius of the cylinder is 1.
So the maximum radius of our domain, right?
Our domain is going to be a big circle or
actually a semicircle because we're only doing the top half of the domain.
This is going to be e raised to the psi max, which is x to the pi.
If you put that in your calculator, that works out to be a number around 23, okay?
So if we choose n = m, our calculation then will be 23 radius is of the cylinder.
For a low Reynolds number,
that's pretty sufficient to have an accurate calculation.
So let me summarize, we need to set up a finite difference method.
A finite difference method depends on a grid.
So we set up a grid in our coordinate system,
the log polar coordinate system, grid is a rectangle without any holes.
The psi value goes from 0 to psi max.
The theta value is just the top half of the domain goes from 0 to pi.
We're going to need boundary conditions on the mid-line, the cylinder, and
the free stream.
The mid-line boundary condition is quite simple because psi and
omega are odd functions of y.
So that means that on the mid-line here, psi and omega have to be both 0, right?
Psi equals omega equals 0 because they are odd
functions of y, and this is that y equal to 0.
So then we'll have to talk about the boundary conditions for the cylinder and
the free stream.
Our discretization is quite simple.
Our h is pi over the number of grid points and
theta minus 1, and we're using a square grid cells.
Then if we choose n equals m, which we will for the steady solution,
then our maximum radius will be 23, around 23.
Considering that the radius of the cylinder is 1,
that gives us lots of room above, below, and behind the cylinder.
I'm Jeff Chazanov.
Thanks for watching.
And I'll see you in the next video