 My name is Rathur Sharma, I welcome all of you to this workshop on computational fluid dynamics. I had been associated with this subject for the past 15 years, I had always been interested in using technology and teaching as well as distance education mode. This is especially true for computational fluid dynamics as a subject because as far as using technology is concerned as you see that whenever to explain some concepts if you use a figure the student understand the concept much better as compared to text. So here when we use technology we can create animations for to explain some concepts and animations have much more memory retention power as compared to the figures. And as far as distance education is concerned this is very much needed in case of computational fluid dynamics because we see that just to give you an example CAD has become an undergraduate course for most of the colleges in our country. Computational fluid dynamics has not reached to that stage even if computational fluid dynamics is taught in our country mostly it is using some software. So we believe that it needs to be much more rigorous as far as CFD teaching is concerned. So I had been associated in teaching this course to distance education program maybe I started this five years back and I taught through we have a center for distance engineering education program where it was telecasted to around 10 to 15 colleges. And but at that time we had never expected that we would be able to reach to around 1400 people that two teachers so it is a really a bigger experience and better opportunity. So I would like to thank Professor Fatak and his team for giving us an opportunity to teach CFD to all of you. I would also like to thank all of you for making this happen especially to the coordinators of this course who has taken the special efforts in making this course happen. So Pranik had set the stage very well for me I would say because he had built the foundation of the what is needed to start teaching computational fluid dynamics. He has strongly built the foundations and I would say that teaching fluid mechanics is much more difficult as compared to teaching CFD. I am sure you will agree with me by the end of this workshop. However you may argue or disagree saying that this CFD is too mathematical. This has given me a motivation where I had come up with what I call as a physics based finite volume method where we reach to the same end results using minimum of mathematics. Before I move to the lecture I would like to emphasize that there are two aspects of CFD when we look into CFD. One is the first is the developmental aspect second is the application aspect and here our emphasis is on the software development. We are not telling teaching you the complete software development because it involves other aspects such as aspects of computer science. What we are teaching so you can call it as a basic building blocks of a CFD software. The foundations on which CFD software are built so that is what we are teaching here. Moreover although CFD application is also very popular but that is not the emphasis of this course. So I would again request that try to focus to what is been taught here and ask limit your questions to CFD developmental aspect as compared to the application aspect. So with this note I would like to start the lecture and I will start my first topic of topic is introduction. I will start with an introduction to CFD although fluid mechanics has been taught really well by Professor Pranik. I do not need to teach it but there are some specific points which I would like to highlight or reiterate what he has taught which I believe will be very much helpful although he has taught this but there are certain things which I will again be emphasizing so that because this understanding is very important when we move ahead in this course. So let us begin with introduction to CFD and the first question which comes to our mind is what is CFD? In most of the textbooks you see a definition of computational fluid dynamics as a method to simulate fluid mechanics and heat transfer problem or fluid flow and heat transfer. Let us try to define it in a different and more exciting way. I like to define it that CFD is a method by which you can create a video camera like tool. Now you may start thinking that how come CFD is a method to create a video camera. If you take a video camera and if you create a movie let us say for flow across a car or flow across an airplane the movie which you create what information it has it has a whether it has a fluid dynamic information whether you can understand fluid mechanics by creating a video taking a video camera normal video camera and creating let us say video for flow across a pipe or flow across a cylinder or flow across a car or flow across an aircraft. You get a video but that video does not have any fluid dynamic information it has got information which we can call it as a pictorial information but here in CFD the videos which are created have a fluid dynamic information. So here in this when you learn the subject you learn how to use the method of CFD to develop video camera like tool which gives us fluid dynamic information. Now what is fluid dynamic information what is the fluid flow information we need or what movie of fluid mechanics we want to create to understand flow. The first thing which comes to the mind what we call as the flow properties and we represent the flow in terms of velocities pressures and temperature. However so if you create a movie of let us say velocity vectors and pressure contours and temperature contours is it sufficient to make a story of fluid flow or you need something else whether one movie is sufficient enough to make a story out of the characteristics of the flow unfortunately it is not. We need to create movies of different types using the concepts of fluid mechanics like streamline, vorticity contours and heat lines with which we make an attempt to understand the characteristics of fluid flow and heat transfer. So these are also called as what we call as visualization techniques which help us to understand the characteristics of the flow whether making this movies and understanding the characteristics of flow is sufficient enough maybe it is sufficient enough for a scientist but not for an engineer. If you go to the industry they may not have a lot of appreciation of let us suppose if you have understood the characteristics of flow across a let us say car or a flow across an aeroplane or flow in a pipe. In this cases what they ultimately want is let us say in case of they want lift force and drag force and propulsive efficiency for external fluid flow problem and they want pressure drop and wall shear stress in case of internal flow problems. This is what is called as engineering parameters in fluid mechanics. Now once you create a movie is this sufficient this is good for understanding the nature of the flow the characteristics of the flow and this is of interest to the scientist but as an engineer we are more interested into the engineering parameters and but however if you create a movie what you basically generate is the data in space and time. So, you basically create velocity data distribution pressure distribution temperature distribution in space as well as time. So, this data what we do is that using the concepts of fluid mechanics we use this data and use some numerical methods such as numerical integration numerical differentiation and obtain engineering parameters like lift force and drag force. Note that fluid mechanics is more important than CFD because what I will be teaching here basically a method which is guided by fluid mechanics. So, CFD is just a method which whatever although we will be using certain mathematical techniques or numerical techniques but they are just method and note that they are guided by the fluid mechanics concepts. So, whenever we will be using some approximation or a numerical technique I would I would highlight that how it is related with fluid mechanics concepts of fluid mechanics. So, pay special attention to this that whatever we do here mathematically or numerically it has direct connection to the physics of the flow otherwise we will create some numerical artifact number distribution which will not represent the real-world fluid flow situation. Now, what I would like to do is that as I started this topic with the definition saying that it is a video camera like tool. So, let me show you some of the movies or videos of which we create through computational fluid dynamics. These are just some of the videos I know that this subject is very vast. We are just teaching the let us say first course in computational fluid dynamics. So, I would like to show you some videos which we had created through our in-house code in computational CFD lab in our department. So, these are just few of the videos but this is just a representative of the whole lot of results. So, what I would suggest is that the video will be coming here you need to do a full screen of this. So, I will start with the video for two-dimensional unsteady state heat conduction. Here you see that left plate is 100, bottom plate is 200, right plate is 300, right wall is 300, top wall is 400. So, with this boundary condition how the temperature contours or isotherms vary with respect to time. So, this animation shows you the temporal evolution of temperature contours. This is a movie for temperature. In fact, although there is a concept analogous to stream line which is becoming popular which is called as heat line is also very good way of analyzing the heat transfer. So, starting with a conduction heat transfer let us take the classical flow across a heat flow across a circular cylinder for a two-dimensional flow. We know that at lower and all number flow is steady we have a steady queen vortex and at higher and all number this is the movie which you get when the flow becomes periodic. This is what is called as the vortex shedding phenomena. If the cylinder is hot and the fluid is at an ambient temperature is moving across it then this is what a movie for isotherms or temperature contours. So, I am showing you different types of movie starting with a stream line moving on to isotherms and this is what we call as the vorticity contours. This is a movie for vorticity. So, as I mentioned earlier that to understand the nature of the flow to make a story of the fluid mechanics of a particular flow situation we need to create a movie of different types. I had shown you three different cases stream lines isotherms vorticity contours you can also draw the velocity vector. So, all those were single phase flow. This is just that we are doing in-house code development through multi-phase flow. So, we have created some animations for multi-phase flow which I am showing as a representative with animations here. This is what we call as the Dram Breaks simulation. So, let us suppose the wall of the Dram Breaks it hits the right wall and how the fluid this is an animation of interface. Note that this is another type of animation. Animation is for interface. Here when a heavier fluid is above the lighter fluid this is an animation of that heavier fluid when it falls on the lighter fluid how the interface evolves is the animation for that. When a water drop falls on a pool this is an animation for interface in a multi-phase flow problem. This is an animation of when let us say air drop when it rises in a pool of water how does it look this is an animation for that. This is an animation for what we call as fill boiling. Let us suppose there is a horizontal plate which is maintained at let us suppose 150 degree centigrade which is a superheated temperature. And if you have water above that hot plate there is a thin layer of vapour which is formed. So, this animation shows you the temperature contours and the interface for the temporal evolution of interface. At the bottom there is it is interesting to see that there it also shows. I will play this video again because this is a very good way of creating animation because the point here I want to emphasize is that it not only shows you the qualitative picture but it also gives the quantitative information. At this time stand what is the value of muscle number? So, whatever picture you are seeing here there is a dot corresponding to that picture and this shows that how the engineering parameter muscle number in this case which represent the rate of heat transfer varies with respect to time. So, with this type of animations we try to make a story of the flow and heat transfer. This is an animation for three-dimensional flow 3D film boiling over a rod which is maintained at superheated temperature. So, this is an animation when let us suppose this is what you call as a multi-phase flow where granular particles fall. So, this is an animation of you can call it as a solid gas flows value case. So, with this I had come to the end of this animation now we will switch back to the lectures. So, with this introduction where I started with the definition saying that CFD is a method where we can create video camera like from which we create a tool which is like a video camera from which we can create a fluid dynamics movie and obtain the engineering parameters. Now, let us start with a bigger picture when we look into the methods of investigation in any branch of engineering or science there are basically three types experimental analytical and computational. I start this lecture mostly with this quote from the famous Santin's Albert Einstein theory is something nobody believes except the person proposing the theory and experiment is something which everybody believe except the person doing the experiment. I always emphasize on the first part of this statement because note that CFD is a theoretical method of investigation and so the what is the what is the theory? Theory something nobody believes except the person proposing the theory. So, when CFD is a theoretical method you have to make people believe in your results. So, if you develop a CFD code or a CFD software there is a procedure which is called as benchmarking where you take your software or code set up one problem run your do simulation get results and show excellent agreement with the published experimental or good reliable numerical results. So, always remember and here I would again emphasize one thing is that when you are coding or when you are developing software everything is expected that you should do without any mistake you should have to be absolute perfect in coding you cannot write 1 i as i minus 1. So, no mistake is expected when you are coding. So, you need lot of focus in this developmental work. The subjects which are used in computational fluid dynamics are basic fluid mechanics which Professor Puranik has very well taught. He had also taught minimum mathematics which is needed as far as understanding fluid mechanics is concerned and we also need computers concepts from computer science just to give you an idea that if you look into the development of computational fluid dynamics there are different types of people who are contributed to the development like mathematicians on the development of numerical methods the people from fluid mechanics which they came up with the concepts of the fluid mechanics which can be correlated with the CFD and as far as the contribution of computer science is concerned the contribution comes through the hardware. So, that not only the development of better numerical methods but the development of hardware has helped us as well as the programming languages has helped us in the development of computational fluid dynamics. Just to give you an idea if you are doing a parallel computing even if you have a CFD person you need to know the architect computer architecture to make a decision that you want to run your code in most efficiently in which type of computer architecture. As far as CFD as a tool is concerned it is used in research widely used in research in the scientific community it is widely used in the design I would say in industry however I would still say that CFD has not matured to a stage where you can use for design and optimization but mainly it is used for analysis and I would like to emphasize that CFD is used in various branches of engineering and science in education it is used in not only in mechanical engineering, chemical engineering, civil engineering, metallurgical engineering and so on. It is used in many industries power industry, automobile industry, biomedical industry and so on. It is a very wide applications I would like to emphasize that when you look into the job in CFD there are as I said there is a CFD developer type of job or CFD applications and there is a lack of trained manpower in CFD and there is a lack of good teachers in CFD and this is the motivation with which we are taking up this course and we wish and hope that you will start teaching this course in your colleges not only you will start teaching but you will also contribute in developing teaching material for this course and upload it in the mood. When you look into the CFD software development there are two levels of discretization one we call as the governing laws or the equations discretization you start with the governing equations with the boundary conditions and computer does not know how to solve the differential equation it knows how to solve the linear algebraic equations. So, you convert this partial differential equation into set of linear algebraic equations by finite difference or finite volume method which are called as discretization method and there is we need to use some method to solve those set of algebraic equations which is called as solution methodology. This is called as equations discretization there is a second level of discretization which we call as a domain discretization. Just to give you better feel I would like to take an example let us suppose if you want to create a video what do you do when you want to create a video you zoom to some region in space. Analogously here when you want to create a fluid dynamics movie you want to create movie in some region in space that region in space here is called as computational domain. When you want to create a movie and when you want to purchase a video camera there is one specification which you always look for what is called what is that called pixels 5 megapixel 10 megapixel and now analogously here what we have what we call as grid points or control volume. So, we zoom to a region in space so we and then we convert into certain pixels or certain grid points or certain control volumes. So, this is what is called as the domain discretization. So, grid generation is a method to discretize to convert the infinite number of points in the domain to certain fixed number of points analogously it is a pixel. Finite difference finite volume is a method to discretize or convert the governing partial differential equation to set up algebraic equation. I would like to point and draw your attention that in this set of linear algebraic equation the unknowns are the value of the variable at the number of grid points. Let us suppose in the domain if you have created 100 discrete points then this algebraic equations you will have 100 algebraic equations with 100 unknowns. So, it is a closed form of the equations. Now, when you generate grid what happens is that you might be thinking that when you generate control volumes or grids how they are correlated in the solution methodology. The connection between the grid generation and the algebraic equation is that if you look into the coefficients of the linear algebraic equations which are generated by finite difference of finite volume method the coefficients are what is coefficient of linear algebraic equations which you get after this finite volume method. The coefficients consist of two things. First thermo physical property like density, specific heat, conductivity. Second the geometrical parameters later on I will show you in a control volume what are the geometrical parameters width of the control volume distance between the cell center with distance between the neighboring cell centers and volume of the control volume. So, all these geometrical parameters contributes to the coefficients of the set of algebraic equations. So, now let us go to the elements of CFD software. If you look into a CFD software or if you develop a CFD software there are mainly three elements first which is called as preprocessor. Note that this CFD used for various types of fluid mechanics and heat transfer problem. And it is not usual software or easy software because you have to use it intelligently. And so the first part where you have to contribute which actually software does not know because there can be millions of problems in fluid mechanics software does not know which problem it has to solve. So, you have to give input that what problem you want to solve, what is the boundary conditions, what type of grid you would like to generate. So, all these are called as user inputs. So, this user inputs is there in the preprocessor. So, the user input where you decide about what is the fluid, what is the shape and size of the computational domain, what is the boundary condition then grid generation. It also all this comes under part of a preprocessor. Then comes the part of a once you generate the grid and set the domain boundary conditions, thermo physical property once you have defined then it is solved which we called as a solver. Where also there are different types of solver in a CFD software you have by default it uses some of those options like solution algorithm advection schemes. But you should be intelligent enough that in which problems which of these should be used. So, once you get the solution as I said the solution which you will get is basically in terms of the velocities, pressures, temperature by which you can create movies of all this you can also create movies of let us say vorticity. However, as I said that these are interest to the scientist but not to the engineers. So, there is a part which is called as post processor where engineering parameters like lift coefficient, drag coefficient, pressure drop, skin friction coefficient all those are calculated. I will be little fast in this lecture because this is an introductory lecture and that is I will also talk about the introduction to fluid mechanics which professor Puranic has already covered. So, when you look into a CFD software application this is the way it works start with an initialization where you define the domain boundary conditions user all the user inputs. So, once you set up the problems you also have to set the solution control later on I will explain what are solution control the converges criteria the number of grid points. When you are doing CFD simulations CFD simulations are iterative in nature and it takes lot of time. But when it takes lot of time you want to monitor that whether everything is going on properly or not. So, to monitor the solution there are certain plots which you want to generate let how the convergence is occurring. So, for that you have to set monitoring solution parameters and then start the CFD calculation which is basically an iterative solution iteration, biteration or time marching. The CFD calculation once the CFD calculation is complete basically checks for the convergence when the convergence occurs then it stops. If it does not occur or let us suppose the solution diverges then many a times you have to modify the what we call as solution parameters. You may be right now thinking that what is the solution parameters I will discuss this appropriately in the coming lectures. And many times you have to modify mesh I would just like to mention the solution parameters are under relaxation parameters. I would like to widen the scope of CFD by saying that nowadays if you see softwares they are integrating. CFD software is integrated with finite element software and solid modeling. And the bigger subject which is coming up is called what is called as computer rated engineering. So, because we have lot of problems like where we want to use concepts of not only fluid mechanics but also of solid mechanics like fluid structure interaction problem. So, there needs to be so the problem nowadays it is becoming a multi physics problem. So, the new field or a wider subject which is coming which is called as computer rated engineering. Hopefully in the next 5 to 10 years we will have full course on computer rated engineering where we will combine teaching CFD finite elements. And I like look forward that you will take up that challenge. So, the objective of this course as I said that what we are teaching is something like we like I would also if I ask you that whether you would like to teach how to develop a car or how to run a car what is your answer. So, analogously here we are teaching how to develop building blocks of CFD software not how to run the CFD software. So, that way you can appreciate our objective. So, the major objective is to develop an appreciation of the theory behind the computer screen. So, that the CFD software is used intelligently. We will we have lab sessions where we have designed some carefully designed some exercise problem which will help you to appreciate the application of computational fluid dynamics. So, with this two pronged approach of theory in application we hope that you will train lot of people in future who will be firmly set to become a CFD expert as it is badly needed in the industry. I will quickly go through the introduction to fluid making fluid dynamics. This is these are the law of conservation which Professor Puranek has emphasized mass momentum and energy conservation. So, I will not go into that. I would like to mention that there are two approaches in fluid mechanics differential approach and an integral approach. In a differential approach we take small region which we call as control volume and apply the conservation laws. And we get what we call as the differential equations. And this differential equation what is the solution of differential equation? The solution of differential equation is a functional relationship. What is the functional relationship? Like in fluid mechanics if you can solve this differential equation governing differential equation analytically you can obtain solution velocities pressures temperature as a function of all x all y all z. So, you can create a movie. So, if you can obtain analytical solution this is a very big problem it is a million dollar problem. If you can come up with a exact solution for all problems in fluid mechanics and heat transfer this problem has as big that all the software companies have to close down. So, this is one of the major unsolved problems in science and engineering. So, we are not able to solve this differential equation exactly in a closed form. We are not able to obtain the functional relationship as a solution for most of the engineering application problem. However, there are some simple cases which professor Puranic has discussed in the topic exact solution of fluid mechanics equation. So, in the information which we get here in a differential approach is a point by point information. However, there is a another approach which is widely used in an undergraduate fluid course in fluid mechanics where attention is focused in a fixed region like you know that you give problem in class like flow over a jet when jet hits a plate what is the force which it exerts. So, those type of problems comes under what we call as integral approach where we focus our attention in a finite region not on a small region and we use an equation which is called as the integral form of the equations. However, we apply the conservation law same conservation law which we use for differential approach. We apply the same conservation law to the integral approach but here we use an integral equations and note that here you do not get point by point information. By this approach you cannot create a movie of fluid mechanics. By this approach you can. However, it is not possible for most of the problems this possible only for some of the problems. In this approach you get what you call as the gross information like when jet hits the plate here you cannot obtain point by point what is in a jet fluid velocity or pressure. But what you can obtain is the net force it is a gross parameter it is a net effect of that interaction before I move further I would like to emphasize there are lot of commonalities in fluid mechanics which we use in computational fluid dynamics. So, I am highlighting those commonalities one of the things which we see in fluid dynamics as well as you transfer is we take a control volume and we have fluxes. Professor Puranic had taught you many fluxes what are the fluxes? Flux means per unit area terms mass flow rate per unit area called as mass flux momentum transfer per unit area momentum flux rate of heat transfer per unit area called as conduction heat flux or enthalpy flux. Force per unit area is also flux term like stresses viscous stresses pressure is also per unit area term all these are fluxes note that and if you want to generate differential equation how do you express differential terms how do you express differential term like del f by del x is represented by f x plus delta x minus f x divided by delta x limit delta x tends to 0 this is the way you generate del f by del x and del f by del y. So, let us suppose f is a flux and capital f is the total term how do you obtain total term from the flux term you multiply the flux term with the surface area. So, this is the two dimensional control volume whose bit is delta x in the x direction delta y in the y direction and unity in the perpendicular direction which is z. So, the surface area of the horizontal faces is delta x vertical face it is delta y. So, here we are multiplying the flux at x at x plus delta x at y and y plus delta y and when we apply conservation law to this flux term what we do we do a balance the arrow which I am showing you here corresponds to inflow and outflow. So, on the bottom surface and the left surface it is inflow and on the top surface and the right surface it is outflow. So, this is a total f which is a product of flux term into area which is going in and out and if you want to do balance in mechanical engineering first year you do a very good balance in thermodynamics course you do a accounting job and that is what we do here. So, let us do a balancing. So, let us do in minus out or out minus in let us do out minus in so that. So, if you apply any conservation law you do mass conservation you do balance of mass flow rate when you go to momentum equation you do balance of momentum transfer momentum inflow x momentum inflow y momentum inflow and outflow. You do balance of net forces also net force in the x direction which consists of net viscous force in the x direction net pressure force in the x direction similarly in the y direction when you go to heat transfer u balance net and enthalpy which is getting in and out u balance net conduction heat transfer in the control volume. So, you will always do balance in conservation law. So, I am showing you the common thing which we do to this example generic example. So, let us suppose if you do a balance. So, if you do a balance and if you want a differential term let me tell you you have to divide by the volume of the control volume otherwise what happens is that you will not get delta x or delta y term in the denominator and then you will not be able to convert into differential term using the limit. So, if you want to convert into differential term you need elemental lengths in the denominator. Now, when you balance this fluxes and when you divide by the volume note that when I do a balance in the x direction this is in minus out but if I divide by volume what is volume of this control volume delta x delta y. So, when I divide by the volume this delta y cancels down this is what I do what I will show in the next slide. When I do a balance in the y direction again if I divide by volume which is delta x delta y this delta x cancels down. So, when I do a balance where I calculate change of f per unit volume dividing by the volume of the control volume you end up with a gradient of flux del dot f. Now, what is this m this is mass flow mass flux in mass in mass conservation equation in the momentum equation this is momentum flux. I will show you in detail in the coming slides I am showing you a table where I am showing you what are those total term capital F what is the flux term. So, in mass conservation the flux term is mass flux in x momentum x momentum flux not only x momentum flux but you also have stress in the x direction as well as pressure force in the x direction. In the y momentum other than the mass flow rate when you go to the analogous to mass flow rate when you go to the momentum what happens is net momentum there is a net momentum in flow and out flow. Professor Puranik had mentioned when he proposed this conservation law for momentum that there is a rate of change of momentum and there is a momentum source and the momentum source is basically generated by the forces. So, the total mass flux is represented by mass flow rate total momentum is represented by net in flow and out flow of the x momentum and total f is also represented by the force in the x direction here y momentum equation total f term is the y momentum rate net flux of the y momentum force in the y direction all these are flux term. In the energy the total f term is enthalpy rate net in flux or out flux of the enthalpy across the control volume and total heat gained by conduction and the flux terms are the enthalpy flux and the heat flux conduction heat flux. I will show this all in more detail with specific slides in the coming following slides. So, in the derivation of continuity equation what you basically do is now instead of the small f what I am showing you here small m what is the small m mass flow rate per unit area what is law of conservation of mass rate of change of mass note that here we apply this conservation law in a Eulerian framework. So, we divide the Lagrangian definition into two parts what is called as unsteady and directive component. So, here we I am defining saying that rate of change of mass of the fluid note this word inside and across. So, this is the unsteady part and this is what we call as the advective part and directive component. So, this across means when we do a balance we get what we call as rate of change of mass across the control volume. So, when you do the net in flux or net out flux this is the total mass which is coming in per unit time this is total mass which is going out of this control volume per unit time and when you balance across the control volume you get del by del x of m x del by del y of m y and this is what we call as rate of change of mass inside the control volume. So, this is your continuity equation I am not going to the detail because professor Puranic had shown you the derivation earlier also. So, that was about the continuity equation when you go to the I am I would like again to repeat that I am emphasizing this because this concepts will be use a lot infinite volume method. So, this is just to make sure that you understand it before we move on to the discretization process.