 So, we will continue with our derivation of an expression for the average term at the interface. There again just based on a question that the student asked me yesterday. I thought I would remind you that when we looked at the equation dou u dou t plus dou f dou x equals 0 f is f of u right. You remember that across a shock as we called it across a discontinuity because I had explained this problem in terms of explain the or model in terms of a small shock tube in which there is a tiny discontinuity and we are trying to figure out what happens in that shock tube. So, just to remind you remind you the propagation speed at that time we found the propagation speed at that time just to remind you was f of u r minus f of u l divided by u r minus u l right. So, where you are talking basically in terms of you have you have an interface and on the left hand side you have u l and on the right hand side you have u r and we were basically looking at how that interface propagates and we derived this expression for the speed of propagation right derived this expression for we are essentially we are essentially using that. Now, they are asking the question we are asking the question what is this a in the scalar case this was just a number, but in the vector case then it becomes a little more complicated it is not just a set of three numbers right. So, in the vector case we have dou q dou t plus dou e dou x equals 0 dou q dou t plus dou e dou x equals 0 e is a function of q in a similar fashion. So, this is this is if you look at this what we are basically saying here is delta u times us equals delta f right and we write an identical equation here delta u times this is delta u times us equals delta f and we are writing an identical equation. So, the different ways to approach this yesterday I gave one level one kind of motivation. So, you can just basically write delta e equivalent to delta f is some a times delta q is that fine and we wanted to find out we want to find out what are the entries in a want to find out what are the entries in a. Now, as I indicated we will convert this equation we will convert this equation in terms of enthalpy okay. So, what was what is delta e delta e is delta rho u delta rho u squared plus p delta rho e t plus p times u okay. So, other than the delta is it is clearly the same as e. So, we will just look at e. So, if I want to convert it to enthalpy there are two things one I need to get rid of the I want to the objective is to get rid of the pressure and the total energy okay. So, I need to get rid of this p and the definition of enthalpy of course directly gives us the total enthalpy here. So, rho e t you think about it definitely enthalpy was h is e plus p by rho. So, the consequence the total enthalpy is total energy plus p I have multiplied through by rho okay. So, immediately this quantity becomes rho h t that is nice okay. The other expressions are little messier. So, this is it is nice we will take it right. What was p you remember the expression for p we got p through the definition of e total we got p we got p through the definition of e total as gamma minus 1 plus u squared by 2 is that right p by rho p by rho is r t r by gamma minus 1 is cv cv t is e okay. That is basically what we have done and as a consequence this p in fact turns out to be e total minus u squared by 2 if you want rho e total if you can take the rho inside also gamma minus 1 yeah. So, a you will have to bear with me because we are going to make the substitutions and all of that stuff b you will have to make sure I do not I stay honest do not make sure I do not make mistakes right. So, okay here we have it what is rho u squared plus p therefore is well before I do that let me I need to do one more step right because if I substitute for rho u squared plus p from here then I will get a rho e t right. So, what shall I do I want to eliminate this rho e t is there something I can do up here okay. So, maybe before doing this you can either add p to this and eliminate it just like we use this equation you have to be a bit careful okay. I can add p here so e t plus p e t plus p by rho e t plus p by rho is h t. So, you have p by rho into 1 plus 1 by gamma minus 1 plus u squared by 2 is that fine. So, I get a gamma divided by gamma minus 1. So, in fact the same p can be written as h t rho h t minus rho u squared by 2 into gamma by gamma minus 1 is that fine okay. The only difference is that this gives me a gamma by gamma minus 1 little manipulation now come back what is rho u squared plus p rho u squared plus all of this stuff. So, that gives me a gamma by gamma minus 1 rho h t minus a gamma by gamma minus 1 rho u squared by 2 not much we can do with this. We can combine these two terms this gives me rho u squared times 1 minus gamma by 2 times gamma minus 1. So, I will have a 2 gamma minus a gamma which gives me a gamma in the numerator then I have a minus 2 divided by 2 into gamma minus 1 okay. So, we have figured out rho u squared plus p is gamma by gamma minus 1 rho h t plus gamma minus 2 by 2 times gamma minus 1 rho u squared is that fine. Yeah as I said you please make sure check to make sure that there are no algebraic errors fine. So, that is delta e what about delta q. So, we need to just look at q, q is rho rho u that is easy rho e t and we have made a substitution for rho e t already rho e t is rho h t minus p and we have an expression for p in terms of rho h t this equals rho h t minus gamma by gamma minus 1 rho h t plus gamma by gamma minus 1 rho u squared by 2 is that fine. So, here again I get a gamma minus a gamma it goes away I am left with a minus 1 divided by gamma minus 1. So, in fact rho e t equals gamma by gamma minus 1 rho u squared by 2 minus rho h t by gamma minus 1 is that fine okay. The only one left the only one left. So, of course we can stick a delta in front of this let me get delta rho rho delta rho u delta rho e t only one left is a okay what is a 0 tell me the entries of a gamma 3 minus gamma gamma minus 3 gamma minus 3 by 2 times u what is the yeah gamma minus 1 times u cubed minus gamma e t and that is 1 3 minus gamma gamma e t minus 3 by 2 gamma minus 1 u squared that is 0 gamma minus 1 gamma u. So, really the only one we have to only one we have to be concerned about are these two okay. Now I want to say something here right think back to the previous class where is this a is an average a where is this a. So, this is this is the a that we are getting at the notation that we used in the previous class at t minus half. So, all of these use that I am indicating here they are not the same as the use that you see here all the use that you see here are a different category right these correspond to delta rho u and so on yeah yeah I think it should be multiplied by gamma minus 1 by gamma not gamma. It should be multiplied by gamma minus 1 by gamma did I do yeah gamma minus 1 by gamma yeah I have a gamma minus 1 here that is fine and what is the consequence of that that is going to have that is going to ripple through the whole thing that because if I substitute for p this 2 did not really look that good but if it is fine. So, what does that give me here I have a cheat sheet I can actually pull out a piece of paper and write it out but I thought I would work through it yeah tell me. So, as a consequence I have rho u squared plus p and the p gives me that is here what you are saying is this should be gamma minus 1 by gamma is that right that should be gamma minus 1 by gamma and this gives me a give me a 1 by gamma a gamma minus a gamma gives me a 1 by gamma now I am happy I do not remember seeing a gamma minus 2 by 2 but anyway it is fine 1 by gamma so that is 1 by gamma rho u squared plus p will give me a 1 by gamma and this is a gamma minus 1 by gamma this is gamma rho u squared by this is 2 gamma 2 gamma minus gamma gives me a gamma minus 1 gamma plus 1 minus of minus gamma plus 1 okay I am willing to live with that as I said by 2 gamma as I said right and this should be a gamma by gamma minus 1 gamma minus 1 by gamma is that fine okay. So, what happens to this then what does that give me for rho e t rho h t rho e t is so this is a this is a gamma minus a gamma so that is a 1 by gamma right 1 by gamma rho h t plus gamma this is gamma minus 1 okay right now I will go with you guys as I said I have a cheat sheet anyway I know what the answer is supposed to be so it will work out right plus it does not work out I am there is a reason why I am doing this I mean I it is very easy to just put up the answer at the end right you get you have to you do not want to get into the habit of just opening a book and say there is an expression in this book I just take this expression and you can waste a lot there could be a typographical error there can be a sign error there can be something as silly as this it happens these things happen right I could take this I can write it up I can type it up I can publish a book and nowadays it is very easy it is out there you look at it it is on the web it is in the print and you say yes this is correct you take it you implement it you are spending a month 2 months 3 months your code is not working things are not coming out right and it may be all because of a silly typographical error right. So, whatever it is just like you have done now you should get into the habit of any equation any expression that you use I am not just taking it from the book or taking it from a reference but make sure that you can derive it right make sure that you can derive it and that you have you are you are confident that the derivation is correct am I making sense okay. So, I am going as I said I can I can very easily write the as easily write the and I have a little cheat sheet in my but there is a reason why I go through this process right I want you to see I want you to get into the habit of doing you have to do it you have to check right you have to check and yeah it is it is error prone process you have to know how to how to make you know how to do counter checks and so on fine okay. So, one of the things here of course is that you know that this gamma et that is very nice gamma et will give me you know you can divide through my row you can make a substitution here right now okay back to where I was so we are back to where we where I would be explanation is giving you earlier. So, these use are not the same as the use that you see up here these use are different okay this you of course comes from the state but the minute I write delta Q I am talking about some you left and you right. So, delta rho u is actually rho u left state-rho u right state-rho u left state making sense that is delta rho u okay. So, these are actually rho r u r-rho l u l that is where these are these are all lefts and rights this is at actually at the interface these values these values do not confuse them these values are actually at the interface in fact our objective is to find this u right our objective is to find this u. So, if I substitute for et and yes I know that this has only et and u in it but if I substitute for et here in terms of total enthalpy the only two things that I need to find here are u and total enthalpy that is a genius here you understand what I am saying the genius of this derivation is that you are left with only u and ht to be found right though we started off by saying oh my god there are 9 quantities that need to be found I have only 3 equations right what we have ended up with basically is u and ht at the interface. So, these are all actually at p-1-2 okay these are all actually at p-1-2 so right now for now I will write p-1-2 later on I will make my life easier and right I will make my life easier. So, these are all at p-1-2 because once we have called these urs and urs right basically say why do not I just leave that as u so we leave that we leave that as it is okay now we need to do the grand multiplication okay we need to do the grand multiplication the first equation is relatively easy it requires no effort okay so we are going to go across the 3 parts of the board here right just to remind you you look here delta e is a delta q so I need to find a delta q to get my delta e for the first equation what is delta e first equation is delta rho u that equals what is a delta q tell me look at the equation and tell me it gives me nothing it says delta rho u is delta rho u first equation falls apart okay the first equation gives me nothing it basically says delta rho u is delta rho u but fortunately we still have 2 equations and we have only 2 unknowns right that is what I am saying so the great thing is that we have reduced it to 2 unknowns so delta rho this is just an identity that gave us nothing fine is that okay let us look at the second equation let us look at the second equation I have my rho u squared plus p here so I am going to erase I am going to erase a lot of this lot of this stuff right whatever we need to substitute for rho ht I presume you have in your notebook so you will help me out so I am going to erase a lot of this stuff so there is any errors all evidence of errors are going to disappear what does the second equation give me this is rho u squared plus p somewhere I had written rho u squared plus p delta of rho u squared plus p is so that is here so gamma minus 1 by gamma rho ht plus gamma plus 1 by gamma rho u squared by 2 right that is rho u squared plus p and this equals that is delta e a delta q first element is gamma minus 3 right u p minus half I want I want to differentiate I do not want to keep saying this u p minus half maybe I will use tilde or something of that sort to indicate that it is the value at so this is gamma minus 3 by 2 into u tilde and what does that multiply delta rho delta rho second one gamma minus 3 into delta rho u and gamma minus 1 into delta rho e t which is this quantity plus gamma minus 1 times that quantity rho ht delta rho ht gamma minus 1 into that fine where is the minus 3 minus gamma 3 minus gamma therefore it is minus okay so you should have a sense that we are in the right direction because gamma minus 1 by gamma rho ht gamma minus 1 by gamma rho ht any time things cancel you feel good though in fluid mechanics sometimes they cancel and you made a mistake right you always have to keep your eyes off you still have to keep your eyes off it is happen to me right there are times I was thrilled that something cancelled and everything came together and then you had to understand that fluid mechanics is beautiful because sometimes they do not cancel the add right so there is problem okay good so you have that you cancelled that out right we cancelled that out tell me now what is the equation that we have what is the equation that we have is this right u yeah yeah anything is u here u tilde p minus r right because it is coming out a lot easier than it is supposed to and not supposed to get a linear equation supposed to get a quadratic so that u tilde squared and there is a u tilde here there is a certain pattern to it even I step back and look at it I say I have a u squared u cube u u squared you understand nothing u is a certain pattern to it right one corresponds to energy which is like momentum times do you integrate am I making sense so there is you expect you expect those kinds of pattern right I am up here I am not really paying attention to it but at some point you have to and I caught it because I know I should get a quadratic equation right but normally you can keep your eyes open for these kinds of patterns make sure that right those things work those things really work okay so what does this give me on the left hand side delta of rho u squared gamma plus 1 by 2 gamma and here I have another so I guess I can bring that over to the right hand side okay so what I want to do is what I need to get the figure out what is gamma plus gamma minus 1 squared by 2 gamma minus gamma plus 1 by 2 gamma just to straighten that out gamma plus 1 into that is gamma plus 1 oops what am I doing I guess I will have to expand that out gamma squared minus 2 gamma plus 1 minus gamma minus 1 divided by 2 gamma that gives me a gamma squared minus 3 gamma plus 1 divided by 2 gamma no plus 1 thank you which gives me a gamma minus 3 by 2 yes and again I am happy why am I happy gamma minus 3 will cancel right so this is all going in the right direction it is all going in the right direction we started off with this really messy equation it is already so this is one of the things about derivation it starts getting a little messy sometimes we panic and we just say oh let it go this cannot be right but if you if you persist right if you stick with it then things sometimes for start falling into place right and things like this make you feel good everything cancel yes this must be the right direction okay now I will erase this right because I am going to leave the enthalpy thing to you okay and it is not I will tell you why it is not complicated and you know it is not complicated lots of things are going to simplify and the expression that you get will be very similar to what we have here I leave the enthalpy part to you so the gamma minus 3 goes away so tell me what we have we have a delta rho delta rho gamma minus 3 what happens delta rho by 2 u tilde squared minus delta rho u u tilde plus delta rho u squared by 2 is that right this equals 0 you have quadratic equation in u tilde in fact we can multiply by multiply through by 2 get rid of that 2 multiply through by 2 so you get a 2 times looks even better so the roots for this are u tilde equals delta rho u plus minus square root delta rho u squared minus delta rho times delta rho u squared right we understand delta rho u squared is applied to the delta is applied to the whole thing being a little lazy whole divided by delta rho okay this cannot be simplified any further yeah the 2s go away all the 2s will cancel that is why I got it in this this is a canonical form I got it in the standard form okay okay is that fine now we cannot go any further now though it looks messy we have to we have to substitute for the delta rows and delta rho u okay cannot go any further so delta rho u is rho r u r minus rho l u l so delta rho u whole squared is rho r u r squared plus rho l squared minus twice rho r u r combine them together rho r rho l u r u l delta rho of course is rho r minus rho l that is easy and delta rho u squared is I will write it below rho r u r squared minus rho l u l squared substitute right we boldly go ahead because it has been working so far it is going to work now substitute what we get u tilde candidate is rho r u r right rho r u r minus rho l u l plus minus square root rho r u r squared plus rho l u l squared minus 2 rho r rho l u r u l delta rho times this plus maybe I should anyway it is okay I will stick this under all of this is one numerator plus rho r minus rho l times rho r u r squared minus rho l u l squared this is the numerator the denominator of course is this whole thing divided by rho r minus rho l we will get to that where did I miss the minus rho r u r rho this comes from this quadratic from this plus minus minus and minus very because every minus is very critical but that minus particularly very critical it is critical because I see a rho r squared u r squared that is going to cancel that and rho l squared u l squared that means cancel that okay that minus or friend okay so what do we get this gives me u tilde s if I simplify plus minus square root I get a minus 2 rho r rho l u r u l minus rho r minus rho r minus plus plus rho r rho l u l squared minus minus plus plus rho r rho l u r squared square root okay whole again divided by rho r minus rho l whole thing divided by rho r minus what can we do to this u l minus u r whole square root under root rho r u r minus under root rho l u l that what you get what you get minus plus factor out the rho r rho l good rho r rho l into u r u r minus u l squared okay that is what that gives you so you can get it out so u tilde equals rho r u r minus rho l u l plus minus that none of that divided by rho r minus rho l is that fine yes plus minus will take care of that plus minus will take care of that now I am going to so there are two things I have already told you I am going to leave the second equation to you right the last equation to you the plus root will not give us something that is useful okay if you take the plus root I would I would I want you to try it out okay plus root if we have the time maybe we will get to it but the plus root will not give us the positive root is not going to give us something that we that is useful we will take the negative okay I am going to take the negative root you can follow through on the positive root with the argument that I give for the negative root you can then go back and look at the positive root and see why what was what is wrong with it there is something wrong with it okay so I take the negative root I use this obviously the first time you derive it you are going to try out each one and instinctively we try the positive root and then try the negative root now what tell me a way to simplify this you get a I will I will I will see we have to live with the square roots right we have to just live with the square roots so we will do something see this is these are the times for us to do bold things right I am going to write this as square root of rho r square so this looks like an a squared minus b squared we can factor it and then there is hope that we can do the same thing here right I presume that is the direction in which you are going okay so then if you go in that direction if you go in that direction so you have a u r you have it you can so you can pull out the urs and the uls right you can combine the terms so u tilde is tell me so what do I get I can pull out a rho r square root rho r u r that gives me a square root rho r minus a square root rho l and what is the other one give you plus square root of rho l ul the u is outside the square root and I have a minus sign here minus sign here that becomes a plus into rho r minus square root rho l okay divided by rho r minus rho l which of course can be factor as a consequence of all this algebra we get this amazing expression right which tells us that which tells us that u tilde is square root rho r u r plus square root rho l ul divided by square root rho r plus rho l square root rho r plus square root rho l I have to be a little more patient I am just thinking in my mind convex combination and doing the wrong thing okay so if I define alpha just to if I define alpha as square root rho r by square root of here I go again rho r the square root of rho l then the other way is 1 minus alpha is of course the other term so u tilde is an alpha times u r plus or 1 minus alpha times ul okay right I want you to follow through on the positive root I do not have enough time to do it right now I want you to follow through on the positive root but I want you to understand that look at that positive root in this context alpha is clearly between 0 and 1 you understand so this is truly a linear combination and because alpha is between 0 and u tilde will be between ur and ul okay you will go through the positive thing you will be able to reason out that you do not have that am I making sense so I have I have given you two quantities and I am saying get me a mean value between these two quantities and your answer is yeah it should be between those two quantities get me an average between these two quantities you expect it is and this satisfies that okay the positive root will not the negative root satisfies that it is in between it is an interpolation we promised an interpolation we have got an interpolation the only difference is that this looks a bit bizarre right but remember that we interpolated in some kind of a function space that is e was a function of q and we had two values of q right and we are looking interpolating we are looking for a mean in that in that setup not in the xy coordinate system so we are we are willing to live with okay so the average you will get a similar expression for ht you will get a similar expression for ht you can verify that you will get a similar expression for ht do not take my word for it check it right like I indicated you will get a similar expression for ht so we know the you know the you and you know two quantities we need a third quantity it is usual to take it is usual to take rho tilde it is usual to take rho tilde as the square root as the geometric mean looking at all of this stuff looking at the expressions that we have got is usual to take rho tilde as rho r the geometric mean square root of rho r rho l okay fine right so now we have now we have we are able to find this is named after named after the scientist who derived this after p l rho so this is called rho's average is that fine okay are there any questions as I said I deliberately I wanted to go through that some of these derivations I want you to see it so it is not that all of us it is not that we open a book and so on so has done this I am just going to take it and use it and so on I am very serious just a simple sign error you can struggle you know you go through all of this and then find that there is a typographical error somewhere it is not worth wasting that kind of time you should always it is worth the investment of a day or two or whatever and checking out the derivation yourself okay it is not worth it is not worth wasting time on some printed or downloaded material which may have a typographical error it could be a simple or it could be that someone actually made a derivation so how are you going to find it so you have to actually sit down and derive and make sure that you are able to come up with it okay please please do not get into the habit of just opening the book and ripping the formula out of the book is that fine okay in the next class I will see if I can set up a demo for you in the next class and then I am going to try to do we have time right at least one or two more things with respect to the Euler's equation okay and then we will go on looking at schemes as to how to make things run faster converge faster fine okay so we are sort of coming towards the end of the semester I want to give you an idea as to where we are going and then we will do a little what I called what I call three lemmas in the theorem I will do a little calculus of variations for you and show you a different way of looking at all of these all of these problems that you are working on is that fine okay thank you