 So, we will look at a demo, before I start the demo, we will try to figure out what is the actual problem that we are going to solve, right, so I think I may be suggested some boundary conditions and so on to you, but we will make it a little more explicit right now, so I have a program that I have written which has two different flavors of solvers, both of them require and I add second order and fourth order dissipation, so I am not doing any of the more modern techniques that add dissipation in a regulated fashion, you understand it because we have not covered that material in this class and I am not proposing to cover that material in this course, I have just given you enough I have brought you up just up to that point where you should be able to comfortably read the material that is out there, the literature that is out there, okay, and maybe in some other advanced class you are able to get that high resolution schemes and so on, so one of course is FTCS because we have been looking at FTCS right through, okay. The other is a four-step Range-Kutta method, as it turns out that the time step that I can take is much larger, I will start with that because the time step that I can take with it, much larger, things move a little faster, right, so the demo moves a little faster and just for completion maybe I will do FTCS, the things that you have to observe from this is we have looked at linear wave equation, we have seen certain behavior especially in the previous demos, we have seen certain behavior, the one-dimensional equation we have already seen is a combination of, right, it is a combination of these kinds of wave equations, so there are consequences, the fact that there are three propagation speeds, there are consequences, so I want you to pay attention to this, right, what are the propagation speeds, can you figure out what is moving, how is it moving, okay. So the actual problem, so it is one-dimensional flows, it is going to be just a pipe, right, it has a reservoir at one end and it is open to possibly the atmosphere or some other reservoir on the other side and we will decide on boundary conditions, the problem that I am going to run is going to be a relatively easy problem, I want to run the demo for a Mach number of 0.5, so the steady state solution will be 0.5 and you will understand as we do the demo as to why I pick 0.5, right and I will let you play around, once you get the code working, I will let you play around with various other possibilities that you can run, is that fine, okay. So let me start off, this code is written completely in Python, that is one of the reasons why I am running, because Python there is a penalty that you pay, but anyway and I am using grace plot like I did last time, the particular flavor that I am going to use for you today is called as a subscript p, it does not matter why, right, so I will create a solver, so I will create a, there should be an RK4, okay, so there is an RK, Ange Kutta 4 step flow manager, so I will create this flow manager and it is going to prompt me for various and sundry things, right, so how many grid points do we want to run, I want to choose something reasonably large, okay, so I am going to pick like 1000 and 1, very simply because most of the time I ask students to do some assignment and they run 5 grid points, 10 grid points, 12 grid points, you understand, right, so I have 1000 and 1 grid points, you could make it larger but then it will take too much time, 1000 and 1 grid points. So if I take the inlet total pressure to be atmospheric pressure for no particular reason and the inlet total temperature to be 300 Kelvin, simply in my mind I am thinking reservoir has been sitting there, it is in equilibrium with the right atmosphere outside, so 300 is really not the temperature in Chennai but anyway we will live with that, we will go with that. Outlet ambient pressure, now we have to be careful, now we are defining the problem here, so outlet ambient pressure I want it to be what, I want it to be so that I know the solution, right, just like we did for Laplace equation, it is nice to know the solution. So I have already pre-calculated it, if you sit down and think about it, it is around 84000 or something, 85000, 84000, so I am going to run for 84000, is that fine, right and this should give me a Mach number around 0.5, okay, I have not actually calculated the exact Mach number that the steady state solution should have and we are looking for a steady state solution, that is what we decided, we are looking for a steady state solution. I have told you before that ambient temperature is not a relevant parameter, why am I prompting for ambient temperature, ambient temperature changing the ambient temperature does not change the solution, right, but this is for the initial condition, this is not for a boundary condition, I am asking for the ambient temperature here, so that I can set the initial condition because as we have decided my valve is at the left reservoir, the P0 end, okay, so the inside of the pipe is completely at 84000 Pascals and 300 Kelvin, okay, so that is done, so this should start something off, yes it does, I will quickly just so that your eyes do not get zapped by that white, intense white, I will change it to a more pleasant colour, okay, so the other scales do not matter, it is a little difficult actually, this demo took me a little time to get right, simply because of the fonts and so on, so for the people in the video world do not worry about these now, I will read out the numbers, the class can most probably see them, I will read out the numbers as they are relevant, okay, fine, it is just not worth trying to make the letters so large that they are visible out there, okay, so what do we have, what I can do now is this solver which I called O for whatever reason has various things built into it, you can see the one that is actually of interest to us is this item called step and what step does, what step allows you to do, step takes the number of steps that you take and L, not lambda, it is L, is delta t by delta x, okay, is delta t by delta x, it is not sigma, okay, it is not the CFL, it is delta t by delta x, so I want you to remember this, in this case I am prescribing delta t by delta x, okay, so we need to have a discussion as to how come I am not prescribing the CFL, how did I decide to pick this delta t by delta x and I seem to have taken 005, delta t by delta x is 005, what is my delta t, if my pipe length happens to be 1 meter, I have taken 1000 intervals, each interval is 10 power – 3 meters which is 1 millimeter and this is basically 5 microseconds, okay, so I am going to be advancing my solution in 5 microsecond time steps, fine, is that okay, that is what we are planning to do, so what I will do is I will again remember this for loop just to remind you basically says that do this 100 times, what we want to do 100 times, I want to take steps and I will do 10 steps at a time, right because it is going to trudge along that 5 microseconds or whatever it is, I will take 10 steps at a time, we will see where this goes, okay and we will see what happens with this, is that fine, let me get my graph back up so that if the graph is clear and if I do an enter and one more enter, oh very noisy curve, I am not, this is not a sanitized simulation in the sense that I have not cleaned it up and all of that kind of stuff, am I making sense, so you have to figure out what is happening here, so question is what happened, actually I should have taken maybe 50 times steps since 50, 50, I have to loop to 50 maybe instead of 100 but it is okay, let me, maybe I will run that through again one more time, you have seen it once, second time you can actually observe, so I want you to observe certain features, what you saw, okay, we will run through that again and instead of doing 100 I will do 50, okay, I think I confused my FTCS part which I am going to do later with my younger good part which I did not know, so what we are basically, what you saw was some feature, travel left to right, seem to possibly reflect off, I do not know what is happening, something coming back and then there is this one solitary step here that is propagating left to right, okay, so we will try to do the following, we will try to estimate what speeds are these things propagating at and what are these, what do we expect, what is it that we expect, okay, what are we expecting here, so let me just, I will just kill this, I do not want to run that, so maybe I will just create another O1 equals 100 flow underscore t dot rk4, I will just quickly create another one, okay, there we go, set that up again, 100, that is fine, done, in this time I am going to be a little more sensible and instead of doing 100, I will do 50, oh, now I am getting conservative, yeah I will do about 20, that is fine, what happened, how did I disconnect the pipe, is this a problems of, at this point you can most probably hear me think, fine, there you go, let us try it one more time, okay, so I say 4i in range, maybe because I am taking sufficiently large time steps, I will do 100 and just do O dot step, I will change the, I will change that later, so I am taking 100 time steps, I am taking 100 time steps, 1, 2, there you go, it is taking one time step as a time as I indicated is a pretty painful thing, all those little sharp features that you see are the solution oscillating and we saw this in the demo for linear wave equation, so one of the problems is, it is possible for me to tune it so that I eliminate those sharp peaks, whatever, right with the control that we have on some parts, in fact I could have tuned the parameter, I could have hunted around look for a parameter to find that I will eliminate these, okay, right, but I actually want you to see, even at this crude, at this crude stage, I actually want you to see what is the, let me take 100 more time steps, because this step here has not travelled that far, this has travelled quite far, so in 100 time steps where has this come, can you give me an estimate about 185 or something of that sort, 180, 185, so if I take 100 more time steps, I expected to come to about 360 in this step and these 3 seem to be aligned, so that is some feature that is travelling forward, this is moving at a slower speed, okay, this is moving at a slower speed, so there goes again. Now as I said the value that is out here, I hope this flickering is not too uncomfortable, the value that is out there, the step, the magnitude of the step, get your ideas to what is happening, magnitude of the step, yeah it will stop now, right, so they are propagating at seemingly a constant speed, right, they are propagating at a constant speed, this lower part, the floor here is 84,000, that is the right hand boundary condition, that was our initial condition, this here is one atmosphere, 101325, so that 101325 from the left hand side is now propagating towards the right, it is basically what is happening, there is air at 101325 and that is propagating from left to right. And as that pressure, the question is what is propagating, as that pressure propagates, so along with this, so you have this feature that is propagating, that is the, that is sort of a pressure, sort of like an acoustic wave if you think about it, so I would expect that this is corresponds to U plus A, this corresponds to U plus A, so travelling in the right direction and there are 2 features travelling, left to right, 2 travelling left to right, what does this other one correspond to, most probably corresponds to the characteristic U, this speed here is about 44, 45 meters per second, this reading if I stick it here you cannot make out, I can see on the scale there are numbers on the top that tell me, so this reading it could be anywhere but if I stick it in the middle, right, this is around 44, 45, so this distance that it has travelled, you have to look at the x coordinate, this distance that this has travelled, this distance that it has travelled, right, corresponds to that speed times how much, what is the time we are taking 5 microseconds into 200, right, which is 1 millisecond, am I making sense, so the numbers sort of work out, the numbers work out, so this is basically propagating this, this entity here is propagating at this speed, okay, so this is most probably the contact surface, am I making sense, is that fine, okay, that is most probably, so the pressure pulse, the pressure has gone and the fluid is coming along, right, the actual molecules that were, the actual molecules that were inside the stagnation chamber, right, inside the reservoir, the actual material that is inside the reservoir is now travelling through, but that is travelling only at 44 meters per second, it is travelling at a slower speed, is that fine, okay, so that is coming along, this is, this is material, actual material that was inside the reservoir that is travelling, okay, all of these are occurring because of the compression wave, because there was compression, fine, okay, so you have already seen this, what do you expect when this goes to the other end, when this pressure pulse reaches this end, you are going to come to this end and it is a, and there is a declaration that it should be a 101325, but it is not, it is an 84000, right, so the pipe is completely at 101325, the boundary condition there is 84000, that expansion wave is going to start propagating back, it is an expansion wave, okay, that is what we are looking for, so let me get back here, now we will run it maybe, what should, what do you say, if I run this 50 time steps, 10 at a time, because I do not want to pain you now, okay, now we already know where we are going, right, let me get back there, so we have our picture back, yeah, so 10 at a time it really moves fast, 50 time, 50 time steps, 10 at a time is 500 into 5 microseconds, now I want you to pay attention to, pay attention to this slope, what is happening to this slope as it propagates right to left, the slope it starts to tip, the curve starts to tip, right, because it is an expansion fan, am I making sense, it is an expansion fan, right, if you, it is an expansion fan, so that the slope starts to, right, does it make sense to you, and what is the speed you expected to be propagating at, well we will find out, okay, we will run it a little longer and we will find out, now remember it is very easy to look at this feature propagating right to left and think that things are happening right to left, no, the flow itself is still left to right, do not forget, this 44 whatever 45 meters per second is left to right, what I see here is 90 meters per second is left to right, right, it is 90 meters per second left to right, which is why this is propagating to the right faster than the bottom is propagating to the right which is why it starts to tip, okay, that is why it is starting to tip, it is an expansion fan, okay, I hit an extra enter last time, so just to make sure, let me get back, sorry about that, we are likely to cross the, this, it is not quite a step, right, this expansion fan is likely to cross, this should be a sharp step, it is not a sharp step, right, we are likely to cross this, do you think anything will happen when they cross each other, any predictions, do you think anything will happen when they cross each other, do you think this will get a, this will get destroyed, its magnitude will change, the step size will change, they correspond to different characteristics, remember, this definitely corresponds to a characteristic of its own, right, okay, let us see, do that, it is propagating some tiny oscillations here and there, so this is another 500 time steps, so we have so far run, 1200 time steps, there it goes and what happened, it is like the water level, you know the water level going up or coming down, that is it, that step did not go away because that is physically still the air that was, that is from the reservoir, that is travelling and it is travelling at its own speed but when the expansion fan came, something interesting happened now, now the speed at which it is going to be travelling is 90 meters per second, you expected to travel faster, U has increased, expected to travel faster, right, the expectation is that it will travel faster, okay and from this point onwards, it will get a little noisy, we cannot really track because of all these characteristics, see now what is going to happen is, imagine the expansion fan consists of lots of characteristics and each individual characteristic is going to go, hit the right hand boundary and bounce off it, if your pipe is long enough, they may again coil us into a shock or pipe is not long enough, okay, right, so it is not, we are not going to see, we are going to see some funny sloshing kind of motion, that is what we are going to see, right, but I want you to, the thing that at this point, what I want you to pay attention to is propagation speeds, how fast is something going left to right, how fast is it going right to left, okay, any feature, how fast is it going left to right, how fast is it going right to left, okay, the, I am constantly rescaling which is why, if you had it on a, because I wanted to squeeze 3 graphs in, my scales are changing, okay, that is why there is some peculiar behaviour, look at this, look how fast this thing fellow came back here, how come it came back so fast, it is travelling at U plus A and U is increasing, right, it is travelling at U plus A and U is increasing, left to right it is travelling at U plus A and U is increasing, the magnitude of U is increasing, it is travelling at something that is similar to U plus A, at least and U is increasing, okay, so what do you expect and look at this, right, this was something like pottering around, right, at a very slow speed and if you make a calculation, if you are keeping track, right, I would, if you want you can note down the times or whatever it is, the timestamps or you can run it yourself, right, this is at about 550 millimetres, 550 millimetres, okay, note the propagation time right to left now, there you go, one more interaction, that step sinks, this step identity is not lost, that is it, it did not even make it across to the end of the pipe, okay, because the return line is at U minus A and if you are going to be coming down, once you get down to 150, 100 and so on, see once you get closer and closer to the solution, as you get closer and closer to the solution, the expansion waves coming from the other side are going to take more and more time, okay and if you want the steady state, if you want the steady state, we already have an issue here, there is seemingly a problem, we have a potential problem here, right, what is the issue? So if I want the steady state, I want basically the right hand boundary condition and the left hand boundary condition to be in equilibrium and there you go, so now we should have a compression wave coming from the other side and watch how fast that travels, that compression wave of course will be, it is not a compression wave, it is a series of waves that are reflecting off, okay. So we took 2 of those 250, right, 2 500 time steps to go to one end, I will just do this one last time and then maybe we will either choose a larger time step or we will either choose a larger number of time steps before visualization or we will switch, okay. So the leading edge is already here, the leading edge of that compression wave is already here and it is already at the right boundary, right, it is already at the right boundary and there you go. So now the expansion fan is going again and here now I am using these terms loosely because you have actually a mess of characteristics, right, like characteristics going in 2 different directions. But just to give you an idea, the right hand end is about 165 meters per second, the left hand end is about 155 meters per second, okay. So it is traveling quite fast, please remember left to right, it is traveling quite fast left to right, this pressure here is about 88000, right, this is a static pressure, the total pressure here of course taken the 155 into account will be 101325, this pressure here is still at 84000, fine and the process that you have seen is what is going to happen is these waves are going to keep traveling back and forth but critically the 84000 is something is going to travel upstream causing speed up, causing the flow to speed up and it is going to keep happening, right now it looks like it is going to keep happening till left hand side and right hand side are both 84000. So we have a pipe that is communicating this 84000 upstream, right that is basically what is happening and the difficulty that we have with this is as you get closer and closer to the solution, as you get closer and closer to the solution this communication upstream becomes more and more difficult, it becomes slower and slower, okay. This communication actually gets, is that fine, okay. So this communication I look at this, I mean we are running the same 500 time steps, right and it is not even made it, I mean we are running the same 500 time steps, it is not even made it. So you can imagine I am running, now you understand why I ran the condition mark 0.5, right, so if I am running 0.9, right if I am running transonic speeds we have a problem, transonic speeds we have a problem, right u-a is almost 0, low subsonic speeds we have a problem because u is almost 0, okay, right. There are two situations, u-a is not a bother, u-a is never a bother, right. So we have two situations where the u-a characteristic can turn out to be a problem that is transonic flow and if you think about either from your experimental aerodynamics or any other course that you have had, transonic flow is difficult to compute, is difficult to handle, is difficult to perform experiments and so on, right, okay. The other extreme low subsonic flow is an issue here, okay. This class of schemes if you say I want to compute mark number 0.01, we need to do something special, fine, okay. So what I will do maybe just for the fun of it, I will make that 50. I do not know if anybody has been keeping track of the amount of time that we have spent on this but let me see. So of course I am spending 50 time units before I graph, right. So it seems to move relatively better but it is not running any faster really except that I am not wasting time graphing. The return as expected is a lot faster. In fact, it will just go through. So I just want to show you where this goes, okay, this is fine. Maybe what I will do is just for the fun of it, instead of doing this maybe what I will do is I will run a Corsair grid, right. Then we can run to, we can rush to steady state quickly instead of doing this. I will run a Corsair grid after this. I want you to, you have any feeling for how much the residue is going to drop or at least the delta Q? See, right now if you look at this, the speeds, the speeds range between 174 and 173, right, 175. So a little over Mach 0.5, it is at about 175 and the pressures range from 84,000 to 84,400, 84,500. So you could say to do, if you are only looking for 2 decimal places it is converged to 2 decimal places. If you look at the residue, right, the residue may not be that bad. Is that fine? Maybe instead of trying to drive this to what I would call convergence, right, instead of driving this to what I would call convergence. So there is an issue that you have to remember. You have a code, you have an existing code, you have tested it, right, it has been tested. You are running it in the regime, flow regimes for which you have tested, it is well tested, it is a mature code. Then you can look at it and say for engineering analysis, if I have one part in 1000 it is okay. Am I making sense? But when you are developing the code, you are actually developing the code, you would like to know that if I give the code, you know, derive it in terms of floats, if I write it in terms of floats, that it will converge to whatever machine position that you have with floats. And if you give it doubles, it is going to converge to whatever that is the code converges, you understand. You would like to know while you are in the development process, when you are making production runs it is a different story. Once the code is tested, right, it has been verified, somebody has certified that this is the code that, right, it works, then it is a different story as to how you use it, right. But when you are doing the development, so just to emphasize that and not, you do not get the impression that this day is just talking. Let me just show you. And so that I do not take too much of your time, I am going to restart this because I do not trust right now. I import, ooh, I forgot one thing that I should have done, it does not matter. I should have plotted the convergence, I should have done the convergence plots, it is okay, I will do it for this, right. I mean having done all of that stuff, I have those, I have the convergence plot could have been plotted. I will use 101 grid points, okay, so it will be 10 times faster. I will run the same case, 300 Kelvin. I would suggest that different temperatures, they all have an effect. Temperature will affect the speed of sound, they all have an effect, right. So I would suggest that you look at that. Let me just quickly, okay, it is fine. So 101 times steps, 4i in range 100, 10 times steps at a time, we will just see what it does, that is 1000 times steps. Whether that is enough or not, I doubt if it is enough but this is going to move fast. Is it going to move? There you go, ooh. So it is definitely faster, maybe 10 was too fast. This is going to move fast but I want you to note, in this animation, I want you to note that the waves coming back are slower than the waves going, see that is it, it just goes slow, almost instantaneous, slow, almost instantaneous. You understand what I am saying? It is very clear that, it is very clear that left to right is okay, so that is the 1000 times steps. It is already at 84,000, the pressure is at 84,005, the speeds are at 177, all of these will soon see, this density in fact is to 5 digits, it is the same number, it is not changed. So it looks very noisy but remember the magnitude of that noise is of the order of 10 power – 7, 10 power – 6, is that fine, okay. So for those of you that cannot see this, all of these read 10275 on this scale because I am not going to add any, I can add more digits, I am not going to add any more digits, it just messes up the display. All of these read 177.47 meters and all of these read 84,000 Pascal. So you can say at this point, why do you persist in running this? But as I said, if you are in development mode, you want to make sure that it actually goes all the way. So let us push it, see what it does and you can still see there is this propagation back and forth, it gets noisy, some high frequencies seem to appear and disappear, right. It seems a lot worse than it actually is because I am dynamically rescaling the, I am dynamically rescaling the y-axis. So these Wiggles are not really as large, if you were to plot them on the actual scale, these Wiggles are not really as large. What do you think will happen now? Look at the top graph, now we are at quantization error, we are at the last bit, we have a single bit left. You can only discriminate one bit, am I making sense? Plus minus epsilon, we are there, we cannot calculate this, we cannot calculate it any more accurately, right. So if I run one last, just for the heck of it, if I just run one, that is it, is it nothing, is it going to sit there flashing, right, it may not show, is it going to just sit there flashing? We do not have sufficient bits, so now I feel good, yes, whether there are better schemes, I need not have added this dissipation, the way I have added it, whatever, right. But the code converge, and if I give it quad precision, the code will converge, okay, and if I test it over range of temperatures, range of pressures, range of Mach numbers, then I will turn around and say, hey, in this range, this code works, if you want to use 10 power minus 3, use 10 power minus 3, right, if you want, at 10 power minus 3 you have a reasonable solution. So let us just look at, let me import, let me just plot the, let me just plot that error, I will create another gray spot plotting and I will quickly excuse the color, I will quickly change that, I think I had something called demo, is it not, this time which will fix that, okay, so it is not relatively pleasant colors, G dot plot, and I have just for your, just to remind you, I have something called error, okay, I have something called error, I am going to plot that G dot plot O dot error, as usual, before you look at it, you should try to imagine what I will get, and maybe that is not what you expected, right, so remember the other thing that I told you, let me get this, let me get this so that you can see that scale there, the other thing that, remember that I told you is that the y axis you plot on log scale, so we will make this log, logarithmic, 1 e – 16, and I will plot every, only every 1000, I will show only every 1000, now that looks a lot better, okay, there are 100 grid points, actually if I had actually integrated, here I am not integrating, I am adding up the residues, right, but actually what I should do is I should integrate, which means that I multiply by 0.01, so this is at about 10 power – 12, 10 power – 13, that whole curve would have shifted down, you understand what I am saying, whole curve would have shifted down, so and if I run it longer, at this point it will just be flat, right, in fact I stopped it quite early, normally when I am developing code, I am developing code, I let it continue to run, am I making sense, I not only want to see that slope dropping, and look at this, I mean this is really neat, right, you can see, I would like it to be steeper, right, we will look at that, we will talk about that later, I would like it to be steeper, and as I said I really wish I had shown you that 1000 and 1, anyway it does not matter, so it is straight, and then after that I like to see the horizontal part extending out, maybe the same amount of, I want it extending out, right, because fluid mechanics is a very funny thing, right, I give you an example of a computation that we have done, we had a stone turbine was doing 1D flow premixed combustion of hydrogen and oxygen, and basically what happened was, so you have this flame front that is travelling through this mixture, right, and it is possible that, it is possible that, let me remember, let me get this right, yes, so it is possible that you do not have, the hydrogen uses up all the oxygen in its, depends on the mixture ratio, right, if it is stoichiometric it is a different story, but it is possible that the hydrogen is used up all the oxygen in the neighbourhood, so you run it, the reaction rates are all in picoseconds, nanoseconds, the fluid mechanics is running in milliseconds, right, so we take picosecond time steps and we march through and we say, oh, it is converged, then we say, okay, just for some more time why do not we run it for twice the amount of time and see what happens, and in twice the amount of time what was happening is the species were propagating down, right, and all of a sudden the hydrogen encounters oxygen again, and then again there is a rise, am I making sense, there is again, so you cannot just basically say, oh, it is all settled down, everything is fine, I have converged to a steady state solution, may not be a fact, so you should run it for a little more time to see what is happening, is that fine, okay, right, so that is as far, are there any questions, okay, so the things that we take from this right now are, the propagation speeds are important, we need to do something therefore for convergence, okay, we need to do something for convergence as far as these propagation speeds are concerned, the fact that the propagation speeds are disparate is a headache, one way travels very fast, the other way it is very slow, the faster it travels this way, the slower it is going to travel the other way, right, so we have to get some balance, ideally we would like the propagation speeds all to be identical, okay, and so in the next class I will derive an expression for that, why do not we just for the fun of it look at FTCS because that is likely where you will start your implementation, to see what happens, okay, and the reason why I am doing this is I want to, I want to give you confidence, okay, this is what I am getting, this is what he got, so at least I am on the right track, as I said this is not a fully, I have not sat down and tinkered with this code, but it is enough to, okay, so I will create a 1D flow and in this case I will use the flow manager, the generic flow manager which uses FTCS and surprisingly on, it is not particularly surprising, I use this, I have the same interface, should I do 1001, 1001, 325, 300, Kelvin, 84,300 is the temperature, quickly change that screen to O and ED, that is done for IN range, what do you want me to run, 100, okay, and how often do you want me to show that, every 10, maybe I will take 0 point and look at this, 00, that is what I had 005 last time, 04, okay, okay, let me go back there, see what it does, now in this case, maybe that 10 was in that grid, in this case for this demo, I deliberately added, the dissipation was, added was a little stronger, so you will notice that it does not, it oscillates, it is oscillating very close to that step, it is oscillating, but they die out very rapidly, okay, and you will also notice that this looks a lot smoother, right, we will run it for a little more time and you will see that I am not joking, and anyway this, at this rate it is going to take some time, so we will maybe instead of doing 10 time steps at a time, we will make it a little larger, right, okay, because we do not have that kind of time, how much larger shall I make this, 50 time steps at a time, well 50 may jump, but what they, we will try it out, let us try out 50 to see what it does, that is not too bad, so just like in our earlier wave equation thing, it is clear near the step where the high frequencies are, there is dispersion and there is a problem, but really look at that contact surface, it is not, I mean it is not, it is nowhere near a sharp jump, right, it is really smoothing out, that is because I have added so much artificial dissipation that I have just smeared out the solution, so the key, the key to getting a high resolution solution is determine where to add that dissipation and how much to add the dissipation, right, there has to be a mechanism by which you can do it, the earlier one I told you had an underscore p, right, one way by people do it is you detect the pressure, there is a pressure switch, there is a switch, you detect the pressure and you say, hey the gradient to the pressure, the pressure is varying very rapidly here, I am most probably in the vicinity of a shock, you had large dissipation there, I am most probably in the way, right, you understand, you add second order, not large dissipation, you add the appropriate dissipation there, I have added just arbitrarily as I told you, right, but you add the appropriate dissipation there and you can actually get a reasonably sharp shock, is that fine, but you will notice that here it is smoother, there are some fine wiggles, right, but those artifacts are also because the line thickness is very large, so when you cannot, right, even my curves, even my graphics cannot catch, so the graphics basically here will show, so these artifacts are not real, the wiggles that you see there are not real, okay, the compression wave is going to reflect off, expansion, expansion seems reasonably sharp, you can see it rotating now, it is going through the rotation process, this is smooth, right, this is like, there are really no wiggles, as I said on the ramp, these wiggles are because it is drawing, made up of horizontal lines which have a certain thickness, that is the only reason why it is there, this is really smooth, you want me to take larger time steps still, maybe we have time, I will do 1 in 100, 1 in 100 may be large, that way that is going to take 10,000 time steps, you guys should not just let me, there goes and it is like the ocean level rises and falls, so just the step just comes down, the steps are wise, the step is smearing because of dissipation, the extra viscosity that I have added is my fault and then the reflected fan, the reflected fan they do get steeper but it is not long enough for the, for it to coalesce, reflects off the wall, is that supposed to be 10,000 time steps, right, because remember the individual time steps are extremely small, okay, it turns out the reason why I took Range Kutta is, Range Kutta will allow me to take CFL that is close to 2.8, right, allows me to go to a CFL that is quite large and that is the reason why I do not remember if I did an up arrow, yeah, I do not, all I want you to see is that yes, FTCS behaves the same way, so it did not have to do with the scheme, the return wave is slower than, right, the forward wave, the contact surface travels at the speed at which the fluid is moving, if you add too much dissipation the contact surface is not going to be a contact surface, it is going to be a contact something region, right, it is not contact, if you think about it very often you think of contact, you think of something that sharp, so it is sort of a smeared overlap region kind of a thing, so you have to be a bit careful, right, so even if you use what you detect, where you detect, right, so there have to be, there are as I said, please remember, there are a whole host of schemes, I will stop this here, is that okay, okay, then we will just talk after this, there are whole host of schemes that are high resolution schemes, let me, if you want let me just show you the convergence plot for this and see if it looks different, FTCS, okay, so from grace plot, I import grace plot again, G, I create the plot, I will get rid of that glare from your eyes, there is something that I started doing in my, sequence that I started doing in my sleep now, so then you have code dot error plot, oops, cannot auto scale, no sets, no active sets what happened, I am not accumulating error here, okay, fine, my mistake, I did not keep track of the error, I did not update the error here, anyway you can try it out, the behavior is essentially the same, right, I do not think we have enough time for us, for me to run the 1001 for the other one to, the behavior is essentially the same, the thing is that I want you to take away from this, for this course, right, that we need to do something about disparate speeds, propagation speeds are different and that is the problem, especially at transonic speeds and low subsonic speeds, okay, so we are going to, I will suggest on Monday something to do so that convergence is faster, right, low subsonic speeds you can even get wrong answers, you can even get wrong answers because your problem is expected to be ill conditioned, right, such problems where you have very disparate rates, you may have seen in your differential equations course, they are called stiff problems, very ill conditioned, right, so if you take a system in which what everybody is now hollering about, if you take a system in which it takes a million years for trees to collapse, they are crushed and form coal or form oil and it takes you a few days to take that oil out and burn it, then this differential equation is very stiff if you are trying to do an energy balance, one is in the time, time scale is in million years and the other is in time scale of days, right, and if you do it in days that million years will take forever, and if you try to capture the million years, the days you do not capture at all, so there is a problem, these are stiff problems, okay, so we will look at some way by which we can fix the stiff problem. The other thing is here I have taken, here I have taken delta T by delta x fixed, I want you to think about that, one day I will tell you that which means that at each point the CFL was different, because the propagation speeds are different, delta T by delta C, right, so what does it mean to keep CFL fixed, fine, so in the next class we will look at these issues, is that fine, okay, thank you.