 So, the tutorial I have in mind today is to reinforce what we learnt in the first lecture of this capsule about the incompressible flow and visualization. There is a very interesting app that one of my interns has created which I want to share with you today. Let us first see what is the problem statement and pay attention because many of these concepts might be useful for you in the quiz. So, our question is if you remember in the discussion we had concluded that the flow is incompressible, if you capture a small volume and look at it over a period of time in the flow, the volume of that element of a given mass delta m remains the same. If that remains the same then the flow is considered to be incompressible, the shape might change but as long as the volume of an element remains constant then only the flow is incompressible. So, this particular property we would like to now experiment, do a numerical experiment and verify. So, the objective is to strengthen the Lagrangian understanding of the flow in which we trace a particle in time ok. And also the condition del dot v bar equal to 0, this condition seems to be a simple mathematical condition but we are now going to look at its geometrical significance through this example ok. And hence we will have a better understanding of the equation of path lines. We have talked about stream lines, streak lines, path lines, time lines. Time lines was explained by someone on the Moodle page, I am very thankful for that definition. So, let us see the first step. The first step is now this will involve some numerical calculations. I hope all of you have your calculators. So, keep your calculators ready, you will need to do small calculations. So, this is just some theoretical flow field defined by velocity equal to something i plus something j. So, is it 1d, 2d or 3d? It is 2 dimensional because there is no z term ok. So, let us see what are your observations based on this particular statement. So, when the value of velocity is a function of x, now t is the time here, is this flow uniform or non-uniform? You do not have to answer right now. Think about it, there are three questions, you will have to answer all the three questions. So, is it uniform or non-uniform? Is it steady or unsteady? Is it compressible or incompressible? Now, the third question we have to answer by some calculations. So, you may not be able to answer immediately. If you can, great that means we have a new Bernoulli amongst us or a new Euler or a new Newton, but for me I need some calculations to really confirm. So, now let us look at the first two questions. Is this flow uniform or non-uniform? I want someone to volunteer, but I need a reasoning also. Do not toss the coin and give me the answer, give me the reasoning. So, who is going to help me with this question? Is it uniform or non-uniform? No guesses? Yes. My name is the Jinder. Right. So, is the flow is non-uniform because the flow is varying with X and Y coordinates? That is right because the flow is depending on X and Y and X and Y are the spatial variations. So, you are right because there is a presence of X and Y or because V depends on location, therefore, it is non-uniform. Is it steady or unsteady? Yes. Mike, there please. Myself Venkat Sai. Venkat Sai. Yes. So, the flow is unsteady because the variation of flow properties with respect to time should be equal to 0. So, dou u by dou t is not equal to 0, but dou u by dou t is not equal to 0. Right. So, that is right. That is right. But basically, this point is very much valid because there is a presence of a time dependency because there is a t there and it is not partial, everybody is not 0. Therefore, this flow also is unsteady. Compressable or un-compressable, can you say yes? Hello, sir. My name is Sritu. It is incompressible flow because when we take divergence of the velocity. Right. So, it gives 0. So, for. How do you take divergence of velocity? You take a partial derivative of the first term with respect to X. X and the second term. Which is 0.5 and the partial of the next term with Y which is minus 0.5. Minus 0.5 then it gives 0. Right. So, that is good. When you take the partial, so dou u by dou v by dou u plus dou v by dou x is coming it to be 0.5 minus 0.5 equal to 0 then hence this flow is actually incompressible. That is right. So, it is non-uniform unsteady incompressible flow. Yes. My name is Srinath. Yes Srinath. We get divergence of velocity is equal to 0 only if we consider that density is constant from continuity equation. That is true. That is true. So, yes. All our arguments are applicable only in the case when the density is not changing with time or place. Yes. So, that we do not know. There is no density term here. So, looking at the velocity field at least the velocity field tells us that it is incompressible, but what you say is right incompressible flow and incompressible fluid that is the difference. Yes, but if density is a function of time then we cannot apply. I completely agree with you. So, I am saying make the assumption right now. You are right. I agree. Make the assumption that density is invariant with time and x y in this case. So, if that is the case. So, I just want you to visualize. So, these arrows represent the local flow field vector which will change as a function of time because there is a time term there and the blue lines as you will see very shortly these are the particle trajectory. So, in this particular video the equation in the previous slide has been plotted as a function of time for y and x using the value of omega as 2 pi and you can see that the local field vector is changing its angle as a function of time and the trajectory of the particles is also following some particular direction. Let us look at the next step. So, what we do is we look at this particular flow field and we mark an element at time t equal to 0. Just some element a b c and you can note down these values a is x 0 y 0 equal to 0. We take a snapshot I will show you a video of this, but we take a snapshot and we see that there is an theoretical element a triangular element with three vertices a b and c whose values are mentioned there. So, note down these three this is the position of the fluid particles at time t equal to 0. Let us go ahead so this is the velocity equation so there is a path which the particle takes and the velocity is going to be a function of x and y which are functions of time. So, this is u and that is v so the u is going to be basically dx by dt or the velocity component so it is 0.7 plus 0.5x so that is actually x and the other one is y. So, we have these two components now now let us go ahead we have a differential equation now dx by dt is equal to minus 0.5x equal to 0.7. How do you solve this equation so can you try it out using your basic maths would you be able to find the solution of this particular differential equation the first one which says that x as a function of t is equal to 0.7 plus 0.5x. So, one way of doing it is multiplying both sides by this integral we are now doing it by analytical technique you can do it by numerical differentiation, but we will do it by an analytical technique in the class so we multiply both sides by a term e power integral of 0.5 dt with minus sign so you will get e power minus 0.5t into dx by dt minus 0.5x is equal to 0.7 e power minus 0.5t. Then looking at the expression you get two terms you get minus 0.5x e power minus 0.5t then dx by dt into e power minus 0.5t so this can be shown as a time derivative of x into e power minus 0.5t equal to the same thing as the RHS. You can see d by dx of a function a into b is x dv by dt plus y dx by dt so that is the property we have used here the property of it is called as I think the chain rule of differentiation. So, now if you integrate both sides then the first term on the left hand side is going to be integrated as a function of time is equal to this plus a function of time and then there is going to be a constant of integration C1. If you solve it further you can show that x as a function of t is equal to some constant C1 into e power 0.5t minus 1.4. The 1.4 comes from 0.7 divide by 2 or 0.7 into 0.5 0.7 divide by 0.5 so x as a function of t is available. So, this tells us how x is going to evolve as the time progresses. Okay, going ahead the next equation now this one I would like you to solve yourself in a similar fashion. For your convenience I am just writing the expression for you the starting expression divide by dt plus 0.5 y is equal to 2 plus 2.4 cos omega t omega is a frequency term. So, now let us see if you can solve this equation in a similar fashion. Let me give you a quick hint. Again the same thing multiply both sides by the similar expression same expression rather. So, what will happen? So, from here you can proceed. Okay, let me give you one more step. So, the same thing is going to be divide dt of y e power minus 0.5t and now you integrate both sides. So, the first term 2 is a constant term. The second term has an omega term and now you have a constant integration called C2. Our job now is to get the value of y as a function of time for the including the value of the constant C2. Okay, right. This is where we were. Now I think if you can apply your basic engineering mathematics you should be able to proceed further. It is not easy there is one particular property of integral which you have to remember which I also did not remember. So, maybe it is unfair for me. So, this is the integral formula. Okay, e power 80 cos omega t dt is e power 80 upon a square plus omega square etc etc etc. So, at least now you can go ahead using this property you should be able to go further. So, the first person who is able to get the final answer should raise the hand. Anybody has made a breakthrough after this? Got the answer? What is the answer? y, y is equal to 4 plus 4 plus 2.4 by 0.25 plus omega square into 0.5 cos omega t plus omega c. I think that is correct. I remember. I remember. Just cross check this entire. Is it correct? Okay, so 4 plus 4.8, 1 plus 4 omega square. So, now y is a function of omega t and the constant c2. So, we have got both x and y as a function of time. Okay, so now we are ready to plot this particular thing. Now these two constants C1 and C2 they are not just constants of integration that is for the mathematician. For the fluid mechanics guy these two coefficients they are particle identifiers. By changing their values you can actually track different particles that is their significance. So, we saw that x is a function of t and C1, y is a function of t and C2 in the two expressions that we have derived. So, what we can do is we can track we can set x, y and x t and y t just by playing with these two coefficients as I will show you in the particular utility you can track different particles. So, that is a beauty. That is a beauty. Each particle in the fluid flow corresponds to a particular C1 and C2 value and the integration is applicable for that particle. In fact, the integration is for all the particles. Now you can find these constants by using the initial conditions. The initial conditions was that at t equal to 0 we had a and b and c having some x 0 and y 0 values. So, let us look at we want to track a particle which is at some point x 0, y 0. So, at time t equal to 0 you can get the value of C1 by putting x equal to x 0 when t is equal to 0 and y is equal to y 0 when t is equal to 0. So, let us do that. So, now what we will do is we will divide this class into three teams. This is a very big team. This will be called as team number 1. This is a very small team. So, team number 2 the one in the center and this will be team number 3. We have three particles a, b and c. So, particle a I will give it to this team because both of them are 0. So, particle a you have to track. So, you get me the value of C1 and C2 for particle a. You will be doing particle b and yours is particle c. So, individually do not say someone will do it there is a big team just like assignment somebody will do there are 10 people 9 people, but this is for individual. So, individually otherwise you will not learn and remember there is a quiz just down the line. It will help you believe me. So, these are the two expressions which you can note down if you have not done so far. Take the value of omega as 2 pi and substitute x equal to x 0 and t is equal to 0 in x t and y equal to y 0 and t equal to 0 and y t and trace the values of these three. So, I rest my case now. Now, you have to tell me the value of C1 and C2 for a, b and c. So, team number 1 your job is very easy both x 0 and y 0 are 0. So, you just say x t equal to C1 e power minus 0.5 t minus 1.4. So, when t is equal to 0 you have e power 0 which is 1. Therefore, straight away C1 is 1.4 C2 again when t is equal to 0 cos omega t is 1 cos 0 is 1 and sin omega t will be again sin 0 is 0 and t is 0. So, C2. So, it will become 4 plus 4.8 upon 1 plus 4 omega square into 1 plus C2 is equal to 0. So, what is the value of C2? Team number 1 is very powerful because they have people who can freeze time. So, if you can freeze time then that means you are really great. Let us have team 1 first. Team 2 what is the value of C2 and C1? C1 is 1.6 and C2 1.969. What about team number 2? What is the value at b? Hello C1 is 1.9 and C2 is 1.8814. Yeah that is what I got you can cross check. Now if there is a mistake please tell me. Yeah we should be plus 0.97. Let us see. Let us just cross check. So, this is team this is the team C. No this is team b. So, y at 0 will be 4 plus 4.8, 1 plus 4 omega square. So, C2 will be equal to minus. Why will it be plus? Do not we have 4? See do not we have y is equal to a plus b. So, it will be a negative term. A is 4.03 when you say a means the first term. Yeah 0.7. So, we can correct it. When I upload this I am going to correct it. All of you agree with this? There can be such mistakes. So, now the interesting thing is you have to not track the position of the particle at various times. So, once again team number 1 you will get the time of 1 second easy. Team number 2 gets the time as 3 seconds and team number 3 gets the time as 6 seconds. This is not the time given to you to calculate. This is the time the time from t equal to 0 at which you have to now locate your particle. So, you have to locate the marker now and I am going to show you the answer graphically through an app. So, there you can cross check. So, this time you have to give me the location of the all the three markers a, b and c at these time steps. So, how we will do for example is you have the expression now you have C1 and C2 and you have the expression. So, if for example for particle a C1 is 1.4 C2 is minus 4.03 you just put x t is equal to 1.4 e power 0.5 t minus 1.4 and you put the same for y. So, when you are ready when you know the location do not tell me the location you verify when I show you the video whether your calculations are matching or not. Shall we go ahead? Yes, team number 1 can we go ahead? You know the position of particles at time t equal to 1 second? Yes, no or maybe or I do not care because you are going to show very soon. Oh, the way they are punching on the calculator is like going to the moon. See, we have a quiz ahead of us. So, we do not want to spend too much time. Let us see is this correct team number 1? So, no need to copy it down because we are going to see the video very soon. Okay, team number 2, okay all of them are correct? Very good that means you are able to track and team number 3 yours is a very, very yes, correct? Okay. So, our objective is to check whether this particular flow is compressible or incompressible. For that we have to be sure that at all these time steps that same element which we are tracking has the same volume. So, do you think the volume of this triangle and this triangle and this triangle and the initial triangle is of course just a conceptual sketch or is it the same volume? We do not know visually it will be difficult for us to make out. It does not look like. I do not think so that means we need to check. So, how do you calculate the area of a triangle whose coordinates are known to you? s into s minus a into s minus c. There are other ways also of doing it. You can simply do it by a very basic determinant calculation. So, one way is you calculate s a b c and then multiply the same thing has been coded into this particular determinant. So, please do it for all three of you. Find the area of the element at the three places. So, once again at time t equal to 1, at time t equal to 3 and at time t equal to 6. So, as you got the area please calculate. You have the value of x a, x b, x c you do not have. So, can you calculate the area quickly? So, it will be x a minus x b into y a minus y c minus x a minus x a into y a minus y b. So, you have to calculate that and divide by 2. If anybody from the team has done it just raise your hand. So, do we have the answer? How many units is the area? Some of you have given up. It is too difficult calculation to do. I cannot do it. Nothing I have learned so far in my life has equipped me to calculate this. Yes, for the you want the coordinates ok. You can note down. If I give the components now then you will calculate then we will miss the quiz ok. So, do I do not want to spend any more time sorry. Let us go ahead ok. Alright. So, let us see a demo. The demo will tell us ok. So, for this particular fluid particle this is the condition at time t equal to 0. Point a on the bottom was 0 0. Point b was how much? What was it? It was just point c ok. Point b 0.25 and 0.2 comma. So, is it ok? And the third team. So, now let us run the simulation at time t equal to 1. What is the area? Team number 1. This is the question asked to you. You got the same area. Did not calculate? How much did you get? So, that is correct 0.65 approximately fine. So, if we continue ahead at time it 3 seconds what did you get? Are the are the particle coefficients correct? Ok. So, you have to believe me now since you are not calculated you have to you can do it offline later. The value the volume is the current area is 0.64. Area is volume here because it is 2D flow. It is 0.6499. So, it is almost the same as what they got ok. So, let us see at the next time step which is 6 seconds. So, it will take time. The particle becomes very narrow and thin. It is again 0.65 ok. So, now what do we conclude? Yes. My name is Ajit. The shape is varying, but the volume is constant or the area is constant. So, what do you conclude? That means the mass flow rate is constant throughout. No, that is not the conclusion. Incompressible flow. It is an incompressible flow. The flow is incompressible that is right because the area of a or a volume in this case. In this case area because it is 2D, the area of a fluid element as we track it is remaining the same. Therefore, the flow is deforming, but the total volume is remaining same. That means actually it is incompressible flow. Ok. So, in case you are wondering whether this is just one simulation I can try. So, let us go to initialization. So, let us track some other particle. Just because these particles are we cannot be sure. So, let us say particle at t equal to 0 x coordinate. So, let me have some volunteer. Ok. Yes. Let us check. We have a app. Let us check. Your job is easy. In normal times I would say calculate. Ok. But I know people are lazy nowadays. So, we have an app we will check. With this particular app I can track any particle for this fluid flow at whatever time you want. Ok. So, let us do it. So, let us start. So, take a particle. So, let us start with you only. So, give me some starting some give me some x y coordinates of a particle that we want to track at time t equal to 0. So, you want to do for the same particle. Ok. So, let us do for the same particle. And what we will do is let me take a snapshot at 4 seconds, 9 seconds and 12 seconds. Ok. Does not seem to have worked. So, I think I need to just do first initialization. Ok. It is expecting me to end it. I reset everything. Settings. Let us see if it works. At 4 seconds it gives 0.65. Ok. So, there is a time limit set in the code. So, we have to check for times only between 0 to 8.5. Ok. So, let us reset it again. So, let us say at 2 seconds, 4 seconds, 7 seconds. So, at 2 seconds 0.64996565. So, are you saying that the area is constantly increasing? No, these are numerical truncation errors. See, this is not, this is not the absolute. This is the calculation. So, when you calculate if you say 0.64995 and 0.65, the degree of precision in this code is not so high that it will capture to the third decimal place. Actually, it should have written only the two digits. That would have been better. By writing with these many digits, it is giving a wrong impression. Ok. So, for all practical purposes, the volume is remaining the same. Ok. So, let us start some other point. Ok. So, let us say I will just give some points. So, particle x coordinate let us say 2, y coordinates again 4, then x coordinate of particle at t equal to 0. So, I have given some other particle now and let us take the same time steps. Let us run. So, the flow field is remaining the same. The flow field has not changed. These equations have been coded in excel for a particular flow field. Ok. So, at time, it is 0.5. At time 4 it is again 0.5. It is again 0.5. So, I think we should look only at two decimal places. Ok. So, let us look at the path lines also. So, now what I have done is I have removed those lines and I am just showing the particle transforming in space. So, this particular utility, I can share it with you. You can have a look at it. What would be interesting is to see what is the coding behind it. So, for example, if I just go to the spreadsheet, you can see you have the constant x and y have been pre-calculated and entered here. This is the initial position. Yes. Right. So, this is the spreadsheet. So, you can see the initial position gets written here. This is the value of omega 2 pi. So, we can change things and see the effect of that. For instance, suppose I make this as 0.2 pi. Now, you can see the flow stream has changed. Ok. It has gone beyond. But even in this case, the volume is remaining the same. Let us say I make omega as 3.25. You can see the element volume still remains same. Ok. So, whatever be the value of omega, that is not changing the nature of the flow. It is just, yes. Yeah, that is what we discussed in the class. In the incompressible flow, I showed you in the class, you take a fluid element. Do not worry about laminar or turbulent flow right now. This is a flow field defined by x, y, z and t and omega in this case. So, in this particular flow field, if the flow is incompressible, see, remember there is a difference between an incompressible fluid and incompressible flow. We are talking about incompressible flow field. So, in any incompressible flow field, the total differential, the total derivative d of rho with time remains constant. So, what will happen is there will be one partial derivative and there will be one local derivative and there will be one conductive derivative, correct. So, if the, for a given mass of fluid, it has some volume at some place. If the volume changes but mass remains same, density is then it is not incompressible, the fluid. That is what we are trying to show. We are trying to show here that this particular fluid has got some mass. Over a function of time, if its volume also remains same, although it transforms in shape, then and only then the flow is incompressible. So, it is a property of incompressible flow that any fluid particle, whether it is triangular, whether it is rhombus, whether it is any shape, if it is 3D, you can take any 3D arbitrary shape as a function of time. If the total volume of that particular particle as you trace it in the flow field remains same, then the flow is incompressible. If the volume of the particle is changing with time, then density is changing and hence it is incompressible. Varunesh. Varunesh. The manner in which the entire volume or the area is calculated that might matter or not means it might happen that some part of it is gone outside the, but it is not being considered when we are calculating area in this manner. Varunesh. No, no, no. I am tracking the same particle. I am defining an element of fluid and I will not say only for this element, I give you an option of choosing your element. Varunesh. Yeah. Varunesh. So, any element you choose, it becomes a control volume. That control volume may deform, but does not change in area in a 2D case. Varunesh. So, if we take 3 particles which lie on a straight line. Varunesh. Right. Varunesh. Then there area will be 0. Varunesh. It will remain 0. Varunesh. So, throughout the simulation it changes. Varunesh. Let us check. Varunesh. Varunesh. That is what I am saying. See, I am going to give the utility to you. You try it out. So, I am going to upload this on the Moodle. I am going to ask you to play with it and give such kind of observations. Track. Take 3 particles which are very, very near each other. See if it remains the same. Track 3 particles on a horizontal line, inclined line, vertical line. Check out.