In lesson two we have seen the basic CFD approach,
which enables us to solve a partial differential
equation, as a set of algebraic expression.
The basic approach is that, we take the fluid
domain and put lots of grid points, and these
grid points are spread throughout the domain,
and it is at these grid points, we would like
to have the velocity or the corresponding
variables which are there in the equation.
We substitute finite difference approximations
which are valid at that grid point into the
governing equation, and covert the partial
differential equation into an approximate
algebraic equation valid at that particular
point. And the idea is to solve this algebraic
equation, in order to get the variable value.
For example, the velocity at point i,j but
what we saw is that the variable value at
point i,j is expressed in terms of the variable
values at the neighboring points; that is
at i plus 1, j; i minus 1, j; i, j plus 1
and i, j minus 1.
So, we have to write down similar approximations
at each other grid points, and then we will
end up a set of n algebraic equation, for
the n grid points at which we want to get
the velocities. So, in the end we would have
converted one partial differential equation
into a set of n algebraic equation. And the
idea is that if we solve all this set of n
linear list algebraic equation together, we
will be able to get the solution which is
the w at discrete nodes. So, in this lecture
we will see how this particular process goes
on.
So, we are considering a rectangular duct,
we had divided this into five equal intervals
in the x direction, and similarly in the y
direction. Although we cannot see it from
this picture here; delta x is the same and
delta y is the same. So, we have x going in
this direction, and y going in this direction.
And similarly i going in this direction, and
j going in this direction. We can identify
any grid point with two indices i and j representing
the ith grid line, coordinate line in the
x direction, and jth coordinate line in the
y direction, and the intersection of ith coordinate
line and the jth coordinate line will give
us the grid point.
For example, if this is i coordinate line,
and this is j coordinate line. this point
here will be i ,j. and the governing equation
which is dou square w by dou x square plus
dou square w by dou y square equal to c, was
converted into w at i plus 1 comma j minus
2 w i comma j plus w i minus 1 comma j divided
by delta x square plus w i j plus 1 minus
2 w i comma j plus w i j minus 1 by delta
y square is equal to c.
So, at point i j, this is an approximate form
of this equation, and we see that if we solve
this for w i j. If we can solve this equation,
is for the value w at i comma j. So, if we
know these values; the j plus 1 value j minus
1 value, then we will be able to get w i j,
but unfortunately at this stage we do not
know what the neighboring points are. So,
we write, we take this as the template and
write down similar equations for all the points
that we do not know. All the points at which
we would like to know the velocity. So, that
we will have a system of equations in which
all the velocity variables that are unknown
and we solve them simultaneously.
So, this is what we are going to look at in
today’s lecture, with the specific example
of this 5 by 5 division of the flow domain.
So, in this flow domain we have boundary conditions,
and since we have 5 by 5 intervals. So, you
have 6 by 6, 6 by 6 points at which we have
the grid points. So, there are 36 grid points
these are intersection of the coordinate lines
here. And out of this we have the boundary
condition; that w is equal to zero on all
walls. So, that the velocity at this point
which is on the boundary, at this point on
the boundary, all those things are known.
So, it is only these interior points are unknown.
So, we do not know the value at this point,
at this point, this point, this point, at
these points marked by a circle. So, there
are 16 points in the interior at which w are
not known. So, we would like to apply this
for every grid point at which the value is
not known, and then we would like to get a
systematic equation.
So, let us. To illustrate this let’s see
how we can apply this template here, to the
first point here. So, the first point here,
is i equal to 1 2 3 4 5 6 and j is also equal
to 1 2 3 4 5 6. So, the first point has i
equal to 2 and j equal to 2. So, we will call
this as 2 2. So, if you take the template
equation a here and apply this to this point
here. So, the value of w i plus 1 j comma
j this will become w 3,2 minus 2 w 2, 2 plus
here w i minus 1 will be 1,2 divided by delta
x square plus here this is w 2, 3 minus 2
w 2, 2 plus w 2, 1 divided by delta y square
equal to c.
So, at this point where there is no confusion,
we can leave out those commas, because we
have only single digit indices here. So, we
can leave out the commas and just write this
as w 3 2 minus 2 w 2 2 plus w 1 2 by delta
x square plus w 2 3 minus 2 w 2 2 plus w 2
1 divided by delta y square equal to c, and
we can see that, we have got a specific equation
with values here in order to make further
progress, we can substitute all the variables
that are known in this.
For example, c is a given value. So, let us
take as a part of problem formulation c to
be minus 1000. This actually 1 by mu d p by
d z, if we take mu to be 0.001 Pascal second
in s i units for water, and d p by d z is
negative for the flow to be positive in the,
for the w to be positive. So, we will take
d p by d z to be minus 1 and that gives us
minus 1 by 0.001. So, that is minus thousand.
So, this is in SI units.
And we need to have delta x and delta y. So,
let us take this in order to get some numerical
value, let us take delta x to be 0.1 meter
and delta y to be 0.05 meters. So, if you
know the total length, and if you divided
this into five parts then you can get this.
So, this will imply that the total length
in the x direction is 0.5 meters and total
length in the y direction is 0.25 meters,
25 centimeters and 50 centimeters.
So, these are numerical values, and these
come as part of the problem specification.
If you want to find the velocities and all
that, you need to know what all the physical
dimensions of the domain, and from the physical
dimensions, and the number of grid points
that you want to have you can fix delta x
and delta y. the constant here is part of
the equation, and correspond to equation you
have a certain numerical value. So, you have
this, and you also have the boundary condition
that w equal to zero on all walls.
Now if you look at this equation here, wherever
there is an index of one, either for x or
for y; that indicates a boundary point, because
one means that this one here. So, x is equal
to 1 is this 1. For all this points x is equal
to 1, and all these lie on the boundary, and
similarly y equal to 1. So, that is this point
this index here, refers to the bottom boundary.
Similarly for anything which is 6, which is
the extreme location.
So, this becomes 100 w 3 2 minus 200 w 2 2
this is 400. So, this is plus 400 w 2 3 minus
800 w 2 2 is equal to minus 1000. So, w 2
2 800 and w 2 2 minus 200 will finally, give
us 100 w 3 2 minus 1000 w 2 2 plus 400 w 2
3 equal to minus 1000. So, the application
of this template at point 22 has given us
this equation and we can see that this equation
has w 2 2; that is the w velocity at point
22 as one of the variables and this is given
we cannot solve this equation directly, because
we do not know what w 3 2 and w 2 3 are.
So, we need to write equations for these two
things, and when we write those two equations
we will find new values. So, let us just write
down the equation for this point in order
to get w 3 2. You need to write the equation
at point 32 here and point 32 means that i
is equal to 3 and j is equal to 2. So, let
us come back to equation a and then substitute
i equal to 3 and j equal to 2 what do we get
we get w 4 4 2 minus 2 w 3 2 plus w 2 2 divided
by delta x square plus, and here its w 3 3
minus 2 w 3 2 plus w 3 1 divided by delta
y square equal to c here.
And here again we try to substitute known
values of delta x and delta y c and this point
which is on the boundary, and that becomes
zero. And once you substitute that delta x
whole square is 0.01. So, this is 100 w 4
2 minus 200 w 3 2 plus 100 w 2 2 plus 400
w 3 3 minus 800 w 3 2 equal to minus 1000.
Again we can add these two to get 100 w 4
2 minus 1000 w 3 2 plus 100 w 2 2 plus 400
w 3 3 equal to minus 1000.
Now, if you look at these two equations, we
would like to get w 2 2 from this, but in
order to do that we need to know what this
is, and when we write this equation we have
w 4 2 this 1 w 2 2 and this. So, we can say
from this we can get w 2 2, and we have one
more equation. So, we have 2 equations to
get this one, but still w 2 3 is not known,
and w 4 2 is not known, w 3 3 is not known.
So, we need to write those equations also.
So, let us just for the sake illustration,
let us try to write an equation for w 2 3,
which means that i equal to 2 and j equal
to 3, if we substitute again in this, and
let us just substitute. So, w 2 3 3 minus
2 w 2 3 plus w 1 3 by delta x square plus
w 2 4 minus 2 w 2 2 3 plus w 2 2 divided by
delta y square equal to minus 1000. So, we
substitute the delta x square and delta y
square and this is again zero, and we should
be able to get 100 w 3 3 minus 1000 w 2 3
plus 400 w 2 4 plus 400 w 2 2 equal to minus
1000.
So, this is one more equation, and this is
the equation for 2 3, and this introduces
3 3 2 4, and 2 2 its already known. So, we
can see that every time write an equation
we have new values. So, let us just try to
map this out in this to see where we are.
So, when we look at point 22. So, that is
this one here. We have value here, and then
3 2 is this point, and 2 3 is this point here.
So, you have, these are the. So, this is linked
to these two.
Now when we write 3 2; that is this point
here, we have 4 2; that is this one, and we
have 3 2 here, and we have 2 2, and then we
have 3 3. So, that is this point. So, we are
bringing in these points, similarly, when
we write for 2 3, which is this point here.
We have 2 3, and then we should have 2 2,
and 
we have 2 4 which is this point here, and
we have 3 3 which is this. So, we have this
thing.
So, we can see that at every point, we are
involving the immediate neighboring points
in our equation, where the immediate points
are on the wall, we know the velocity. So,
we can substitute them and they are not appearing
in the equation, but if they are not along
the wall then they are included in the equation.
So, this is the template, and for the general
point i comma j will have the four neighboring
values; which will be coming into this. So,
you have a computation molecule, which consists
of this.
So, when we write an equation i comma j we
can expect to see four neighbors plus this
five grid points linked together by this computation
molecule. So, this is the characteristic feature
of computation fluid dynamics. This computational
molecule depends on the equation that we are
trying to solve, and the different approximation
that we are trying to make. So, if we make
use of another approximation, then the computational
molecule may change. And if you have additional
terms in this, again the computational molecule
it will change, and the coefficients for each
of this points again one two one like that
that also depends on the difference formula
that we use.
So, depending on the type of approximation
that 
we make, and depending on the type of 
equation 
that we are trying to solve. We will have
a computational molecule, and that computational
molecule is encapsulated, in this template
equation which we choose to write. And once
we develop this template, then we see that
this template will work only for that point,
and that 
point alone is not sufficient, we will have
some neighboring points for this type of equation.
And we have to put the template at every point,
and then we will get a set of equations. So,
if we write, if we apply this template for
all the 16 points then we will have 16 equations,
and all the 16 equations will be such that
when you put them together no new variables
are required for us to get a solution, will
have a set of 16 equations, which together
make up sufficient number of equations to
solve for all the 16 variables. So, they uniquely
determine the solution.
Since we are doing a hand calculation, and
since we need to write 16 equations it becomes
a big difficulty. So, in the next lecture,
we are going to simplify it and then we are
going to make it into a four by four matrix.
So, we will have fewer number of equations,
and will take it down as a tutorial, and try
to derive all the equations for a four by
four system, and see that for this four by
four system we have enough number of equations
that when we put all the simultaneous equations,
we will have a closed system of equations,
and it is just a question of solving this
algebraic equation.
So, that will be 
the part of 
the next lecture in which it is lecture cum
tutorial. We will go through this exercise,
exercise of 
for the same equation, for the same domain,
but fewer numbers of points. We derive all
the 
algebraic equations and prove to ourselves
that these together make up one complete set
of equations, which 
can be solved. Then we go through a specific
method of solving this algebraic equation
which is characteristic of CFD and then we
go through the solution there. So, that will
be part of the next lecture.
