 Welcome all of you to the lecture on computational fluid dynamics. In the first two days of this five day workshop, Professor Puranik has built the foundation of this course because when we proposed this course we had little concern that we are not offering, we had offered a course on thermodynamics and heat transfer and fluid mechanics is one of the prerequisites for taking up a CFD course. So we thought a lot about it and in fact we were thinking to offer a fluid mechanics course but it was not possible in a short notice. So Professor Puranik took the lead in building the foundation as far as fluid mechanics is concerned and I could see that he has built the foundation quite well and now he has made my life easy and I can go little fast in discussing the concepts of computational fluid dynamics. Now I am talking to teacher so let me share my experience of teaching CFD. I first started teaching this course after my master's I was faculty in NIT Hamidpur. So I introduced this course to BTEC students at that time they do not had any MTEC students. So in 1999 we introduced this CFD courses and elective course in the final year and there I taught for two continuous years and what I realized is that one of the common difficulty as far as this course is concerned, this course is struggling to become an undergraduate course in most of the colleges. You can see that CAD has gone into the undergraduate curriculum quite well but CFD is still struggling to get into it and another problem is many a times many of the colleges have a CFD course because they feel that there is a lot of importance and need of a CFD course on where they do not have a trained faculty and most of the time they use some software and through software they feel that they are teaching CFD. If you look into the real learning or knowledge of CFD is concerned market may have its own demand but real learning involves using the concepts of fluid dynamics and trying to come up with a methodology develop a numerical methodology for simulating heat transfer and fluid flow problem. So while teaching to the students I had experiences in I started my academic career from a private engineering college also from after my BTEC so I have an experience of teaching different types of students so that way I could judge the mathematical level of the students which most of let us say colleges in our country have. So when I started teaching in here I taught CFD course for the four years I found that even the most of the students who take this course this is an elective course are the MTECH students and they also don't have a good mathematical background. So I came up with a new method in CFD which we call as the physics based finite volume method. So what I mean is that I can take an example what Professor Puranic had mentioned earlier he had mentioned that you can derive the governing equations in fluid mechanics in two different ways. One way is that he took an integral equation and he used the Leibniz rule and the Gauss divergence theorem and showed how to derive the governing equation and at the same time you may be knowing that there is a second method also to derive the equation where what you do typically that you do in the simplest form in maybe in the first class of heat transfer you take a control volume and you write left side qx, qx plus dx, qy, qy plus d by. So from that also you finally derive let us say del square t by del x square plus del square t by del y square. So from the control volume also you can derive the governing equation. You can derive the governing equations from let us say mathematically the way Professor Puranic had shown. So let me call the two procedure as mathematics based procedure or the physics and the control volume as the physics based procedure. If you go to CFD all the books which you see in CFD what they do is that they follow mathematical approach. They start with the governing partial differential equation they do volume integral. For some of the terms which we know are surface terms they apply Gauss divergence theorem and convert the volume integral to surface integral. When you teach the students in this manner I had found at least that it is very difficult for the student to get the attention of the student. In fact I was talking with one of the faculty Mr. Hagrid yesterday evening and he was saying that if they have a CFD course but students are not taking it. They feel that it is too mathematical. So with this like series of lecture I am my objective I would say that I would want to take out that barrier that it is too mathematical. Many time I use some mathematics but I will ask you whether this mathematics is very difficult. Whatever mathematics I will show you it is very easy very elementary it is a school level mathematics. I would not talk about Gauss divergence theorem. So using minimum of mathematics taking the help of the control volume I had come up with a what you call as the physics based finite volume method. But let me tell you whether you follow this physics based or the mathematics which you see in all the CFD books finally the end results which you get what you get in the end results after the discretization the set of linear algebraic equations. Those set of linear algebraic equations are same. If the end product is same whether you follow one path or the other path one procedure or the other procedure it does not matter. But what matters is that understanding which is involved if while following a procedure you understand better then you can take it forward. So all my lectures will be based on what I call as the physics based finite volume method where we start with the control volume method. It is good that professor Puranic had given you a mathematical flavor of the course and I would try to give a more physical physics based behavior of the fluid mechanics problem. So I will start with the first part. First part is an introduction. I will start with introductions to computational fluid dynamics and then I will also go to the introduction to fluid mechanics. Although professor Puranic had taken fluid mechanics for two days where he has laid down the foundation very well. However I would like to show you a different flavor of the derivation because this methodology is analogously used in the discretization finite volume method. So I will show you control volume based derivation of the continuity equation and the transport equation. I will also point out the initial and boundary conditions which are very important as far as CFD is concerned. And then finally I will discuss the engineering parameters which you calculate. In any branch of science or engineering whenever you do an investigation there are basically two methods of investigation I would say broadly. Experimental and theoretical and theoretical further can be subdivided as a computational and analytical method. I typically start my lectures with a quote from Albert Einstein. A theory is something which nobody believes except the person proposing the theory and an experiment is something which everybody believes except the person doing the experiment. The reason I start with the statement is that you should pay particular attention to the first part of the statement. A theory is something which nobody believes except the person proposing the theory. Computational fluid dynamics is a theoretical method of investigation. So note that where you are whether you are in academics or whether you are in industry whenever you get some results you have to convince people. You cannot just start discussing whatever results you have got. You have to convince people that you have used the software or CFD in the manner in which it is expected. What I mean is that you have to show what you call as in CFD language code validation, grid independence, time independence, domain independence. You have to do a lot of other exercises to convince the people that you have followed the procedure properly because this CFD software are not like any other software which we have. So it has to be used properly intelligently. Computational fluid dynamics, this is subject which has grown. I would say these are the type of people who have contributed in its development. Mathematician, computer science people and the fluid dynamics. This fluid dynamics subject is not only limited to let us say mechanical engineering but it is widely studied by various not only in engineering but science. So mathematicians have developed as far as the algorithm development is concerned. Let me tell you that the development of computational fluid dynamics depend a lot on the hardware development. If you look into the history of CFD the challenge we took as far as problem solution is concerned depends a lot upon the hardware. So the computer science people have contributed a lot into the hardware development. Mathematicians have contributed a lot as far as the algorithm developments are concerned and I would say that the people from fluid dynamics area they understand the physics of the fluid flow in a better way. Any mathematical procedure which you adopt it has to have some physical basis otherwise it will be just a numerical artifact. So that way physical understanding has contributed a lot into proper development of proper mathematical procedure in the discretization. CFD if you look presently it is widely used in research organization. It is used in education a lot because there is a lot of need of this course as far as job is concerned. So as a teacher there is in the field of education we need to teach this course. This is widely used in industry various industries aerospace biomedical electronics chemical industries and so on. Although they wish to use as a design tool but let me tell you honestly CFD has not reached to a stage where you can use it as a design tool. The only thing which is why we cannot use a design tool is that it is very costly. Costly means cost in CFD means it takes a lot of computational time and you need let us say you want to do a real world simulation you need parallel computing facility if you have a parallel computing facility you need AC. So there is a lot of cost involved as far as these computations are concerned. So if you want to use CFD as a design tool you had to run many cases many simulations and that becomes too costly a procedure. So most of the time if you look into the industry I had been interacting with industry also in this regard. I had found that they use mostly this as a analysis tool. CFD is presently used by industry mostly as an analysis tool rather than a design tool. Although the wish list they want to use it as a design tool. If you look into the development of CFD software typically I will talk what happens in a traditional CFD books or courses that they start with governing partial differential equations and certain set of boundary condition and they apply what we call as the so the they convert the differential equations because computer cannot solve the differential equation directly because this system of equation are a non-linear systems and the coupled systems. So there is a method by which we convert this differential equation to an equation which computer can solve and what is that equation it is a set of linear algebraic equation. This method is called as the discretization method. If you in the early days of CFD finite difference was the most popular method in CFD but slowly when people started solving more complicated problem they realized that finite difference is good in Cartesian coordinate system or let us say standard coordinate system. But they want to solve when they want to solve the complex geometry problem which where the boundary are not aligned along the standard coordinate direction then they felt that this finite difference method gives lot of trouble as far as stability is concerned and accuracy is concerned. Numerical stability and numerical accuracy were the issue with which this motivated people to come up with a method which has a better conservation. You know fluid mechanics is basically application of law of conservation of mass, momentum and energy. So they came up with a method which I would call as a more of a physics based method where they ensured that the conservation laws are satisfied to a very large extent. So this finite value method is more popular method and if you look into the most of the CFD software it is being used. Finally once you get the set of a linear equations then there is a step back because when you have set of you have momentum let us say continuity, momentum, energy and so when you have a set of equations you have to solve one at a time because they are many times you will see that they are coupled set of equations and you need to develop a step by step procedure to solve the set of linear algebraic equation. That is what we call as the solution methodology. So this is one part of the CFD but here I would say it is more of a we start with equation and then we work it. I would say there is a parallel other development which needs to be done where first part is let us say discretization of the equation. There is a second thing which needs to be done which is called as the discretization of the domain. Like differential equation we converted into set of algebraic equation. Analogously this continuous domain in which we want to simulate let me give you a slightly different flavor of CFD. How do you perceive CFD? What do you think what is CFD? I would like to know from you. How do you how each one of you would like to define CFD? What is CFD? You can be as simple as possible. So please raise your hand we will pass the mic and let us try to develop a meaning of CFD. How each of you perceive and feel about or understand about CFD? What do you feel about CFD? What is CFD? Please raise your hand. It is a numerical tool to get an approximate solution of engineering problems. Good next. It is a numerical tool to get an approximate solution of an engineering problem. So it is it is based on the principle. Please please yeah yeah yeah. It is based on the principle of divide and conquer. Principle of? Divide and conquer. Divide and rule your thing. CFD is converting this partial differential equation into set of algebraic equations to a discrete spaces and solving using some numerical. Technique. So he says that CFD is a numerical method where we do discretization and solve by some numerical method. Any other definition anybody else would like to give? Do you think that this definition when you go to the first class of CFD and if you give this definition students will appreciate. I want some other definition. First class of CFD. Yeah because you have to excite student in the very first class. It is a analysis tool which is used to solve the problem with the help of computer. Okay. Okay I think then here there is not much difficult languages for the first class introduction. When fluid is in motion we are predicting the flow parameters with the help of mathematical tools. It is the analysis of fluid flow for any component by using computers. Okay. More all the definitions over but one thing we can visualize the flow in respect of various parameters what actually happens in the flow we can see it with the help of CFD. Yeah so I think at the last I had got very close to what I was I feel that that could be the way of defining. I will give you what how I try to define the first class. I say that CFD is something by which you can create a movie. You say this word to the student they will feel excited. You not only say this word you show them some animation. You tell them you can create a movie out of CFD. But what movie? Not the movie which you see in theater but the what we call as fluid dynamics movie. Now tell them now ask them what movie is made up of. They will say movie is made up of picture. If I want to create a fluid dynamics picture what will how you should create a fluid dynamic picture. So they have some idea. So they will say that flow we can first thing they will say that the flow we can create a picture in terms of velocity distribution, pressure distribution, temperature distribution. So I feel that you simplest way of defining CFD is CFD is like a tool by which you can create movies fluid dynamic movie. Now what they study in fluid mechanics and what they expect to study in CFD let us say in this this is a tool where you we can create a fluid dynamic movie. You can give some more example. Let us suppose some aeroplane is moving and you take a video camera and start creating a movie. Then the movie which you create will not be a fluid dynamic movie. But just imagine let us suppose you have a fluid dynamic camera where you can create a movie fluid dynamic movie. Then how it will look? You will zoom to some region in space you will say. So you need some region to create a movie or one picture. Analogously in CFD what do we have? We have a computational domain region in space where you want to limit your picture. Then what a picture is made of what? Picture is made of a pixel. Analogously here what we have? Grid points. Tell them that okay what is the specification of camera they will say some megapixel. Here you say the resolution of the grid points here you also have certain resolution of the grid point. And if you want to purchase a camera of high resolution the cost will be more. Here also if you want to have more number of points when more number of point when the camera when the camera is of more pixels then what happens you have better clarity in the picture. Analogously here you can say when the points are more you get more accurate solution. You can also give them the feel that it is not only the special discretization which matters because in a picture resolution special resolution is good enough. But when you want to create a movie there is a temporal resolution also involved because in a movie there is a picture which is created with certain time interval. So what is that time interval between the two consecutive picture? The temporal resolution. Analogously here in CFD we have certain time steps. So that way I think that if you try to explain them in this way so then you can say that in CFD the objective of the course is not to create movies but to teach how that CFD like camera is developed. How CFD softwares are developed. Okay because there could be two parts of CFD. People can have a lot of discussion into this. There are two parts of CFD CFD development and CFD application. Most of the time it is easy to get started with CFD application because you take some software and start teaching to that software. It is easy to teach. But because it is like as I say commonly that it is easy to teach how to run a car as compared to how to build a car. Okay so but I believe that as far as the teaching in CFD is concerned the foundation is well led if you teach them how the CFD softwares are developed. So when we talk of CFD software development there are two levels of discretization. Discretization of the equations or discretization of the conservation laws into set of a leverage equation. And the second is the discretization of the domain or the region in space where you are interested to obtain the results. Then the domain discretization what we do is we convert the continuous this domain as infinite number of points. We convert into analogously you can caught certain pixels or certain number of grid points. And the algebraic equations we get here consist the unknowns at this grid point. So if there are 100 points let us suppose you are trying to create a fluid dynamic may flow across a car. So in the fluid region let us suppose you are developing the car you pick up one region and let us suppose you have 100 points distribution where more points are near to the surface of the car. Then you get 100 algebraic equations. So whatever is the number of points which you have generated from the grid the algebraic equation which you obtain the unknowns in the algebraic equations corresponds to the value of the variables at those grid points. Now once you generate the grid as far as the linkage between the two is concerned the coefficients which you have this algebraic equations have certain coefficients like if you talk of 3x plus 4y is equals to 5. So 3 and 4 are the coefficients of x and y. So the coefficient of this algebraic equation what it consists of? Can anybody tell me what is the coefficient of in a general language I want to know what the coefficient of linear algebraic equation consist of what what yeah please raise your hand use mic and then. Magnitude sir, magnitude of what? Suppose if x is considered as a vector direction. The coefficient of linear algebraic equation let us suppose there is a heat conduction problem. So the constants which we have let us say 3 t 1 plus 4 t 2. So what that 3 and 4 is coming from where from where it is coming from yeah please use mic please use mic. The flow mainly basically from fluid properties and the flow characteristics. Fluid properties correct? Boundary not boundary information actually fluid properties and then maybe the flow parameters. Flow parameters can you be more like for example heat conduction it is the property of the material. It is basically a thermo physical property you are saying. Thermo physical property. That is correct but there is one thing more I want to know that. Geometrical parameters also. Yes yes yes. So there are two things which comes to the coefficient one is the thermo physical property and second is the geometrical parameters that is what I have written it here. Geometrical parameter means let us say you divide let us say this room I divide into certain cubes. This is a three dimensional space. Let us say this is a three dimensional Cartesian space I divide into small small cubes. So this cube if you see a control volume which you call in infinite volume method certain control volume has certain width, length, height, surface area, volume all these are geometrical parameters. Okay later on you will see that when we convert the conservation laws or the governing equation into algebraic equation this will come as a coefficient. We will need this during our formulation. Okay so this geometrical parameter as well as thermo physical property are the coefficients for the algebraic equation. So when you generate the grid then you need to also calculate the geometrical parameter. So after CFD software development I am talking here in a broader sense I will go into more specific details later on. In general a CFD software consists of a pre-processor, solver and a post-processor. In a pre-processor basically you do the grid generation calculation of geometrical parameters and set the convergence criteria. Maybe you set some monitoring parameter and then the solver you basically select solution methodology like semi explicit method or an implicit method what type of convection schemes you are using and then you solve let me tell you that this set of equations are solved iteratively. Once you solve then you get the results. So once you get the result then CFD analysis start because when you use the software you will get lot of results. So it is like you will have more food than what you can chew. Most of the time you have lot of results but you should be clever enough how to what plots to generate how to generate so that what I mean is that if you want to create a fluid dynamic movie each one can you create a different you can do a same simulation like flow across the car all of you can do but the movie if I tell you each one of you to create a movie fluid dynamic movie each will create a different movie but to create a good movie you have to have proper zoom in proper sections if you want to understand fluid dynamics through a fluid dynamic movie you have to be clever enough that you should understand that what type of plots I should generate. This is something which is called as the CFD analysis because if you can generate good plots then pictures speak more than words animation speaks more than picture okay like you know let me as a teacher I can also here I would like to emphasize that as a teacher you might have realized that if you want to teach some concept to the student you always try especially if you are working with black board you are always try to create some picture some cartoons to explain why why don't you use words because the pictures have more memory retention power and nowadays we have computers so we can go one step ahead from pictures we can go to animation and animation has one level more retention memory retention power and mainly nowadays students are quite excited about this technology so you really need to excite them in different way in fact I have a lot of interest in using education technology or animations in teaching so you will see in this course that I use a lot of animations not only PowerPoint animation but to explain especially teaching CFD is a challenge why because if you say that you have to divide a great point then you have to draw in a board domain then you have to divide into certain control volume then you have to draw the grid points if you do it manually in a blackboard and I will show you how I will do it through animation so if you do that follow that procedure there are two things one is that you will not be able to cover too much of syllabus first thing second thing is that you may not be able to because students nowadays quite easily get bored okay you might be seeing that in classroom teaching the student one of the problem is that you very easily lose the student interest of the student you really need to be excite them interact with them during the class hour so I would strongly encourage all of you to use animations in teaching so this post processor once you get a CFD simulation results then post processing is basically generate proper results so that you can try to understand the flow situation in a better way I am giving a general structure of a CFD software if you want to apply if you are using a software then there is an initialization procedure because if you are solving an unsteady state problem it needs to have certain initial condition then there are certain solution control because here we solve iteratively and then when you solve iteratively you start with some initial condition if it is a transient problem then you do time marching so there is a convergence criteria which you set up in your solution controls and then once you if you are running a let us say transient simulation then you would like to monitor let us say velocity at some point critical point so there is some monitoring solutions which may be there like I think yesterday one plot was coming after let us say n number of iterations then so all this solution control monitoring parameters you said then the CFD calculation basically solver start working and you monitor the convergence so as we are solving iteratively so what should happen is that this convert this after each iteration there is some parameter which we call as the convergence parameter which should reach to 0 if it reach to the 0 means solution has converged and you should stop but if it doesn't converges then you need to modify your let us say you may have to do under relaxation you may have to generate a better quality grid mesh so it's not always necessary that you do a simulation and you get a convert solution you may have to struggle with the mesh or the relaxation parameter depending upon the problem this is general structure of CFD software I would like to take you to a bigger picture of CFD now we are talking of something even if you look into the software products it's not only CFD software now they are trying to combine CFD software with let us say solid mechanics software and now it has become what we call as a multi physics simulation okay now I believe that we should move ahead from teaching CFD to a bigger thing what we call as the CAE so we should have a course what we call as right now we are struggling with teaching CFD and now I'm talking of I'm trying to give you a vision that we should in future we should quickly try to teach what I call as a computer aided engineering which would have because if you want to develop a computer aided CAE expert what is called as CAE expert he needs to have expertise in solid modeling FEM analysis and CFD analysis let me look tell you that as far as the CFD software development is concerned they create products they show capabilities and right now I would say that the computational hardware have developed to a very good extent and the industry is quite eager to use those hardwares for challenging problem there are a lot of challenging problems where we need not only need knowledge of fluid mechanics we need knowledge of there is a fluid structure interaction problem which needs knowledge of fluid mechanics as well as solid mechanics so you see there's not now we have software which not only have this let us say a finite element method capabilities mechanism analysis and so on the bigger picture is that in academics now we have to create CAE experts which should be taught solid modeling FEM analysis as well as CFD in fact in IT Bombay I along with two other professors in who are experts in finite element method and mechanism analysis we had offered this course as a CP course to industry and the academic we had offered it three four times so the objective of this course is related with CFD the idea the objective is to develop an appreciation of the theory behind the computer screen so whenever you use a software there is some theory which will which is happening let us say behind the screen which is applied behind the screen so you should understand that so that you can use the CFD software more intelligently I will draw your attention to some specific decision-making when you have when you are using a software in a simulation and you have to appreciate the application of CFD I will discuss this with some example problems so with this two approach of theory and application I would here say that you will be firmly set to at least teach this course in your college in a better way so this was all about the broader picture of CFD where I would again highlight that CFD is like a tool CFD is a tool by which you can create a movie fluid dynamic movie okay so as in a fluid dynamic movie there are a lot of pictures picture is created in a space so here there is a domain which is analogous to that in a picture there is a resolution spatial resolution and temporal resolution so here also you have certain spatial resolution and temporal resolution but the good thing about the video camera is you just click and you get the movie but here in this movie even if you develop a tool you have to keep running it in computer and in most of the engineering problem it takes a lot of time you have to run days and nights not going one processor but multiprocessor we are hardware development that we are aiming for what we call as a laptop parallel computing machine nowadays another type of architecture computer architecture which has come which is called as the GPU graphics processing unit okay so the hardware people are trying to come up with very heavy competitions laptops let me tell you so things are advancing in a hardware decide but if we train people who can use them in an intelligent manner then only we will be able to really because it's the man who has to do the things unless he is trained properly all this hardware will not be able to utilize them in the best so I'll after introduction to CFD I'll go to introduction to fluid mechanics this I'll do it really fast as you had been taught first two days on fluid mechanics so but I'll highlight this was necessary for me because I take certain analogy for whatever I discuss here where I later on do the finite volume discretization so in fluid mechanics basically consist of this laws this laws are called as conservation laws law of conservation of mass momentum and energy this you may be knowing it since long maybe from your first year of the college and the whole so the idea is that in fluid mechanics we obtain certain mathematical model and what are the mathematical models we obtain okay now let me go to that picture or movie let me go back I said that CFD tool by which you can create a movie to create a movie what is what do you want let us say velocity pressures and temperature as a function of what space and time if you talk in mathematical language what does how we can convert this into mathematical language so you did some functions using there is some dependent variable as a function of certain independent okay so what you want to achieve is that you want pressures velocity as a function of more than one independent parameter spatial coordinates and temporal coordinates and when you want the functional relationship is a solution then what which mathematical model gives solution as functional relationship your different type of equations partial differential equations as a equations note that what is the solution of algebraic equations numbers what is the solution of differential equation function what is the solution of ordinary differential equation dependent variable as a function of one independent when you have more than one independent variable then you need a partial differential if you create a fluid want to create a fluid dynamic movie which type of equation you need partial differential although the partial differential equations are continuous in nature their solution is continuous in nature but we do not know that analytical solution of that it's a million dollar problem if you can obtain analytical solution for all the problems in fluid dynamics it's a pranic discuss few of the simple cases of exact solution of the new stoke equation fully developed flow in a pipe or a channel or but if you want to obtain analytical solution for a more general case let us say flow in a turbine or a compressor can you obtain analytical solution if you can obtain an analytical solution all this CFD companies has to close down it is as big as the problem like this okay so we analytical solution I would say is something like it is a camera which can create a movie which has infinite resolution because analytical solution has infinite resolution okay because this is a continuous function so here what we get is a discrete solution we do not get functional relationship as a solution in CFD we get solution as values at certain points not at all the point so we apply this conservation laws and there are two approaches in fluid mechanics one is what we call as the differential approach and second is the integral approach in the differential approach what we do is that we start with the apply this conservation law to small regions or what we call as the control volume and in an integral approach we apply this conservation law to some fixed finite region in space and what we get from our differential approaches we get a differential equation and from integral approach we get an integral equation and the information which we get from this is also different differential equations can give you information by which you can create a movie but in an integral equation will not give you information which can by which you can give certain engineering parameter like when jet strikes on a plate which you might cross simplest problem which you take in your UG fluid mechanics class do you get velocity distribution of the jet in integral analysis what do you get force acting on that it gives the gross parameter the effect of that velocity and pressure distribution the net effect is what you get from integral approach so you get what you call as the gross information not point by point in fluid mechanics before going into the derivation let me go to because some mathematics will come but let me start with this elementary mathematics simplest of that what is the simplest this is the equation which I have written here which is I would say that one of the simplest which you have studied in your schools how do you express a partial derivative let us say del f by del x s at x plus delta x minus f x divided by delta x limit delta x tends to be so let me say that suppose f is a flux how do we define a flux flux is some term per unit area as soon as you hear a term flux it means there is a per unit area term so let us suppose this small f is a flux okay now when a term is per unit area then if it is if you take a control volume and this flux is directly proportional to surface area then you should express this flux at surface area so if you take a let us say square control volume which I have shown here how many surfaces it has two vertical surface two horizontal surface we are working in Cartian coordinates okay then this flux is also certain direction okay so and this fluxes we express in the normal direction right now I am talking in generic terms I will be more specific later on when I take continuity equation momentum equation energy equation one by one but what I am trying to tell you is that I am talking starting with a generic and then I will go to the specifics let us suppose there is a flux term you can express it on the face acting in the normal direction now to get the total value of this flux you multiplied by surface area here I am taking a 2D control volume so the area perpendicular to the board I am taking it as unity this width is delta x so this surface area is delta x this width is delta y so this surface area is delta y the z direction the dimension I am taking as unity so by multiplying the flux with the surface area we get the total term in any conservation law what I am trying to emphasize here is that you start with such picture what you do in heat transfer code what is this f in heat transfer code small q heat flux when you apply law of conservation of mass what is the small f mass flux when you have when you apply this momentum equation what is this flux momentum flux what is the pressure it is also a flux term what is stress it is also a flux term so just think about this mass heat momentum pressure stress all are flux term and this is what you have in fluid mechanism I told that the stress is a flux yeah can you love it boss mass I am able to understand the momentum I am able to understand energy but how do you define stress stress is force per unit area so there is a per unit area term yeah so it's a flux anything which has per unit area term I am defining it is a flux but stress is also force per unit area but the flux normally will say something which flows one from one place to another no it's not I'm say here the definition I'm saying it's anything which is per unit area it's not flowing it's not necessary it's flowing in CFD many many definitions change slightly let me tell you early if you look into the fluid mechanism book neo stroke means only momentum but in CFD neo stroke equation means also continuity and energy equation so this broadens lightly so that the generality comes up is this answer your question okay so what happens is that in what I am trying to tell you the objective ultimately is to show that how we start from a control volume and obtain the differential equation and what mathematics we will use this method is this very difficult for the student to understand okay so and we do some conservation any conservation means what balance in minus out or out minus it so next thing what we will do is from this control volume we will do balance change of F here I know that I am doing per unit volume why I am doing per unit volume can you tell me can anybody answer why I am doing per unit volume I am doing a balance then per unit volume please use my first to make it dimension independent no it's not so as to accommodate the flux no it doesn't become non-dimensional even if you make it per unit volume it doesn't become non-dimensional because if you balance mass flow rate mass flow rate per unit volume let us say if you do it is it does not become non-dimensional there is some other reason what you want to achieve a partial differential equation can you achieve this partial differential equation without the dividing by volume you have total term what is total term flux multiplied by surface area what is flux surface flux multiplied by surface area divided by volume flux multiplied by surface area divided by volume will give you a length scale in the denominator and if you need a derivative you need a length scale or a delta x delta y or delta t in the denominator how can you get if you don't divide by you are doing balance of fluxes when you are doing balance you are multiplying by surface area if you want a elemental length scale in the denominator you have to divide by volume that's the reason we are doing it divided what I mean is that this is multiplied by a delta y when I divide by volume this will become delta x in the denominator in the next slide you will see if I don't divide by volume I will not be able to convert into differential term this is a simple mathematical reasons for get dividing this reason is only mathematical there is no physical reason is that clear any question into this this is the basic slide this I will do first for mass conservation second for momentum conservation momentum conservation this I will do at different for different terms in energy question also this is done many times but if you understand this is this mathematics any difficult do you feel you will find it difficult for the student to grasp this mathematics okay so this is what I said just now that what is different f term capital f term total term and what is small after the mass conservation small m is mass flux the momentum conservation there is a x momentum flux this I'll discuss in more detail later on through some animation not only momentum flux but the stresses when we talk of stresses in fluid mechanics there are two types of stresses one is pressure and second is the viscous stress similarly you have y momentum flux and the stresses in the y direction and in energy question you have enthalpy flux and conduction flux this enthalpy flux is a product of mass flux into specific rate into temperature this mass flux is mass flow rate per unit area okay and the total f term are mass flow rate x momentum rate force in x direction y momentum rate force in y direction enthalpy rate and conduction heat transfer in fact if you see these three slides I believe that the student if he thinks really he should be able to derive all the equation however I will show you the detail derivation one by one quickly to make it more clear more explicit I'll start with the derivation of continuity equation what is that rate of change of mass of the fluid inside and across a control volume is equal to this I am doing it for an incompressible flow and without any mass so wherever there was f I am writing it small m it is mass this is the mass inflow this is the mass outflow is 0 so you see this is the rate of change of mass inside the control what is this row density is a 2d control volume what is the volume delta x into delta y what is this product mass if you take a time derivative is rate of change of mass rate of change of mass and this is net outflow net so this comes out like this this is the mass net mass going out of the control volume and when you divide by the volume you get this term this is the derivation of continuity equation I would like to mention that when we do this derivation there are two stages of derivation in the first stage you get first derivative of flux and in the second stage you get second derivative of like in conduction what happens first you get equation such as del qx by del x plus del qy by del y there f is qx qy this completes the first stage of derivation I would say where you get first derivative there in the second state what you do it fluxes non-vegetable quantity you convert it in terms of temperature there you used one law which is fluid techniques or heat transfer you call it as a subsidiary law what is that law Fourier law of heat conduction qx equals to minus k dt by dx and when you substitute that you get a second derivative here in this case you do not get a second derivative why because q is expressed in terms of gradients of temperature but the mass flux is expressed in terms of normal velocity not as a gradient but in terms of what is mass flux density multiplied by normal velocity not the gradient of velocity you can note this because in CFD we need to develop a approximation for the gradient or the value depending upon the flux when you go to the derivation of the transport equation there are I would initially start with the physical description this I what I would do is that the momentum equation and energy equation I will derive in a under a single umbrella which I call as the transport equation this is what you will see in most of many of the chemical engineering books but not so common in mechanical engineering or let us say civil engineering because if you look into the mechanism of this heat and momentum transport it is basically a like a transported variable there are two types of there are two types of transport mechanisms one is the diffusive transport second is the advective transfer what is the diffusive transport this occurs by the random motion of the molecule what happens in conduction this diffusive transport gives what which type of heat transfer conduction and what is the advective transport mechanism not only the molecules move but as a group also they move there is a bulk or macroscopic motion okay so the large number of molecules move collectively but when the large number of molecules are moving collectively there is a random motion also inside that collective motion this molecular heat flux which occurs due to random motion of molecule contributes only to condone conduction heat transfer whereas this molecular momentum flux this causes this results in pressure and viscous voltage I think in the previous lecture Mr. Puranic has asked you that from molecular level how pressure is generated so there is a rate of change of momentum of the molecules striking from kinetic theory of gases this viscous forces also are generated due to random motion of the molecule when you have collective motion and there is a velocity or temperature gradient temperature gradient means non isothermal flow if it's a non isothermal flow and if there is a motion then it contributes both to heat and momentum transport this are the two transport mechanism now I'll show you some animation let us suppose you are standing between ice at 0 degree and fire at 100 degree centigrade this is just to give you a feel of the different mechanism if you are sitting exactly in the middle between ice and fire and if there is no flow and let us assume that the heat transfer is one-dimensional okay one-dimensional in the z direction heat transfer is one-dimensional there is no flow no flow means no collective motion of the molecule I'm making an assumption if you are standing exactly in the middle what temperature you will experience which phenomena here is occurring pure diffusion phenomena that to one dimension so the average is you will experience a temperature of 50 degree centigrade this is a pure diffusion phenomena here we are talking for conduction but conduction is easy to it is easy to feel and understand and absorb but the same thing happens in fluid flow as well as what I mean is that here it's a conduction heat transfer there it causes the viscous forces okay now let us assume that the flow velocity is very large very large and the flow is from the high side with a very large velocity what is the temperature which you will experience close to 0 degree centigrade and if the flow is very large from the fire side then you experience close to 100 degree centigrade I am I'm emphasizing this word close to why because conduction is negligible as compared to advection what I am saying here is that I am trying to create a situation which I want to call as a pure advection pure conduction is a reality pure advection is a approximation what I want to tell you is that when flow takes place random motion molecule will anyway be there so conduction will anyway be there but if I want to have pure advection then I have to make conduction negligible when can it become if the flow velocities are very large the real world situation is something like this if the flow velocity is let us say 1 meter per second you experience a temperature of 40 degree centigrade and if it increases to 100 meter per second maybe you experience a temperature of 10 degree centigrade so you are not experiencing 0 100 or mean the value not depends upon the magnitude when the flow is from the fire side at 1 meter per second let us say that you assume it you feel a temperature of 60 and which is when it is 100 meter per second you experience a temperature of minus 90 let me tell you this understanding is used in CFD so it is not mathematics it is a physics this is what you feel whatever example I am giving you are able to understand and appreciate so when you are teaching CFD if you start with physics and then go to mathematics and that to try to keep mathematics as low as possible which I always try then I think you can make the student feel that this course is not quote-unquote mathematical okay so just note this slide I will come back to this slide when I will be teaching advection schemes you might have heard in software first-order apparent scheme second-order quick scheme power scheme all those schemes are designed from this understand now I will quickly show you the derivation of the transport equation law of conservation of momentum energy law of conservation of what I am doing is that these are specific statements and I am combining this statement as a transport equation rate of change of momentum of fluid inside and across the control volume let me tell you that this laws momentum equation is basically coming from which law Newton's law of motion Newton's second law of motion this law was proposed for Lagrangian or for Lairier this was expressed for this was proposed for fixed mass or fixed region fixed mass it was original even when you teach fluid mechanics you convert that total derivative as two components as temporal and convective component okay so initially it was proposed for a fixed mass so what I am trying to tell you is that right now we are I think it is for fixed mass but when we follow an allerian approach it will have two components which I will discuss little later for energy equation it's a rate of change of internal energy or I mean the help you of the fluid inside the control volume across the control volume so if these two statements I can combine and write a simple expression and this is rate of change is equal to pressure some force basically so there are different types of forces we have include techniques in general we classify into two types surface force and body force so the surface force are the viscous force in the pressure force and the body force is like gravitational or due to magnetism or the electric field and this rate of change of internal energy is equals to heat gained by conduction and volumetric this also can these two statements can also be combined into a single statement saying that the rate of change of momentum or energy of the fluid inside and across due to across happens due to advective transport is equal to momentum or heat gained by molecular transport and volumetric source so we use a general transport equation which is applicable both for momentum as well as energy equation now how we can write rate of what let me point out that I am showing you the derivation but this derivation is different from what was a Puranic had shown you here I am showing you from control volume not from the integral form and using the Gauss divergence here I am only missing rate of change of okay let us look into this what is this density multiplied by volume is mass mass multiplied by u velocities x momentum we are interested in rate of change of x momentum so when you want to rate you take a time derivative this is rate of change of x momentum this is rate of change of y momentum this is rate of change of enthalpy so this is the way you can express words to differential term directly let me point out that I am not writing as x this I am not writing as t plus delta t minus t divided by delta t I am not applying limit anything like this here because this rate of change I can express directly as a derivative I do not think it is mathematically too complex to understand and appreciate rate term anyway we can like a temporal derivative so that was the first unsteady term as I said that this rate term was proposed for a long ranian system in a larian system there are two components one inside the control volume and second when the flow is occurring across the control volume there is some momentum change across the control volume so this is the second component of the unsteady term what is this what is f here if you go back to the earlier slide at shown f f multi so f into delta what is f here f is here product of m and u what is m m is mass flux what is u u is velocity in the x direction what is mass flux mass flow rate per unit area multiplied by u velocity mass flow rate into u velocity is what momentum rate x momentum rate u velocity means x momentum rate per unit area when you multiply it by area what does this term represent what is the total f term mass flow rate multiplied by sorry mass flux multiplied by area is mass flow rate mass flow rate multiplied by velocity is momentum x momentum rate and this is your x momentum flux entering, leaving. This is similar to what you do in your conduction class, qx, qx plus dx. What is, instead of small, here you have m into u. What is m into u? x momentum flux. This is y momentum flux, various velocity. u, y, I am using a symbol v for velocity. What I mean by uy is u at a location y. Do not confuse with the symbol u at a location y. Like you write qy, but actually in that case, qy is not only in the at y, but it also in the normal direction. I understand that this is difficult to get a feel that I am saying that the mass flow rate in the y direction is multiplied by u velocity. This is little difficult to get a feel. I understand that. But this is not, this is mass flux multiplied by areas of scalar. Mass flow rate into u velocity. So, the direction of this is decided by the direction of this u velocity. Mass flow rate into u velocity is still a x momentum. So, this is the x momentum entering from the bottom wall. This is the x momentum entering from the left wall. And this is the x momentum leaving from the top wall. But then again, you balance it and divide by volume. And you get this. Basic definition of a differential term is used here. Same thing you do in. So, wherever there was u, I am writing v. And I get. So, let me tell you. In conduction, what do you get del by del x of qx plus del by del y of qy? In case of continuity, what do you get del by del x of mx plus del by del y of my? Here, what you are getting? For x momentum, you got del by del x of mx u plus del by del y of mx u, sorry, my v u. For y momentum equation, wherever there was u, you get v. Del by del x of mx v plus del by del y of my v. Note this. This is like a, I would, I say that if you want to get more understanding of this, when you talk of advection, there are two types of variable. One is the advecting variable, which is like a driver. And second is what we call as the advected variable, which is like a passenger. So, when you talk of advection, there are two things, two variables, two dependent variables. In fact, where nonlinearity comes in fluid mechanics in advection? Because there are two dependent variables, which are multiplied, which are those two mass flux, which consist of, which velocity? Normal velocity, surface normal velocity. And second is the, like in this case, the second velocity is the v velocity. This consists of one velocity. This mx is rho u. What is this my? Rho v. So, we have product of two dependent variables, which makes it nonlinear. So, which one is driver in this case and which one is like a passenger? What do you feel? Which is driving? Mass flow rate, mass flux is driving the flow. And which is going along with the flow? Is u velocity in the x momentum equation, v velocity in the y momentum equation? Let me tell you this momentum. In general, it varies from point to point. It is a vector equation. But here, we are resolving into component that we are saying that, but strictly speaking, it is easy to understand and appreciate this advection in energy rather than in momentum, because momentum, what happens is a vector quantity. When you go to the conduction or energy equation, you only have temperature. Then it becomes little easier. I will go to the next slide, go to the energy. Then maybe you can appreciate in a better way. What is the difference here? What is the small f in this case? Mass flux multiplied by specific heat multiplied by temperature. What is this? Enthalpy flux. So, you get similar equation. So, earlier we have del by del x of mx u plus del by del y of my u for x momentum. Here, we have del by del x of mx cpt. Here again, this mass flow rate is the driver and temperature is like a passenger. In CFD, what we do is that rather than writing, if we have common things, we try to commonize things. We want to write subroutines. With general variables. So, what you can see in this case is that, although I had this advection as a momentum flux in x momentum, y momentum flux in y momentum and enthalpy flux in the energy equation. But the nature of the differential equation is very much similar. Later on I will show you like a fill in the box type of problem. So, we write one subroutine with general variable. Instead of writing u velocity, v velocity or temperature, we define a general advected variable called as phi. And we write a general subroutine in terms of phi. When I have to calculate x momentum flux, I call that subroutine where I send u velocity for phi, v velocity when I want y momentum flux and temperature when I want enthalpy flux. I can define a constant c which is 1 in case of momentum and which is 1 for sorry, which is 1 for c is 1 for momentum and is equal to specific it for energy equation. So, that way I can generalize, we can generalize. So, here what is a? a is the momentum flux in momentum equation and enthalpy flux in energy equation. And this is the general form of the equation. I will show you more. So, this is general form of the advection flux. What is the advection flux? x momentum flux in x momentum equation, y momentum flux in y momentum equation and enthalpy flux in energy equation. And this is the way when you balance it and divide by volume, you get this type of terms. And as I said that you can have a general variable phi. Phi represent basically in the passenger which I called advected variable which is u velocity for x, v for y and temperature for momentum equation. As I said that this c is a 1 unity for momentum equations and specific it for energy equation. So, with this I had shown you advective transport mechanism from a control volume how you can obtain first derivative. Note that in advection you do not get second derivative. Why? Because this fluxes, here what fluxes we have? Momentum flux or enthalpy flux. Enthalpy is not expressed in terms of gradients of temperature. It is expressed as value of temperature. Note that because later on this fluxes when we discretize in CFD you will need the value or the gradient at phase center.