 In the last class we started looking at one-dimensional flow, I think we have derived the equations right. So the equation that we got, this is one-dimensional, we are just right one-dimensional Euler's equation, dou q, dou t, dou e, dou x equals 0. If you want that in index notation, just for, so that would be dou qi, dou t plus dou ei, dou x equals 0. We saw that q had components rho, rho u, rho e t, e had components rho u squared, rho u squared plus p rho e t plus p times u, rho u, rho u squared plus p. Thank you. Is that fine? What we have got? We basically said we do not like the fact that this equation looks a little different from the wave equation that we were looking at. So we wrote it in terms of the flux Jacobian. So this is a conservative form, we wrote the non-conservative form, which is dou q, dou t plus a dou q, dou x equals 0. You will see it is one of the many possible non-conservative forms. It is not the typical non-conservative form because the q is still in the so-called conservative variables. Is that fine? q is still in so-called conservative variables. The equivalent of that in component notation, so what is A? A is dou e, dou q. The equivalent of that in component notation would be dou qi, dou t plus aij, dou qj, dou x equals 0. Is that fine? There is of course I mean it is a matrix equation, so there is a summation over j. Is that fine? Aij clearly is dou ei, dou qj. That is basically aij. I am just writing it in this component form because we need to find out is it possible for us to evaluate to find what is A. So implicit in this definition of the flux Jacobian is sort of an assertion that e is a function of q, that I can write e as a function of q. So I should be able to write this e as a function of q. So e1 is obvious, e1 is obvious. We look at e2 and e3, but before I start writing e as a function of q, I want to give you motivation as to why you should always make sure that you write this properly in terms of q1, q2, q3 and so on. So this is like a gradient. Is it derivative? It has derivatives of the first component with the first component, first component, second component and so on. So what is dou rho u, dou rho? That is why you have to be careful. That is why you have to be very careful how you write this out. I do not want you to hesitate to answer because I set you up but you should also you take. So dou rho u, dou rho, the reason why that question is not properly posed, that is I am differentiating with respect to these, dou rho u, dou rho, these two kept constant. So rho u is a constant. So dou rho u, dou rho is 0. You see what I am saying? So you have to be very careful. If you try to do it directly here, you will make mistakes. I also make mistakes. I want to protect myself from myself. So I am very careful. So I will write e1 as what is e1? Let me write. So q1 therefore is rho, q2 is rho u, q3 is rho et. What I am suggesting to you is always write it in terms of q1, q2, q3. That way you will not make mistakes. e1 is q2. e2 is q2 squared by q1 plus a p we have to figure out. So we have to figure out this p. We will have to pay attention to that p. And e3 is q3 plus p times q2 by q1. You understand? So the only issue is how do we find p? For that we will have to go back to the original definition of e total. Because that is the relationship that we had. What did we have? We had e total is e plus 1 half u squared or rho e total whichever state. And e was, this is C vt which equals 3 equation of state or rt by gamma minus 1. I have substituted for C v which equals p by rho times gamma minus 1. Is that fine? So you go back here, e total or rho e total is p by gamma minus 1 plus 1 half rho u squared. This tells me that p is rho e total minus 1 half rho u squared times gamma minus 1. Fine? Okay. Which tells me this is q3 minus 1 half q2 squared by q1 into gamma minus 1. Am I making sense? So we have actually written, we have written now we managed to write e as a function of q. And it is actually possible for you to find dou e dou q. So the first term for example therefore dou e1 dou q1 is 0. Dou e2, I will do the easy ones. I will leave the others for you. Dou e2, I will write it out but I would suggest that you verify. You check that I have not made any mistakes. Dou e2 by dou q1 is that what I want to do? That is not what I want to do. As I said I am going to do the easy ones. Dou e1 by dou q2 equals 1. Dou e1 by dou q3. I am keeping the rho a constant. I am keeping the rho a constant and I am changing the column. Okay. Yeah. Dou e1 dou q3 is 0. Fine? You can do the same thing now. So you say dou e2 dou q2. This is that there is no sense me doing it. I have a little cheat sheet again. So I am going to take my sheet out. I am going to write it out. So that I do not want to make mistakes here. So I will start with the bottom row because that is the largest. That is the bottom row first element. That is the second element. That is the last element of the bottom row. Then I have 1 half gamma-3 times u-3-gamma. So I wrote the bottom row first and gamma-1. And the first entry of course is 0 1 0. That is the matrix A. Is that fine? Everyone? You should check. You should make sure that you are able to do at least a few of these. You should check. And I assure you that if you do not write it in terms of q1, q2, q3 you will make mistakes. You will make mistakes. I have made mistakes every time I try. It is a little difficult to keep track of what is happening. So we are back to the original question that though I have managed to write the equation as dou q dou t plus A dou q dou x equals 0, A is a very first row is okay but it is a pretty complicated expression. And the system of equations is still coupled. So though it resembles our linear wave equation, it is nothing like our linear wave equation okay. In fact I would think that if you have done linear wave equation I would get 3D coupled wave equation. Something of that sort. That is what I want. So maybe it was just a poor choice of variables. We wrote the conservation equations and as a consequence of our densities of the quantities that were conserved. As a consequence of our densities we picked q which is rho, rho u, rho et. It was a choice forced upon us in a sense by the physics of the problem. Maybe if you choose a different set of variables we will get an equation that is more amenable to solution. After all I am writing it in a non-conservative form. And if you think back then standard non-conservative variables form either you use rho u in temperature or you use rho u in pressure or something of that sort. You are interested in pressure. You are not really interested very often in rho et. You would like to know the pressure distribution. See I am trying to motivate why I want to do a change of variable. So you are interested in the density. You may be interested in the speed. You may not be really interested in the momentum density at a point. You may be interested in the speed of flow at a point. So it is possible that we should therefore choose a q tilde which is rho up instead of rho rho u, rho et. So I will try to derive this now from our yawning equations. I will try to derive the equations in terms of this which means that I am going to do a little arduous but not too arduous calculus. Expand out the terms so that I can get equations, isolate the equations that are the derivatives, isolate the terms in the equation so that the derivatives are in terms of rho u and t. Is that okay? Fine. So just bear with me. We will try to go through this quickly. So conservation of mass, first equation here, dou rho dou t it is not bad start plus dou by dou x of rho u equals 0. So I can write that as dou rho dou t plus rho dou u dou x plus u dou rho dou x equals 0. Is that fine? Okay. So we have one equation. We need to get the other two equations. For this I will go back maybe to the front board. So we will retain this part to write all the equations. We will go back to the beginning. What is the momentum equation? dou rho u dou t plus dou by dou x of rho u squared plus p equals 0. Expand that out. Rho dou u dou t plus u dou rho dou t plus u dou rho u dou x plus rho u dou u dou x. You know why I did it that way? I did it that way because I see I have a u dou rho dou t here and in my mind I am already thinking u dou rho u dou x for conservation of mass. In anticipation of that I have split it in that fashion plus dou p dou x equals 0. Is that fine? And indeed these two terms do correspond to u times conservation of mass. u times conservation of mass. So that term will be 0. So this gives me rho dou u dou t rho u dou u dou x dou p dou x. So they are only terms that have only the parameters that we want. There is a dou u dou t, there is a dou u dou x and a dou p dou x. So I am going to take this over. I will divide through by rho. Divide through by rho. When I transfer it you make sure I do not make any mistakes. So I have a dou u dou t plus u dou u dou x plus 1 by rho dou p dou x equals 0. Is that fine? Thank you. So let us get back to the energy equation now. Maybe I will erase this. Let us get back to the energy equation now. So I have dou rho e t dou t plus dou by dou x of rho e t plus t times u equals 0. So this becomes rho dou e t dou t plus e t times dou rho dou t. Now we suspect we can play the same game. We play the same game because there is a rho u in here. So that becomes plus e t times dou rho u dou x plus rho u times dou e t dou x plus dou by dou x of you want dou p dou x times u plus p times dou u dou x. Let us say expression it is equal to 0. And again we have a simplification due to conservation of mass. This is e t times conservation of mass. Left hand side conservation of mass and therefore it equals 0. Is there anything else we can do? It looks like we have no choice. We have to expand that e t. We have to expand that e t. What was e t? I had that somewhere here. What was e t? So there is a 1 over rho but e t is here. So rho dou by dou t of e t was p by rho times gamma minus 1 plus 1 half u squared plus rho u dou by dou x of p by rho times gamma minus 1 plus u squared by 2 plus udp dx plus pdu dx equals 0. We will try before we see that the p looks a little complicated expression. We will get to that. We will try to get rid of the because we have done conservation of mass. Let us see if momentum equation helps us out here. I have a u dou u dou t from here. And I will get a rho u dou u dou x from here. Does that make sense? So there will be a rho u dou u dou t from there and a rho u dou u dou x from here. We will see from the momentum equation whether something can be knocked out. So there is a hope. We will follow that path. So I will leave the first term untouched for now. So I get dou by dou t of p rho gamma minus 1. It is the first term. The second term is rho u dou u dou t. Then this term gives me a plus rho u dou by dou x p by rho times gamma minus 1 plus rho u rho u squared dou u dou x plus I can add that in your plus udp dx plus p dou u dou x. And this sum of all of these equals 0. Is that fine? Can we look at momentum equation and see what we have? I have a dou u dou t plus a dou u dou x. So rho u dou u dou t rho u square dou u dou x. And that is I can substitute by minus 1 over rho dou p dou x. So these two terms I can replace by minus 1 over rho dou p dou x. Pardon me? Into rho u into rho u minus u dou p dou x. Oh, there is a u dou p dou x here. It will go away. So that also goes away. Fine. Get rid of this stuff. What do we have? What are the terms that we are left with? We will just collect them before we simplify it further. Rho dou by dou t of p by rho gamma minus 1 plus rho u dou by dou x p by rho gamma minus 1 plus p dou u dou x equals 0. Make sure I have not made any silly mistakes. That looks fine. So we expand it out. It does not look like we can do anything. We will have to face it. So this is rho. If I take dou p dou t, so this comes out. So I get 1 over gamma minus 1 dou p dou t because the rows will cancel. Minus, if I differentiate this, I get a 1 over rho squared but the rho will, right, 1 rho will cancel. So I get a p by rho gamma minus 1 dou rho dou t. Is that fine? The derivative of 1 over rho, the derivative of 1 over rho is minus 1 over rho squared dou rho dou t. But one of the rows will cancel the one in the numerator. Okay. Fine. Fortunately, these are the same. So you just replace the t's with the x's. So it is not too bad. It is not as bad as, so this gives me u by gamma minus 1. Is that right? u by gamma minus 1 dou p dou x plus minus, thank you, minus p u rho gamma minus 1 dou u dou x dou rho dou x plus p dou u dou x equals to 0. I have a dou rho dou t here. So if I take out, maybe I should have left this as, so there is a rho u somewhere here, right. Let us come back to conservation of mass. U dou rho dou x, u dou rho dou x dou rho dou t, dou rho dou t, u dou rho dou x. Is that fine? dou rho dou t, u dou rho dou x. So I see a dou rho dou t and I see a u dou rho dou x. And they are both multiplied by p divided by rho times gamma minus 1. So these terms can be combined. They have a minus sign. They both have a minus sign in front, which means I am taking them over to this side. Let me leave me a rho dou u dou x, plus rho dou u dou x. So these terms can be replaced by from conservation of mass, rho dou u dou x. Okay. I will multiply through by gamma minus 1. So I get a dou p dou t plus rho times gamma minus 1 dou u dou x plus, oops, yes. What do you get here? You get a p by gamma minus 1. Is that right? Okay. p by gamma minus 1. So if I multiply p times dou u dou x, but I have another p times dou u dou x here. Gamma minus 1. Let me not jump this. I am skipping a step. I will make a mistake. 1 by gamma minus 1 dou p dou t, okay. Plus p by gamma minus 1 dou u dou x plus u by gamma minus 1 dou p dou x plus p dou u dou x equals 0. So if I add this to that, I will get a gamma divided by gamma minus 1, okay. So I will multiply through by gamma minus 1. Now I will skip this step, right. I get dou p dou t plus gamma p dou u dou x plus u dou p dou x equals 0. Is that fine, everyone? Well, we will find out. If I made a mistake, we are going to find out. Dou p dou t plus gamma p dou u dou x dou gamma p dou u dou x plus u dou p dou x equals 0. How is that? So if this is q tilde, I have rho up. I can write this as a matrix rho up. And I have dou u dou x. See I have rho up, right. I have a dou rho dou x. I can actually rearrange these terms. I can rearrange these terms and write it in a matrix form. So let us see what we have here as a matrix form. What do we have? So q tilde is rho up. So the first term obviously is dou by dou t of rho up plus, can you tell me what the rest of it is? Is there a dou rho dou x here? u dou rho dou x plus a rho dou u dou x. There is no dou p dou x term there plus a 0 dou p dou x. I am writing a matrix now. The second one, is there a dou rho dou x? 0 dou rho dou x, u dou u dou x, 1 by rho dou p dou x. The last one, there is no dou rho dou x, 0 dou rho dou x, gamma p dou u dou x plus u dou p dou x into dou by dou x of rho up equals 0, fine. So I am now able to write this as dou q tilde dou t plus I will identify this matrix as a tilde. I will identify it on the top as a tilde. A different non-conservative form, right. In this case the variables are not the variables we got in the conservation equations as densities. So these are we will call, you can call them non-conservative variables if you want, right as opposed to those variables which are conservative variables. So you have another different conservative form, right. Expressions are easier, simpler. So clearly we are sort of going in the right direction but this is a pain. Even if I have to sit down now, right the next one, the next one I can try is instead of rho up try out rho ut. How do I know, you see if you are going to do this trying to hit the thing blindly, how do I know I am going to get there, right. How many variables can I try? And I may not even chance upon it by, you know I may not even chance upon it. I may not just, we tried once, we did not luck out, we tried rho up and we still got the system of equations that is coupled, right. So we have to obviously get a more systematic way by which we do this. So the question that we ask ourselves is how did I go from q to q tilde, can I, is it possible for me to transform from q to q tilde? Is it possible for me to transform from q to q tilde? Am I making sense? If I have the equation and if I do that, if I figure out how that happens, how these two equations are related, if it is possible for me to do something to this, then I am set, okay. So what is the relationship between these two? So I have two sets of variables. I can get a, I can write these in terms of q1, q2, q3. I can write q tilde 1, q tilde 2, q tilde 3 in terms of q1, q2, q3. Therefore, I can write dq tilde is or dq whichever way. Yes, I do not know which way, which way do you want to do, which way do you want to do it. So if I want to transform from here to there, I possibly want it in terms of q tilde. dq tilde is some p times dq. This is like classic definition of a derivative, right. It is a linear transformation. There is a direction. Remember what I said earlier, right. This is a vector, right. This is a linear transformation. So we do not know that it is a derivative. I am writing it out as a derivative, right. We do not know that it is an exact differential, okay. But I can write out this relationship. What is p? That is an index notation. This could say dq tilde i is pij dq, dqj. You understand? The matrix component, component wise that is how it would be written. dq tilde. Component wise that is what you would write, right. Or we are basically saying that pij is dq dou q or dou q tilde i by dou q tilde dou qj. Yeah, if I have this, so there are different ways to look at this. One way to look at it as I said is you are looking at a derivative. Another way to look at it is that this p transforms dq tilde coordinates. The dq variables get transformed to the dq tilde coordinate, okay. That is another way to look at it. If we pre-multiply this equation by p, if I pre-multiply this equation by p, we will do it here. So if I pre-multiply this equation by p, it should transform, right. It should transform from the q coordinates to the q tilde coordinates. Is that fine? Okay. Another way to look at it is that I am basically just using chain rule. Different ways by which you can look at this. If you look at what this is, right. This is dq tilde. If you look at this equation, I want to make sure that there is no confusion here, dqj, right. And what is the equation itself? Because I have already used i, I use k. So you can do dou qj dou t plus a i a jk dou qk dou x equals 0. You can look at it as we are just using chain rule. Am I making sense? Different ways by which you can look at this. So what will this give me? Dou q tilde dou t plus, what do we do here? Pa p inverse p dou q tilde, oops, dou q dou x equals 0. This of course gives me dou q tilde dou x. So this should be dou q tilde dou t plus a dou a tilde dou q tilde dou x equals 0. a tilde is pa p inverse. Is that fine? Everyone, okay. Now if you have not seen this before, I suggest that you just go take a quick look at matrix algebra. This is a similarity transformation, right. And what does this similarity transformation give us? What does it tell us? What is the point of similarity transformations? The eigenvalues are the same. The eigenvalues are the same and if you are lucky, in this case we are lucky, right. In this case we are lucky. We have distinct eigenvalues. They are real. I mean there is a lot of nice properties. So we can actually find some matrix, we can actually find some matrix, some transformation which will diagonalize the matrix A. What I am saying is yes, there is a matrix x. There is a matrix capital X, so that x a x inverse or x inverse a x depending on which way we have written it is a diagonal matrix lambda. You understand? You are basically going to, let me just, whether we call it A inverse or A is something to our, I mean x inverse or x is something to our, so your usual eigenvalue problem is A x equals lambda x. I usually prefer to write it as x lambda because otherwise when you make the, make it a vector, you can run into trouble. So if this is a 3 by 3 system, right, you have a full set of eigenvalues. So then you have 3 of these, k equals 1, k equals 2, k equals 3. So I can put those in column matrix. So I get A x, x corresponds to a column matrix, x corresponds to a column matrix equals x lambda. This is a matrix, lambda is a diagonal matrix, right. There are matrices, lambda x and x lambda are not the same. You have to be very careful. That is why I somehow do not, I prefer to say instead of A x equals lambda x, when we are talking about lambda scale or one eigenvalue, I really prefer this lambda k. I really prefer to say A x equals x lambda because when you write it as a matrix, that is how you would write it, okay. So if I were to multiply through by x inverse, right, which equals lambda. So such a transformation exists, you can actually make it, you can actually diagonalize. Is that fine? Such a transformation exists, can actually diagonalize, fine, right. Now as it turns out, we can either use A to find the eigenvalues and eigenvectors or we can use A tilde to find eigenvalues and eigenvectors. So now I will use some prior knowledge that I have that using A to find the eigenvalues and eigenvectors is okay, it is difficult. So I will use A tilde. Is that fine? Okay. As I said, I am already, I erased my A tilde. So tell me what my A tilde is. What is A tilde? U rho 0. Is it 0? U 1 by rho 0 gamma p U. What it is? Okay. So I will cheat. I will do that. Well, that is that. So we want the determinant of U – lambda rho 0 0 U – lambda 1 by rho 0 gamma p U – lambda. I want the determinant of that. That is relatively easy. That gives me, what is the characteristic equation? What is the characteristic equation? U – lambda into U – lambda square – gamma p by rho equals 0. And here a little gas dynamics. What is gamma p by rho? That is this square of the acoustic speed. So that is A square. So you get U – lambda into U – lambda square – A square equals 0. So lambda equals U is one solution. And the other two solutions are lambda equals U – A and lambda equals U plus A. Is that fine? It is bit of a strain. We have been going through a little intense derivation here. So we are almost there. Right? We are almost there. So it looks like if we find, so what I will do is right now I am not going to, you can try to find, make sure that you are able to find the eigenvectors. I want you to try to do two things. Find the corresponding eigenvectors. Do it for A tilde first and then try it out for A. What do you think? Do you think the A tilde, eigenvectors for A tilde and eigenvectors for A will be the same? Do you think they will be the same? Actually we have performed, this doing the similarity transformation is like doing a coordinate, we are doing a coordinate transformation. You are performing some kind of a rotation, doing a coordinate transformation. So it is unlikely that, it is unlikely that the eigenvectors will be the same. Try it out. I would suggest that you start with the A tilde one first because that matrix looks easy. And everything was easy with respect to it. So try out the A tilde one first. And then see if you can find the eigenvectors for A. What we know as a consequence is that I have, if I have the matrix X, so then I can say that I can find the DQ carrot, I can find the DQ carrot which is a X times DQ. So now you have to decide whether you are going to put them as columns or rows. Otherwise it has to be X inverse. So you can decide which one is going to, whether it is going to be row vectors or column vector. So DQ carrot is X times DQ. And then you can do the transformation. You can do the transformation. So of course I am not saying anything about DQ carrot right now, about Q carrot. Locally this differential, this relates in that tangent plane. That is why I said think of it as derivative. Locally in that tangent plane it relates DQ to DQ carrot. In order to find Q carrot I have to be able to integrate. I have an envelope of tangents. I have to be able to integrate. I have to find that envelope. I have a whole bunch of tangents. The issues can I find an envelope. That is what the integral is. So if you go back to your calculus and think about, so whether I can integrate this or not is a different issue to find Q hat. There may be circumstances under which I can actually find this Q carrot or Q hat. Think of it as a, you have seen this kind of a thing before. You have seen this kind of a thing before. DQ hat, this is small aside. I did not get into this. DQ hat 1 by, I will say, I write it as DQ indicating this is a gradient with respect to Q. And this is the first eigenvector x1. You have seen something like this before. The gradient of a scalar is a vector. The gradient of a scalar, the scalar field is a vector field. When can this be integrated? When can you find the Q1 hat? In the curl of the vector field is 0. It is like a velocity potential or something. It is like a potential. The Q1 hat exists if it is integrable. There is an issue of, whether that all those bunch of tangents, they have to have a certain property that they have to be able to get that envelope. So that requires that the curl of x1, so the curl of this has to be 0 in order to be able to find Q. We do not know. In this case actually it turns out, in a special case it turns out we can actually do it. So if I pre-multiply by that x or x inverse or whatever I call it, if I call it x, as I said x or x inverse is a matter of what we make it, get rid of that. This will result in an equation dou Q carat dou t plus the diagonal matrix dou Q carat dou x equals 0. Or in component form dou Q i carat dou t plus lambda i dou Q i carat dou x equals 0. And there is no sum over i. There is no summation over i. You will not get carried away too much with index notation, no sum over i. So there you have it decoupled. We have 3 as promised not linear because you have a U. There is only so much we can deliver. So the lambda 1, lambda 2, lambda 3 are U, U plus C or U plus A, U minus A. So what are the 3 propagation speeds? U, U plus A, U minus A. So you will find what are Q1 hat, Q2 hat, Q1 hat, Q2 hat, Q3 hat. You will find the Q1 hat, Q2 hat, Q3 hat corresponding to these 3 eigenvalues. Figure out what is it that is being propagated. What is being propagated? Something is being propagated at the speed U. From your gas dynamics you may already be aware. That is a contact surface. Go back, look at it. And U plus A, U minus A are very clearly acoustic speeds. So if it is stationary, there is no motion. U is 0 and there is a disturbance. It is going to propagate in 2 directions, plus A and minus A at the speed of sound. On the other hand, if there is an underlying motion in a certain direction, then whatever you have is propagating at U, the medium is propagating at U. You have a U plus A and U minus A. Is that clear? So we have actually picked up. We have actually picked up, at least we feel right now from our gas dynamics background. We have picked up the necessary physics. What we need to do is we will have to ask the question, can I apply FTCS to this? Can I apply some scheme to this and see if we cannot get a solution? Is that fine? So I will see you guys in the next class. Thank you.