 So, we have been looking so far at the last class at least, we have looked at some acceleration techniques, we have looked at preconditioning the unsteady term for 1D Euler equations. There are some more acceleration techniques that we need to look at, some of them are relatively straightforward ideas that come from things that we have seen so far, ideas that we have discussed so far. So, I will just use that, I will just use that to introduce at least two other techniques, fine. And maybe I will suggest a problem that you can try out for yourself for one-dimensional flow, maybe write out the quasi-1D equations, I will just write it out, I am not going to derive them, you can derive them, you have already seen them derived in gas dynamics but still you can derive them. And then if time permits, we will get into a larger class of, larger algorithm which will take me multiple classes to, at least two classes, not three classes, to talk about acceleration schemes of another nature, fine. So, first let us look at, we will just go back, look I will write the equation in delta form, I will write the equation in delta form simply because as always I forget the delta t there, I write the equation in delta form simply because I know that if this term were not there it would become the explicit scheme, okay. I write the equation in delta form and I am going to use this to just mention to point out two ways by which we can accelerate convergence, okay. And the reason why I am talking about this is I want you to get a flavor of the times of things that you should look for when you are writing your code, right. You say yes, last class I said I want the wall clock time, the time that it takes for the answer to come back, to be as quick as possible, as short as possible, the duration to be as short as possible. So towards that there may be effort that you make, various types, various kinds of things that you do. When we, I write this delta form simply because we use this argument saying that when I get to the solution R the residue will be 0, okay. So I will repeat that argument. So as a consequence as long as this is not singular delta Q will be 0, okay. And therefore it really does not matter when I get to convergence, if I am interested only in the steady state, no longer talking about the transient, if I am interested only in the steady state then I can pick this matrix in some form so that it is easy to compute. Is that fine, right. And we have used this argument before, we came up with the LU approximate factorization, there are other schemes that we have talked about where you can actually replace this by something that is, that is going to get you to the solution faster. Let me just put it that way, okay. Is that fine. Now if R goes to 0, delta T times R is 0, okay. So one obvious thing that you can do, right and think back to the demo. What did I do in the demo? In the demo I took, I set delta T by, I picked delta T by delta X, I did not pick the CFL. My delta X is not changing, therefore my delta T is not changing, okay. Already when I do this you know that if my delta X the intervals are not equal in size, you already know that the delta T will also change from point to point. But I have picked a fixed delta T, I did not pick a CFL. But you could pick a CFL, you could pick a sigma value, you could pick a sigma value, okay, you could pick a sigma value. So that it will turn out that the delta T is not same from point to point. In fact you can ask yourself the question. So this is at some point, this is at some, this is of course a system of equations but at some point, for any point if you were to take a delta T, right. So if you had, let us just pick a bunch of grid points here. So you could pick a delta T here which is different from the delta T at the adjacent. So you could have a delta T T and a delta T T plus 1. Is that fine? So the time can be changing from point to point. This is called local time stepping. So what could be the potential issues? What could be the potential problems? Well we do not know if it will converge to the right solution, right. Again I would expect that anybody who studied mathematics uniform convergence also, we have a problem. We already know that we are not, we do not have uniform convergence and we are starting to do funny things like this. We are saying well if there is a spot where the solution converges more rapidly, very quickly to a steady state solution, let it go. Why should it be held up by something that is going at a small rate? Am I making sense? Anywhere where I can take large time steps, let me take large time steps. Where I am constrained to take small time steps, I will take small time steps at those points. Is that fine? So basically what we are doing is by doing local time stepping, we are saying geographically point to point in the domain, my solution is also, it is no longer, if I say first time solution at first time step, solution at second time step, solution at third time step, you are not really a solution. It is not, I mean I cannot even imagine it as a candidate solution. It is basically well some state vector cube at the first time step whatever that means. But I say first time step. I do not say at delta t. My language is already changed. I do not, I say first time step. I do not say at delta t. It is not at delta t, 2 delta t, 3 delta t because I am not anyway bothered in the transient. I do not care. And if it gets to a steady state solution that I want faster, my experience, my experience has been that you do get to a steady state solution faster. So if I am looking for a steady state solution, I am likely to do local time stepping. In my experience, you get there faster. So I am going to do local time stepping. Am I making sense? So this is one possibility. So what I did in the demo, now see once you introduce language, we have to make sure that the vocabulary is complete. So this is local time stepping. What I did in the demo is called global time stepping. Just as a contrast. So global time stepping. You have to be careful because if you switch from one to the other or you are making a presentation where both are there, you have to have clarity. This is local time stepping. This is global time step. Is that fine? And obviously there are things that you can do in between. There can be places where you say get to the steady states quickly. There may be places where you are interested in transient. I do not know. There could be combinations that you could use. There could be a strip where you use global time stepping and the strip where you use local time. There are all sorts of possibilities. Is that fine? That is one possibility. The other thing, remember I want to get only two. I only want to get to the steady state solution. So we talked about fancy things that we could do to this. Approximate factorization and so on. But there are simpler things that you can do. How many terms does a fluxed Jacobian have? Fluxed Jacobian is A. It is a 3 by 3 matrix. You can imagine if the problem was in 3 dimensions, if you are solving the 3 dimensional Euler equation, it is a 5 by 5 system. The expressions are not, I mean they are okay but they are not that great. They are pretty expensive to calculate. So then I ask the question, do I need to calculate it at every time step? I only care for the steady state. Do I really have to recalculate this A at every time step? Would it really hurt if I kept it constant for a few time steps? Am I making sense? Okay, so I can take the attitude. I am only looking for the steady state. It is pretty close to the original system. I will just keep A constant. And this can clearly be done. This can be clearly done whether you are doing a Lieu approximate factorization, whether you are doing local time stepping. They can all be done together. It is not that it is one or the other. So one of the things that you can do, of course remember that the first 3 elements are 0, 1, 0. I mean that does not cost you anything. So I am not saying it is 9 but still. In the case of a 3 dimensional flow, to make the sale, I am telling you that I am pushing the 3 dimensional flow, you will have 3 flux Jacobians. Each of them are 5 by 5 matrices. At every time step, at every grid point, you have to calculate 25 into 3, 75 minimum. Am I making sense? So the question is, do I need to do it at every time? You do not. You can keep A constant. Okay, so you can keep A constant. Then the issues for how long can you keep it constant? We have typically found, well it depends on the flow conditions. You know about 10 time steps. It depends on how rapid the transients are but you are looking for the steady state solution. So in 3 dimensional flow, I am not really talking about 1 dimensional flow. You can try it out for 1 dimensional flow and see if it makes a difference. That you keep it constant for about 10 time steps, 15 time steps that the savings are quite large. Okay, the savings are quite large. So you could keep A constant. Remember that means A is not varying in time. A still varies in space. Okay, A is not varying in time. A held constant where this N is something that you determine. Is that fine? And very obviously, this N may be small. If you now see a little wrinkle on that, very obviously the N may be small when you are starting off. But as you get closer and closer to the solution, Q is not changing much. So A is not changing much. So it can actually be kept constant for a longer and longer period. And as Q converges, A will converge. Is that fine? Okay. So and remember all of these can be done whether you do LU approximate factorization. All of these can be done simultaneously. Okay. So I think see this is the deal. The argument started with just the simple idea R goes to 0, I have my solution. And my objective is to drive R to 0. No, we are just using that one fact. We are just using that one fact, right. And then trying to see what is the other degrees of freedom that we have. The minute I say, oh, this can be anything. The minute I say this can be anything. See that is a degree of freedom. You can so it can be an optimal thing. Then you can start hunting for optimal. Okay. Is that fine? Is that fine? Okay. This is as far as I want to go with respect to obviously these arguments go on if you want to do a transient dual time stepping and all, you know all of these arguments take place. Go on to that. The only thing is dual time stepping case, the delta tau will change from point to point. Okay. So all of these arguments whatever we have done here will go on to that case also. Again as I said you could also do pre-conditioning the unsteady term, right. You can do local time stepping. You can use the whole host of these tools, right, to make your code run faster. To get the solution I would not say to make your code run faster. See that is very straight. To get your solution back quickly. Okay. This is your objective. To get that solution back quickly. Is that fine? Okay. Right. So what I want you to take from here is not just this, not just this but that the process, the logic that I gave you. Okay. That is what that is the important thing that I want you to get out of this. The process that I want. Okay. That is the important thing. So I preserve the R and then I do not really care about the others as much. And I use that to get my speed up. Fine. Okay. Now what I will do is I have talked about a whole bunch of mechanisms by which we can solve one dimensional flow. Let me suggest a test case for you. I will just, in case when I did the demo I did not really point out the details of everything that I was running. Let me give you the specific details of what I was running so that you can try it out yourself. So the length of the pipe that I used, you can take a unit length if you want to start with. So it can be 1 meter to start with. Ask yourself the question whether the dimensions matter and what circumstances do the dimensions matter. Okay. It is a critical question that, and to help you ask this question I am going to pose an auxiliary problem because you prescribed P0 and T0 there. Do you remember the conditions that I prescribed at the stagnation condition, stagnation point? P0 was 101, 325 Pascals. P0 is 300 Kelvin. You can start this off this way. Here of course we have 84,000 was what I picked Pascals and to set the initial conditions. So I do not, I am not going to write it here as boundary condition. Remember the problem that we picked the valve. We decided the valve was at the, the valve that is opened is at the inlet. So this condition, I gave it as 300 Kelvin, right. So the inlet, the condition in here is whatever is here. So the initial condition, so this is initial condition, T equals 0, 300 Kelvin PA and then you can decide how difficult or how easy a problem you want to start with. You can take U equals 0 indicating that the flow is stationary. So in fact when you open this suddenly what you get is not, you will get a shock and you have to apply for the, to find, to actually calculate the propagation speed. You have to use the rank and Huguenot condition that we were talking about the other day. You actually get a shock, okay. So there are various things that you can do. You could set this, you can, you can raise. I have taken a ratio of about 1.2, right. If you, you can keep the ratio at about that value and raise the whole datum up. So this could be at 1 atmosphere, this could be at 1.2 atmospheres. See what happens, right. This is at 300 Kelvin. Do you think it will make a difference if I change it to 500 Kelvin, right? It is a problem more difficult to solve if it is at 1000 Kelvin. Ignore real gas effects. I am not telling you to take into account real gas effects. There are, once you start getting to 1000 Kelvin, your CP value changes, CV value, you know, gamma changes, all of these things change. So we do not, we do not want to go there. You can still keep it at Euler equation. But the question is, does, is there a change, is there, is it more difficult to solve, is it easier to solve? Okay. Because I have already pointed out, why did I pick this ratio of 1.2? Because this gives me an answer that is close to 0.5, mark number 0.5. So this gives me an answer that close, that is close to mark number of the flow. It is close to 0.5. So that my, so that my Eigen values are all in a nearby range. Okay. The problem is well behaved. So this is the other thing. So I, this process that I have gone through, this process that I have gone through to set up the problem is important. There is a reason why I am explaining this to you. So you may not, you may solve some of the problem at a later date. You may be working on some great research problem or an industrial problem. Somebody gives you something. You are doing the analysis. You want to develop code to work on that problem. You want to test your code while you are going through the developmental process. Pick an easy problem. Pick a problem to which you know the solution. Right. Pick a problem to which you know the solution. You anticipate the nature of the solution. What are the difficulties that are there? So you think about it a little. Then say okay, this is going to give me a problem. Let me pick something that is near mark 0.5. Okay. Right. We could have done supersonic flow also. I could have done mark 2. You have to ask the question, why did I not do mark 2? Why did he not do mark 2? Why did he not say mark 0.5? Okay. Is that fine? So there are, then you can fiddle around with these just to figure out how the code behaves and see what happens. Am I making sense for various values of normally, normally your experience, my suggestion, you may do this. Everything is in dimensional form. Normally what you should do is you should non-dimensionalize the equation. Okay. Normally, whether you do it now, whether you implement it this way and then later non-dimensionalize the equations is up to you. So use the non-dimensional form of the equations. Okay. In your fluid mechanics, you would have studied non-dimensionalization and why you should look at the non-dimensional form of the equation. My suggestion is to look at the non-dimensional form of the equation. But we can come back here. You can ask yourself the question, if I take 1 meter or if I take 0.1 meters, does it make a difference? When does it make a difference? What is the, when is it the same, when is it different? Okay. We are dealing with Euler equations and that can create some element of confusion. Fine. Once you have this, this is a relatively, I have shown you all the features that you can get, right, in the demo. Not much that you can get beyond that, right. You can get into trouble. You can try out various combinations that I have told you and you can get into trouble. Really in gas dynamics, this is not what we study, right. You do 1D equations. You set up the 1D equations. But the interesting stuff when you go to, comes when you go to, quasi 1D. Two dimensions is tough. You go to quasi 1D. Or you do go to two dimensions, steady state, right. Okay. Quasi 1D, steady state. So I am going to draw and draw half of it. Shall I draw the other half also? Something like that. This is a typical nozzle that you are used to dealing with. How does quasi 1D flow go? So you have some area variation. So the area variation, this could be the x direction. Area variation could be some S of x, S of x. S is a function of x. And the corresponding governing equations, the equations corresponding, governing equations corresponding to this would be, I will write it out. You can verify it, right. You can go back and check whether, so dou by dou t of q times S, just make sure I am using the same S, plus dou by dou x of e times S equals, now the right hand side is not 0. Okay. Simply because I have taken this S inside the bracket there, I get an extra term. On the right hand side, I can place an H. The H is 0 p ds dx0. You can do a simple sanity check right now. I would suggest that you make sure that you are able, remember what I told you earlier, right. Make sure you are able to derive the equations. I may have made a mistake. But when someone is writing this, you should be sitting there doing a simple sanity check. So when S is a constant that goes to 0. And it can be factored out, you get back your 1D. So in that sense yes, it is a superset, right. But as to whether the actual terms, individual terms are okay, right. There is something that you have to look at. So this is not really that much of a change from your 1 dimensional, from a 1 dimensional solver, right. It is really not that much of a change. But now interesting things can happen. The flow field is more interesting, right. Now interesting things can happen. The flow field is much more interesting. So you could choose again prescribe T0 and T0 here and prescribe a P ambient here and try out different things. Try out different combinations, right. You could have subsonic, subsonic, throat choked, throat not choked, right. So I would start with subsonic, subsonic, throat not choked. That is where I would start. And then slowly build it up to where it is choked. Are you able to get the supersonic flow, right? Are you able to get the supersonic branch? This is all for a small s, for a given S of x. Then you can try if I change the S of x, right, fine. If you want to keep it simple, remember what I said. Always try to keep it simple. So I would not even do this first. What would you do first? I would just use a, I would just do a small converging duct, right. Instead of a constant area duct, I would actually do a small converging duct. So the S of x is known. S of x is simple, right. So S of x is a linearly decreasing function. S of x is known. Prescribe the P0 and T0 here. Prescribe P ambient here. In fact, you can take the same values that are there. See what happens, okay. Is that fine, right? You can then do, I would most probably do then a diverging section. And then maybe a CD nozzle at that time, right. Always good to go through a hierarchy of problems instead of jumping into the big problem directly. Is that fine, okay. Are there any questions? Okay. I think this is, as I said, you have spent quite a bit of time in gas dynamics on quasi 1D flow. So I am not going to go through all the assumptions, right. You would expect that if S was varying very rapidly, you would expect that there would be issues. There should be problems, right. So because it is quasi one-dimensional, the assumption is the area variations are not very rapid, right. Otherwise the other two-dimensional, three-dimensional effects will come to play, okay. Fine. So I will, now what I do is I go back to that equation. I am going to rewrite this. I get back to, I am going to get back to accelerating convergence. And there is a whole class of schemes that we are going to look at, okay. If I look at this, this looks like some matrix multiplying some vector equals right-hand side residue. Instead of using this to start with, I am going to start, I will start with Laplace's equation, okay. I will start with Laplace's equation. So I am going to start with Laplace's equation as an example. And we will try to reason out, I am going to follow a certain path but I want to recollect some of the things that I have done in the previous classes, the previous demos are more important. And conclusions that we have drawn in the demos which are going to, which I am going to use to rationalize or base, right, this acceleration scheme, fine. So first think back to representing functions using hat functions, right. We tried to representing sin x, sin nx. And we have drew the following conclusions. So the conclusions were, there is a highest frequency that can be represented on a given grid. So there is a, and remember we are always talking about a uniform grid. For these discussions, we are always talking about uniform grid. I do not want to even get to non-uniform grid right There is, there is a highest frequency that can be represented on a given grid, right. What else is there anything else? So a variation of that I turned the statement around. So whether a given wave number, highest frequency wave number, normally when they say frequency when you are talking about time, right, okay, wave number, okay. I turned it around for a given wave number whether it is a high wave number or low wave number, high frequency or low frequency depends on the grid on which you are representing it, taking the same thing and right which is also important for you. So whether a given wave number is high or low depends on the underlying grid. I want both these, right. There are variations of each other. I want both of these. What else do we know? Now that I have defined what is high and low, we go to a different demo that we did. We go to a different demo that we did and we basically said that if you have these, if the scheme is dissipated in some sense, it seems to show that high frequency is decay faster than low frequency, fine. So certain schemes, high wave numbers, same frequencies again, put the quote on high. So now I have mentioned I have told you what are high and low. That was the reason why I needed that, okay. So high is with respect to the grid, low is with respect to the grid. So the grid is now going to become important. The underlying grid is very important. So if you say high wave numbers, decay faster than low wave numbers, which means that by changing the grid, it is possible for me to change whether a frequency is high or low. That is the clue, okay. That is the clue. So we come up with this idea that we will use multiple grids. The scheme is called a multigrid scheme. It is not a scheme to solve a problem, it is a scheme to accelerate a solution technique, okay, multigrid scheme. The idea is to use multiple grids, right. So I will just take, if I think about one-dimensional Laplace's equation, which is, looks something like that, right, which you basically know on three grid points. I am not even going to bother to derive it. You already know. These are p, p plus 1, p minus 1. Then you know that given those two, right, you already know that U p at iteration level n plus 1 or q plus 1 is the average of adjacent points. So just a quick example as to why, how this happens. So if I have, if this is what I am plotting now is the, what I am plotting now is an error, okay. What I am plotting now is an error. If I have, so I want or if the n points are 0, then the solution should go to 0 either way, right. If I have my initial guess as something that is this way, we have seen this, I am only reproducing what we did in the demo but I want to do it in a very specific fashion. So if you have a grid point at this trough, you have a grid point at this peak, you have a grid point at this trough and if these correspond to p minus 1 and p plus 1, you can see looking at these three that the average will give me something that is going to go that way. That is basically what the averaging is going to do. Is that fine, everyone? So these three grid points are indeed effective in eliminating that little, little high frequency and if you iterate once or twice that high frequency will go away and what you will be left with, the high frequency will go away and what will you be left with, you will be left with the low frequency. Let us look at those three grid points again. That is p, p minus 1, p plus 1 and if you look at it this, this and this, the average is very close. The changes that you are going to get with this grid are going to be very small. On the other hand, if instead of that you had a grid point here, a grid point here and a grid point there, now you can see that if you take the average the change is much larger or even go make it even more, even make it even more coarser. If you had a grid point here, a grid point here and a grid point there, you understand. The change is extremely drastic but the tragedy is that though the change is drastic, though the change is drastic, the grid on which that you are able to do that is a very coarse grid. So somehow we have to come up with a mechanism by which we use, we get the solution on the fine grid, but we use the coarse grids to eliminate the error. The low frequency error, the error that is low frequency on the fine grid, we want to use a coarse grid to eliminate it. The error which has low frequency on the fine grid, we want to use a coarse grid on which that error will be high frequency, we want to use that coarse grid to eliminate that error, is that fine okay, that is the motivation, that is what we are trying to do, this is called a multigrid scheme, so we will see how we would do it okay. So back here Laplace's equation, we know if you were to discretize Laplace's equation, get a similar setup, I am not going to deal with this right, so I know A is a flux geocombian but you humor me and allow A to be the coefficient matrix, so this is for Laplace's equation, this is for Laplace's equation, this is not the flux geocombian right, A times phi of h equals f of h, I will put h there where h is the, h represents the grid size, see I already write the thing a little differently because I am saying that I am going to use multiple grids, I am aware that I am going to use multiple grids right, so now I am being very careful, right up front I am going to be careful, I am going to say wait a minute, if I am going to use multiple grids I am liable to get confused, so let me stick h's up there so that I get the, I can keep track of where I am okay, go back, if you go back to the part that we did Laplace's equation, you will see that we can actually write it this way, in 1D it would be, this would be a tri diagonal matrix, in 2D it is going to be a matrix whose bandwidth is much, much larger okay, we have done this before, you can write it in this form, fine. The original equation is nabla squared phi equals 0 okay, if you get this exactly, if you get this exactly, then phi-ph will be a representation error, fine right, so we solve this in some fashion, we can solve this in some fashion, you could guess a phi, you could guess a capital phi right, you could guess some, you can guess a phi, a candidate solution for this right, am I making sense, ph is what you are seeking, if you have ph you have the representation, you have the answer, you have the value at the nodes okay, you do not have this, you only have a representation of that on the computer, so if you have this you have the solution, if you guess something which has an error in it, I will make it capital phi, you could guess that okay, and in order to get to where I want to go, since I already know where I am headed right, I am going to do this in steps, I am going to define an EH which is an error, which is the ph which I seek, minus capital ph which I have guessed, is that fine, everyone, okay right, I will also define the residue RH as FH-AH phi H, is that fine, so what am I going to do, I am going to multiply this by, I am going to multiply that by AH, so I get AH-EH equals AH phi H-AH phi H, I have not done any linearization and going from really original equations are linear, but it helps that equation, the system of equations is linear right, so I am using that fact here, it distributes over, and this AH FH is okay, I have a small error here, for a minute I was staring at it saying wait a minute, there is something wrong, if I have the solution the residue has to be 0 right, if I have the solution the residue has to be 0, for a minute I was staring at it saying what is wrong, there is something wrong okay fine, so what does this give me, this gives me FH-that which is RH, so you get AH-EH equals RH okay, this equation incidentally is called the correction equation, equation is called the correction equation, and in fact you can use this equation to solve the problem, instead of the original equation, instead of using, instead of this, instead of using this you can actually use this to solve the problem, am I making sense, how would you do that, you would guess a, you would guess a, guess a phi H, guess a capital phi H, compute RH, solve for EH, some iterative fashion maybe you do not have to solve it, solve it right, you do not have to use the direct method, but get an estimate for this, so find an EH from, then update your phi H nu and then you can iterate, you can do this iteratively, am I making sense, so you could in theory you could use this equation, it is a little contrived, it looks a little contrived right, but I just want to show it is equivalent to solving the original equation, solving for this correction is equivalent to solving the original equation, is that fine everyone okay, now we go one step further, so I can iterate, I can use either Gauss-Seidel or something of that sort, you can imagine that I do this, I find this, I do one sweep of Gauss-Seidel, I sweep through once with Gauss-Seidel, calculate the nu 1, go back here, find the nu r, one sweep of Gauss-Seidel and you keep on repeating that process okay, so you can set up an iterative scheme right, you can use either Gauss-Geord, Gauss-Jacobi iteration or Gauss-Seidel or something of that sort, you can set up an iterative scheme fine, so you are going through these iterations, you are going through these iterations, you do 10 iterations, it seems you are converging very nicely, all the high frequencies are gone and now you are stuck with the low frequency terms right, you have taken 101 by 101 grid and you are iterating away right and it is not going because low frequency terms take a long time, so the question is would it be nice if I could solve this problem now on a coarser grid, so that that low frequency would turn out to be a high frequency on the nu grid okay, so we do a small wrinkle, what we do is we take the same thing here, we take the same thing there but we add a wrinkle, we say we have the ph, find the rh okay or let me write the, so iterate ah ph equals fh few times, so to indicate that I am iterating it a few times I will draw an arrow this way and say iterate, however many times you want to do it okay, iterate it some n times, so you already have a disposable parameter, it could be 5 times, 10 times, you have to figure out what is good right, iterate n times, calculate rh equals fh minus ah ph, so this is our current estimate after n iterations, what comes out of this is capital ph, that is what comes out of that, now in some fashion transfer rh to r2h, I do not want to call it r2h, so I well r2h, you need I have to, this is an extra step, be careful with this part, I am going to come back and erase it and make some change, transfer from r to r2h okay, rh to r2h, you understand what I mean, so if you say wait a minute how do I transfer, how does this magic occur, we will see it in one dimension right, so these are the grid points that I have one dimension, I will keep it course so that we are able to and let me get some color chalk, so if I have a value here, I have a value at these points, so this is h, 2h would be this okay, so to find the value here to find the value at this point to transfer, the simplest way to do is just throw that away, that is the simplest way to do it, just ignore these points, just throw those to the way, take the one that is there, simplest way to do it, you do not like it or I slogged so much and all those adjacent points should I really throw it away, this is what you feel, you feel regret, then do a little work right, take a weighted average, one of this, one of that, two of those divide by 4, right, you understand what I am saying, so 2 phi t phi p-1, phi p-1 by 4 right and these are all capital fees okay, this is phi, of course it should be r, I should actually be transferring r right, it is not really phi, it should be r, let me correct that, 2rp, rp-1, rp-1 by 4, all of these at h, this is okay, so now you have a way by which you can get r at 2h, am I making sense as the point p, fine, transfer from rh to r2h, back here, iterate this n times, get a candidate phi, find the residue, transfer the residue okay, then what? On that course grid, solve a2h, e2h equals r2h, I say solve, I mean iterate a few times, iterate a few times, iterate to get e2h, okay, transfer e2h to eh, that should not be difficult, is it not? That should not be difficult, you can interpolate, using the same example, if you want the value here, you can interpolate, right, you can interpolate, you always get the value in between, then repeat the correction, update, transfer it back, phi h nu equals phi h plus phi h, that you have transferred, okay, in fact instead of, what you can do is, you can do this and just to be sure that you have everything on the h grid, fine, before you say I have the solution, you can iterate a h phi h equals fh a few more times, just to make sure you have a solution on that, fine, fine, fine, everybody, this is okay, you transfer to a course grid and transferred back, now comes the little trick that we are going to do, okay, now comes the little gimmick that we are going to play, come back here, you are here, you have done the transfer, okay, you have done the transfer, having done the transfer, come back here and I am starting to iterate, right, you are working on a 50 by 50 grid, you are doing iterations, you do 10 iterations, all the high frequency errors on that 50 by 50 grid disappear, but it still does not converge, because on that grid there are low frequency errors that that grid cannot converge that rapidly, that there are low frequency errors on that grid that do not go away, so you think if only I could run them on a 25 by 25 grid, right and you can, you can, if you just change the notation a little, okay, so if you guys do not mind we will go back here, change the notation a little, you change this to f2h, transfer rh, we will call it change it to f2h, if you change it to f2h what happens to this equation? That says aah2h equals f2h, that looks very suspiciously like the original equation which we are trying to solve, which is ahph equals f2h, fh, okay, so what you need to do is you iterate this another n times or m times or whatever it is, n1 times or n2 times whatever, to get this, to get this and do not transfer it back, instead calculate r2h, now you understand why I wanted to call this f2h, because I proposed to define a residue at this level, calculate r2h which is f2h minus a2h e2h, transfer r2h to r4h, okay, r4h, you could in theory transfer it to any size that you wanted, but it is a little easier if you keep them, if you keep the relationship, transfer r2h to r4h, iterate a4h, e4h equals, oops, made a mistake, transfer r2h to f4h, cannot fall into this, now first time it is okay, second time we cannot make that mistake, now we know the game, r2h has to go to f4h, iterate this, how many levels do we want to go, well that depends on where you started, if you started with 1023 grids or something huge size, 1000 by 1000 grids, right, and clearly there is some relationship to powers of 2, so you have to look at what is that relationship, okay, I will let you figure that out, so then you can keep on having the grid, right, till you get to a point where you are happy with what you have, the convergence rate that you have, okay, that is fine, what I will do is, we will get back to this, I will, we will talk about maybe a little of this multigrid thing in the next class, okay, fine, thank you.