 So, in today's lecture what we will do is we will talk about how to solve the Eigen value problem okay and how to find Eigen values numerically that is the idea. Now what we will do is we will take a very simple example, classical example that you know how an Eigen value problem looks. So, consider this equation d square u by dx square plus lambda square u equals 0 okay and subject to the boundary conditions equals 0. So of course you know what the Eigen function is and what the solution is for this problem. So the u of x is a n sin n pi x. This is your solution and the lambdas are going to be n square pi square. So, since you have a closed form solution you know what the Eigen value is and supposing you do not know the Eigen value and you have to actually calculate the Eigen value what you would have is to possibly write a computer code to solve this problem and this equation is linear and homogeneous. u equal to 0 is so basically this is the solution. If we have to find this numerically what would you do? It possibly write a finite difference code, finite difference code and what is going to happen is this numerical algorithm would always converge to the trivial solution u equal to 0 because that satisfies the equation okay. So this would converge to u equal to 0 because that satisfies the differential equation and the boundary condition. It is not going to converge to a n sin n pi x okay. The other alternative is to possibly get the solution by using the shooting method okay. So I just want to use this example to illustrate how do you convert a boundary value problem where you are specifying the condition at 2 end points at 0 and 1. I want to convert it to an initial value problem where and then solve okay. So the boundary value problem is converted to an initial value problem. So you have to specify 2 conditions at the location 0 okay. So here both the conditions are specified at the same location x equal to 0 because I have a second order system okay. One is going to be the value of u itself and the next one is going to be the value of the derivative okay. So how do you convert this to an initial value problem? I am going to define a new variable v which is du by dx. Define v as du by dx in which case d square u by dx square becomes dv by dx equals minus lambda square du and du by dx becomes v. So what I have done is I have converted a second order system to a system of 2 first order equations okay. I am defining du by dx as v that gives me dv by dx is minus lambda square du. So basically a second order system is converted to a system of first order equations okay. So clearly at x equal to 0 at x equal to 0 what is the value of u? I need to specify both u and v. I need to specify both u and du by dx. We need to specify what? u and v. The value of u at x equal to 0 is 0. It is the same as the original problem that we are trying to solve. Look I am trying to find a solution to this problem okay by converting it to an initial value problem. So u at x equal to 0 is 0. But what about v? I do not know what v is. So u prime or du by dx at x equal to 0 is something which I do not know. I need to make an assumption, make a guess for this value and what I would do is if I guess a value here and if I would integrate this up till x equal to 1 because now it is an initial value problem I can use Runge-Kutta or Euler's method and do this integration. I integrate this up till x equal to 1. I will find what is the corresponding value of u at x equal to 1 okay. So clearly the value of u at x equal to 1 depends upon the guess value. For different values of this guess I will get different values of u at x equal to 1. For some value I will get the u at x equal to 1 equal to 0. So that is my solution you understand. So du by dx at x equal to 0 is guessed v iterate upon this till we get u at x equal to 1 equal to 0. Because that is the boundary condition which I need to satisfy. I need to satisfy the boundary condition u at x equal to 1 equal to 0 okay. So I need to get that and for some guess value I would get this. So what I have to do is I have to do a combination of a Newton-Raphson kind of method because I have to solve this algebraic equation. This is algebraic equation which I have to solve. I have to combine my Newton-Raphson method with an integration because I start with a guess value. I integrate it out. I check that condition and then I iterate till I get a solution. Unfortunately even if you do it this way what is going to happen is you would get a 0 solution because the computer does not know that you are looking for a non-zero solution okay. But this is algorithm. So here again we may hit u equal to 0 as the trivial solution okay. And so basically that defeats the purpose but I just illustrated this to tell you how a boundary value problem is converted to an initial value problem okay. So you just have to define these new derivatives and then you convert it to an initial value problem okay. So now I am going to take this idea and illustrate how we are going to go about solving our problem which is the problem of stability of this flow through 2 circular arcs or 2 concentric rings okay. Of course in this problem it is quite easy because it is a one-dimensional problem what you can do is you can choose different values of the guess and just integrate it. You can do any iteration and plot the value of u at x equal to 1 for different guess values. So for some guess value because if this is non-zero you will definitely get non-zero solution because you are giving different slopes right. So what I am saying is if I look at this problem here u at x equal to 0 is 0 this is x. What we are trying to do is u at x equal to 0 is 0 I keep giving different slopes. What different slopes and this is x is equal to 1 this is x equal to 1. So this is the right solution if I give a very large slope it is going to be positive it is going to be beyond it if I give a slightly lower slope it is going to be like this. If I have different slopes these are my guesses my guess is just changing the slope here. If the slope is too low what is going to happen it will integrate and x equal to 1 the function becomes negative it is not 0. If the slope is too high then the value of the function at x equal to 1 is positive for the right slope it is exactly 0 okay. So one way to do it is just make a plot just assume different slopes make a plot of what the values that u is at x equal to 1 find the slope for which it is 0 okay and that gives you the solution. But I can do this as long as I have only a one dimensional problem but supposing I have a larger dimensional problem then I need to have a slightly better way of doing this okay and that is what we are going to discuss. So I can make a plot of you can plot u at x equals 1 for different guesses and find the guess for which u at x equal to 1 is 0 which means now I am going to say the guess value the guess value is on the x axis and I am plotting u of x equal to 1 here you will get some curve like that. So for some guess value the u is 0 and that is what we need okay I see a lot of blank faces so I just keep proceeding without trying to shed more light anyway I think when you implement this code and get the solution it will be clear. So maybe it is a good idea to just find the Eigen function for this very classical problem using this method and see if you can actually get sin and pi x then you can go and solve the Sparrow problem okay. So what we are going to do for solving the Sparrow problem is just an extension of what we have just discussed. Now we come back to this Sparrow paper and basically after you do the linearization and that is what we discussed last class we get a fourth order equation in u and u is basically the radial velocity component a second order equation in v the tangential velocity component. What you do is you just go through the algebra and eliminate the pressure term and the z component of velocity and this what you will get and clearly you need 6 conditions right. So we are going to use the shooting method but with a small modification. So I am going to convert this fourth order equation in u2 for first order equations okay and the second order equation in v2 to first order equations okay. So we convert the boundary value problem to an initial value problem okay and yeah it is the radial velocity component. This is the theta component the tangential component is the theta. So this is for the perturbed state this is v theta and v z but what I have done is I have eliminated v z. So is that right? Yeah this is v r and v theta now v theta was the this thing. So what I am saying today is right okay what I am saying today is right. So you need to we have to eliminate 2 variables one was pressure and I think I may have said the wrong thing yesterday but what I am saying today is right. So you do not have to worry about that okay. I am glad you remember this I was not sure how many guys actually remember what I said yesterday yeah but I think I may have said the wrong thing yesterday but this is right v r and v theta. So the boundary condition so the one of the variables the variables will be u, u dash, u double dash and u triple dash okay and v, v dash. These are the 6 ordinary differential equations that we get like we had earlier we had an ordinary differential equation 1 for u and 1 for du dx, v is du dx and remember at the inner wall at the inner wall we know u equals u dash equals v equals 0 okay. So what I have to do is like I was guessing earlier only for one value du by dx at x equal to 0 now we have to guess the second derivative the third derivative of u and the first derivative of v at x equal to 0 guess u dash, u double dash, u triple dash and v dash at the inner wall okay and now I know everything I integrate forward and check what it is at the outer wall check the values at the outer wall okay v check the values of u, u dash and v at outer wall you check the value of u, u dash and v at the outer wall if they are 0 that means the guess value is right if they are not 0 then I have to iterate okay but my problem is you have to make sure that you converge to a nonzero solution because if it converges to 0 of the solution then that defeats the purpose okay. So we need to iterate on these guess values till the u, u dash and v at the outer wall are 0 okay. So now so basically I need to get 3 values right so I am basically looking for something like a 3 dimensional vector there is some 3 dimensional vector which is going to be a solution to my problem and give me a nonzero solution which is going to satisfy my homogeneous equation, homogeneous boundary conditions and give me a nonzero solution okay. So basically why is it a 3 dimensional vector because the 3 dimensional vector will be the values of these variables at x equal to 0. So we are looking for a 3 dimensional vector okay and clearly for some value of u double dash, u triple dash and v dash let us say u double dash equals a 1, u triple dash equals a 2 and v dash equals a 3 this is the solution to the eigenvalue problem. Suppose I mean there is a solution of course and I am saying that this is the solution and what we are trying to do is we are trying to find this a 1, a 2, a 3 okay our job is to find this a 1, a 2, a 3. Now rather than look at this as a 3 dimensional vector I am going to solve 3 auxiliary problems okay and that is what he explains. We can write this as for example a 1 times 1, 0, 0 plus a 2 times 0, 1, 0 plus a 3 times 0, 0, 1 okay. So what we can do is we can solve this initial value problem which means what we solve the first problem auxiliary problem u 1 with the following initial conditions maybe I should do it in a slightly better way let us say u, u dash, u double dash, u triple dash, v and v dash right these are my conditions at x equal to 0 and u and u dash of course are 0 and v is 0 this I do not change because at x equal to 0 these conditions are always satisfied have to be satisfied but now what I am going to do is I am going to solve this problem with 1, 0, 0 which means I am going to assume u double dash is 1, u triple dash is 0 and v dash is 0. So I am going to solve my 6 ordinary differential equations with this set of initial conditions okay I am going to solve the next problem with this set of initial conditions 0, 1, 0 I am going to solve the final problem with this set of initial conditions that is I am only considering one of these initial conditions to be non-zero okay. So that is I have 3 problems here clearly because this initial condition is non-zero I am going to get a non-zero solution because I have given some slope. So at the end of the day I am going to get a non-zero solution if everything is homogeneous I will get 0 solution because but by making this non-zero and I do the integration I will get some kind of a curve I will get some solution which I am going to call u1. So let us say the solution to this is u1 the solution to this is u2 the solution to this is u3 okay. So what I have written here I have written here the initial conditions which I am going to use to solve my 6 order problem I am going to convert my 4th order and 2nd order equation into 6 first order equations okay 6 first order equations means any 6 initial conditions the initial conditions are going to be on u dash that has to be 0 v has to be 0 the u double dash has to be I am giving a non-zero value because I am writing this as if it is a unit vector I am writing this as a unit vector 0 1 0 I am writing this other one as a unit vector 0 0 1 okay and now I can get my solutions u1 u2 u3 okay. So u1 is a solution to the first problem u2 is a solution to the second problem u3 is a solution to the third problem I am using basically the same notation as what Sparrow is using. So clearly the actual situation is going to be with initial condition a1 u2 a3 so when the initial condition is 1 0 0 I know the solution u1 when the initial condition is going to be a1 here it is going to be a1 times u1 because the problem is linear okay when the initial condition is 1 for u triple prime the solution is u2. So when the actual solution is a2 which is what we are trying to find out the solution is going to be a2 times u2 okay because the system is linear and when the initial condition here is a3 it is going to be a3 times u3 okay. So basically what I am trying to tell you is when if the initial condition which we are seeking the guess value which we are seeking for which the solution is correct is a1 a2 a3 the value of u at the end and x equal to 1 will be a1 times u1 plus a2 times u2 plus a3 times u3 when u double prime equals a1 at x equal to 0 at x equal to 0 u double prime is a1 and u triple prime is a2 v prime equals a3 the u at x equals end point end point which I believe is x equal to 1 I am integrating to make sure that the boundary conditions at the other end are satisfied right. So let us say you are integrating up to 1 it is going to be a1 times u1 at x equal to 1 plus a2 times u2 at x equal to 1 plus a3 times u3 at x equal to 1 you understand u1, u2, u3 are the solutions when my initial conditions as 1. So on my initial condition a1 the value the function the solution is going to be a1 times u1 and what is a1 times u1 at x equal to 1 that would be the contribution because of the first non-homogeneity but actually my system has 3 non-zero initial conditions it can possibly have 3 non-zero initial conditions. So I need to find the cumulative effect of all 3 so when I am considering a2 here the solution is going to be a2 times u2 when I consider a3 it will be a3 times u3 and this should be 0 because I want the condition that the u has to be 0 at the final point at the other wall okay. Similarly u dash at x equal to 1 equals 0 implies a1 u1 dash at x equal to 1 plus a2 u2 dash at x equal to 1 plus a3 u3 dash at x equal to 1 is 0 see this is these things when you are doing the integration one of the variables you are going to be calculating is going to be the derivative after you have converted it to the system of ordinary differential equations one of the variables you will calculate is the derivative. So all you have to do is do the integration with 1 0 0 0 1 0 0 0 1 and directly you get these values okay and what about the other one the other boundary condition is v at x equal to 1 is 0 and have a1 so again when a1 a2 a3 are your initial conditions the value of v at the left at the other wall is going to be given by a1 times v1 plus a2 times v2 plus a3 times v3 and you want this to be 0. So our job now is to make sure that a1 a2 a3 are non-zero we are looking for a1 a2 a3 to be non-zero and now I have a system of linear equations so basically what I want is the determinant of the coefficient should be 0 that is the idea okay. So to get a non-zero solution for the a1 a2 a3 for the ai's we need the determinant of this matrix u1 u2 u3 to be 0 at x equal to 1 so clearly the values of this the solutions u1 u2 u3 will depend upon that wave number we had k and the Reynolds number which is a dimensionless parameter which comes into the equation okay. So I am saying that the determinant is a function of k and Reynolds number what is k the wave number of the disturbance that we have given so what you have to do is for different value you will fix a value of k you will calculate the Reynolds number for which it is 0 either by a Newton Raphson method or just plot the determinant for different Reynolds numbers like we were doing earlier okay. So once you find this then you can make a plot now after you do this you can make a plot of k versus Reynolds number and you may get a curve of this kind. So what has been given in a sparrow is given you the a table actually I am not sure if I have given you a plot is given you a table where he is telling you for the different values of k what the Reynolds numbers are and that is what I want you to verify. I think this method is nice because it is combining what we have learned in linear algebra okay that you can you are actually looking for a vectorial solution okay a 3 dimensional vector I am trying to find the solution in terms of the basis vectors the basis vectors are 1 0 0 0 0 1 0 0 0 1 I find the solution to that and then I just say that look for an unknowns when my initial guess or when my solution is of the form a 1 a 2 a 3 I use the solution with the base vectors 1 0 0 0 1 0 0 0 1 construct the impose the condition that at the other end point the boundary condition has to be satisfied. I get a bunch of linear equations and then I put my determinant condition and I get my neutral stability curve okay. So it is just that whatever you have learned in mathematics you are just trying to put it all together and trying to find a solution an application to a physically relevant problem. What I want to do is just repeat one more time what is this u 1? u 1 is the solution u 1 is actually a vector it will contain 6 variables okay with the initial condition that u double prime is 1 at x equal to 0 I just choose this to be 1 and I integrate my 6 equations this I get all these 6 variables the entire vector I am calling it u 1 okay yeah maybe yeah that is my first solution my second solution u 2 is with my initial condition as 1 for the u double u triple prime everything else is 0 and u 3 is with everything else 0 but v dash is 1 once I calculate this you are integrating from the inner wall to the outer wall at the outer wall you know the values of u u dash because these are the variables you are solving for okay. So u at the outer wall you just have to calculate for all the 3 solutions for the 3 different initial conditions these are the 3 things at the outer wall u dash at the outer wall is the second variable and v at the outer wall is the fifth variable in the way I have written it okay. So when you write the code actually you will understand what is to be done so beyond a certain point me explaining on and on does not make any sense when you actually put these things together and start writing a computer program then things will become more clear okay. But your job so tomorrow what we will do is we will meet in MSB you guys will derive the equations the base solution and also the linearized equations. So come with these cylindrical coordinates neighbor Stokes equation and then we will go through the process once the equations are derived then writing the code is not a problem okay so we will stop right now.