 I will show you pseudo code with proper looping. I am showing you the main part of the code I am not showing you the complete pseudo code. So, the main loops which are involved I am showing you it is just that you have to use a particular programming language and convert into the as per the language syntax. So, this pseudo code what I am showing right now is when you apply x momentum equation to obtain u velocity. In this slide I am showing you steps to predict u velocity. Now, to predict u velocity this is the expression to calculate the mass fluxes in the x direction this is the expression to calculate the mass fluxes in the y direction. Note that the to calculate mass flux in case of x momentum control volume you have to do linear interpolations. This are the expression to calculate the momentum flux in the x direction and momentum flux in the y direction. This is the expression to calculate the viscous force in the x direction on vertical faces which is a normal viscous stress. This is the expression to calculate the shear viscous stress in the x direction. Note the difference in the loop running in this is of the loop. Once you have calculated this fluxes then you know there is a step there is an expression where you do a balance multiply by delta v divided by and then add that with the velocity of the previous time step. You do calculate total advection which is the rate at which x momentum is lost by the fluid in the control volume. Let me see I think it is right now east face minus west face. So, this is x momentum lost by the fluid in the control volume this is the total viscous force acting in the x direction. So, now we are doing a balance and this is the total pressure force acting in the x direction. Note that for pressure in x momentum we are not doing any interpolations and finally, to predict u velocity. Similarly, we this is the adposing animation for this. This is the steps to calculate the fluxes momentum fluxes viscous forces viscous stresses in the x direction. This is in the y direction sorry the viscous stresses will be the shear viscous stress here and this will be the normal viscous stress, but both the viscous stress will be in the y direction. Because viscous force we have to take in y direction in y momentum equation. Once you have calculated this fluxes you calculate the total term do a balance and then predict the velocity. That completes the pseudo code for velocity prediction. First we predict fluxes and then we obtain then we predict velocities. Now, here I will show you expression to do mass balance. So, once we have predicted the velocities we use those velocities and calculate mass imbalance which is represented here as divergence net mass going out of the control volume mass source. This epsilon is what we call as practically 0 which a user has to define. If the mass source has become practically 0 then whatever velocity you have predicted is the correct velocity for the next time state and you can go for computation of temperature in case of force convection heat transfer problem. If it is not then you solve for pressure correction as a function of mass imbalance as shown here. You add the pressure correction to the earlier pressure and obtained a this is a basically a pressure tuning. You get an updated value of pressure and from an updated value of pressure you get an updated value of the velocities updated value of mass fluxes. And with that updated value of mass fluxes check again the mass imbalance. If mass imbalance is close to 0 then you are converged otherwise you keep doing keep doing pressure tuning new mass imbalance. So, this continues till convergence. Note here that even if you are using a semi explicit method in for unsteady formulation there is one loop for time marching where you will generate pictures at every different time step and you can create a movie for the velocity and temperature distribution. There is an inner loop also which is that inner loop this pressure tuning and mass updation mass flow rate updation. So, I will note that continuity equation as there is no explicit equation for pressure needs to be solved iteratively. And that is the biggest difficulty in computational fluid dynamics. This is for temperature at only the grid points at the cell center and face centers. This is to calculate the mass flux enthalpy flux and conduction heat flux in the x and y direction the pseudo code. This is to balance the net enthalpy lost by the fluid in the control volume total heat gained by conduction total heat gained by volumetric heat generation. So, this is the total heat gain you multiply by dt divided by rho Cp into volume. You get a value some temperature which you add with the temperature of the previous time step and obtain the temperature of the new time step. So, this staggered grid is one of the remedy it works well in the standard coordinate system problems. But when you go to the complex geometry we have to come up with another formulation which is called as collocated grid formulation. I would like to mention that nowadays one method which is becoming very popular which is the method which was the first method in the for CFD computation. So, one method which was which is a Cartian grid method which was probably the first method with which CFD started. Now, that method is again becoming popular nowadays because there is an issue that if you are solving industrial problem which is a very complex geometry three dimensional problems. And if you and nowadays there are more complex problem like moving boundary problems. Then after each time step when you have to regenerate the mesh like for flow across a car or an aeroplane mesh generation takes lot of computational time. If it is not moving then you generate mesh only, but just imagine it is a moving boundary problem then you generate have to generate that mesh after every time step. So, when you use this body fitted curving in your grid structured or unstructured it takes lot of time in mesh generation. So, one of the oldest method in CFD Cartian grid method is nowadays becoming popular due to this reason. However, if you are using Cartian grid for let us say flow across a car or aeroplane where the surface is curved solid surface is curved. Then you generate Cartian control volume where there are certain control volume which are partially filled by solid and by liquid. So, if in at formulation stage we are somehow able to handle the this partially filled cells by properly applying the boundary conditions at the solid fluid interface. Then it is a very promising option. There is another approach which is becoming quite popular which was called as adaptive multilevel Cartian grid method. Public towards the end of today's lecture I will show you we are working on developing that method. So, maybe I will show you an animation for that. So, I would like to say that maybe you see lot of unstructured grid or a Kelvinian grid for industrial problem, but right now here you are learning a Cartian grid method, but this method is coming is gaining lot of importance nowadays. Because in the Cartian grid method when there is a partially filled cells which we mentioned even if the object is moving what will change is that the partially filled change may next time let us say it can go in completely in solid or it can go completely in fluid. So, you may have new partially filled cells. So, you have to keep a tag of the cells which are being partially filled, but your grid Cartian grid does not change with respect to time. So, you do not have to do remachine and moreover generating body fitted grid in a let us say car or aeroplane versus generating Cartian grid which is not body fitted you can the computational time requirement for mesh generation there is a lot of difference this Cartian grid generation does not take almost any time. In this slide I am showing you as we are having pressure Poisson equation for pressure correction it is like a conduction equation. So, you need boundary condition at all the boundaries. So, in here I am showing you the boundary conditions for pressure correction and the boundaries where pressure is defined like an outflow if pressure is prescribed then the pressure corrections become 0. So, for any boundary where pressure is given pressure correction is 0 in most of the solid boundary in fact all the solid boundary you know there is one boundary condition which even comes from an inviscid flow mostly boundary condition comes from viscous flow what is the boundary condition even in inviscid flow normal velocity is equals to 0. So, in a solid boundary normal velocity correction is equals to 0 and if you go back and look into the expression for velocity corrections the way we have proposed if the normal velocity correction is equals to 0 what you will get is the normal gradient of pressure correction should be 0. So, in a solid boundary is your normal gradient of pressure correction is taken as 0 as a boundary condition. So, on the left boundary, right boundary and bottom boundary which are solid boundary normal gradient of pressure correction these are the discrete form of the normal gradient of pressure correction is equals to 0 on this stationary boundary is u and v are 0. So, that is what is shown here on the top boundary is when v is 0 and even if it is a top boundary it is a solid boundary. So, there is no velocity normal velocity will be 0. So, normal gradient of pressure correction is 0 here also. So, after starting with the finite volume method moving on to formulations for both semi explicit and semi implementation the semi explicit as well as semi implicit method then discussing the implementation details of the semi explicit method with pseudo codes finally, let me discuss the solution algorithm. The solution algorithm for semi explicit method is that we start with the user input which is common to all the solution algorithm discussed in the earlier lecture that is material property, thermo physical property, geometrical parameter, maximum number of control volumes in x and y directions what is the type of boundary conditions and what are the input corresponding to a boundary condition this epsilon which are two things here which is converges criteria as far as mass balance is concerned and it is a steadiness criteria for steady state. If you want to stop your computations then grid generation we calculate all the geometrical parameters delta t if you are using a semi explicit method I had mentioned that we do not have a one equation for the time step restriction in a semi explicit method in case of new stoke equation. We have one equation for pure conduction we have one equation for delta t as a function of delta x and delta y and u velocity and v velocity of the grid point for pure advection. So, for pure conduction and pure advection we have separate equations. So, we calculate one delta t for pure conduction pure diffusion in this case second time step for pure advection. So, we get two time step and we take the minimum of the two known that these are just as a guidelines they are not sufficient or guaranteed that they will work because this new stoke equation is not pure diffusion equation it is not pure advection equation it is the combination of the two, but we do not have we cannot do stability analysis for this non-linear equations. So, that way delta t is calculated I had discussed this in detail in the chapter of computational heat convection set the initial condition for phi which will be u velocity v velocity and temperature set the boundary condition. When you go for the next computation set the value as a old value then first taking this phi as u there will be one sub routine for advection flux diffusion flux u send phi is equals to u gamma is equals to dynamic viscosity c is equals to 1 calculate fluxes in the x and y directions using velocity of the previous time level calculate the total force acting in the x direction as a source term calculate total advection total diffusion and predict u velocity similarly do for v velocity. So, for v velocity repeat this step 7 to 10. So, with that you have predicted u velocity and v velocity and then you check how much is the mass imbalance if it is close to 0 then you have got the correct velocity. Otherwise calculate pressure correction as a function of mass imbalance add that pressure correction to the previous pressure and get an updated value of pressure. So, this is the pressure tuning which is happening once you get a new pressure then the mass flux correction then there is a velocity correction from which you can calculate the mass flux correction by which the mass flux predicted mass flux is updated when you update the predicted mass flux you get a new mass imbalance here note that you have to go back to step 2 and this step 12 to 15 continues till mass balance occur and then this predicted. So, once you have obeyed the mass balance the predicted star velocity which you have obtained that become the velocity for the next time step. Then you solve the energy equation if it is a force connection problem and you check for steady state otherwise go to step 5 and continue till steady state. So, after discussing all the formulation as I say that even if you use all this formulation implementation detail solution algorithm you will develop a product. What is that product? A CFD software, but to make it to a CFD software here what I am discussing is what are the main core things as far as fluid mechanics and heat transfer is concerned. To convert into full-fledged software you need other things also which are more related with the computer science aspects, but once you have developed the core of the which are related with fluid mechanics and heat transfer as far as programming is concerned you have to test it then only your product will be accepted by the people in the market. So, that is what is called as test problems or benchmark problems. So, yesterday in the lab session you have solved this problem. We have given you the product which is the code which is the set of programs and you have solved it for 4 different cases. First isothermal flow where there is no heat transfer everywhere temperature is ambient and then convective heat transfer problem 3 different types of convective heat transfer problem. Force convection which is a approximation what is the approximation in force convection? Buoyancy induced flow is negligible as compared to the force flow and in this case there is a one way coupling between the momentum and energy equation. Energy equation is anyway dependent on the flow, but the flow is not dependent on the heat transfer whereas, in case of mixed convection both fluid flow and the buoyancy induced flow are of comparable magnitude. In this case in the momentum equation there is a source term which is a function of temperature whereas, when you go to the natural convection the buoyancy induced flow is dominant. So, you have solved various problem corresponding to this force situations after the t break I will discuss this various problems one by one and before I end I would like to say that sorry you have to appear for the quiz yesterday twice due to some problem in the our server we sincerely apologize for the inconvenience. Many of you might be feeling that you had completed first time and you had to appear second time. This is just to we had certain issues as far as grading is concerned. So, that is that was the reason you had to go through the second time also as there were many questions there were total 45 questions and you have to and the questions were randomized and you have to solve 30 questions. So, probably when you had appeared for the second time at least few of the questions were new to you even if it was a repetition I hope you would have been refreshing or reemphasizing the concepts which you had learned. I hope that the quiz the problems in the quiz will help you in better understanding of what is been taught here. We are on the topic on solution of neostopic question on staggered grid. Now, we will discuss some test problems which you have attempted in yesterday's lab session. The objective of showing this is also because there were many requests from you that we should if we can highlight the research opportunities as well as aspects in computational fluid dynamics. So, as the primary objective of this workshop is on teaching. So, we would not be able to showcase whatever CFD research we are doing for that you can refer to our research paper from our websites. However, we would highlight certain aspects as far as research in CFD is concerned through this problems. There are two aspects of research in computational fluid dynamics CFD development where you come up with a new method for a particular heat transfer or fluid flow problem or improve an existing method. And the second aspect is of research in CFD is CFD analysis that is once you have developed a code for a software you run that for some problem you set up a problem set up a domain generate grid and then each problem has certain governing parameters. Note that in research we do non-dimensional analysis. So, there will be certain non-dimensional governing parameters and you might have noticed that in the four problems which you had solved in yesterday lab sessions the problem was proposed in a generic sense where there were certain things which was explained to you that what is code validation what is benchmarking. It was also mentioned the governing parameters which are involved in the various problems discussed here which will be discussed here was shown to you the Reynolds number Grashof number Prandtl number and yesterday lab session you had solved using non-dimensional analysis. So, each problem like flow across a cylinder if you consider what are the governing parameters what are the non-dimensional governing parameter for flow across a cylinder the non-dimensional governing parameter is Reynolds number. So, one of the CFD research as far as that problem is concerned is people vary that Reynolds number and then they try to see two things that the capture let us a CFD movies for velocity distribution, pressure distribution, water city distribution amidst the heat transfer problem temperature distribution and then try to have a physical understanding of the flow physics understanding of the flow physics you will get different types of flow structures. What is the role of this flow structures on the engineering parameters this is something which is always aimed at. So, any CFD studies which you do the overall objective the bigger objective is to study the nature or characteristics of the flow structures characteristics of the flow which is reflected by the flow structures and try to correlate because what happens is that depending upon the range of governing parameter you may get certain let us a reduction in drag force or increase in lift force. Now, the reason why that reduction or that increase is happening as a part of research we try to investigate the flow structure and the objective is to connect the flow structure to the reason why increase or decrease of engineering parameter is happening. So, the first problem which you had solved in yesterday's session was an isothermal flow problem lead driven cavity flow which I had explained in my earlier slides note that the characteristic length scale taken here is the size of the square cavity note that the length and height of the cavity is same the characteristic velocity in this problem is the velocity with which lead is moving in this problem there is only one length scale and only one velocity scale. So, it is easy to decide what is the characteristic length scale and characteristic velocity scale, but there are many problems or most of the problems in real world you find there are more than one length scale like if you take flow across a cylinder in a pipe or in a plane channel there are two length scale let us say diameter of the pipe and the size of the cylinder. Now, you when you take up that problem one confusion which is there is whether you should take the diameter of the cylinder as the characteristic length scale or diameter of the pipe as the characteristic length scale. So, in that case what you do is that you try to see whether the pipe is very far away from the cylinder then the diameter of the cylinder is a good characteristic length scale, but if the diameter of the pipe is slightly more than that of the cylinder then probably you should take the diameter of the pipe as the length scale and many times what we do is that we look into the research paper on that particular problem and from there we try to take an idea or guideline that what is the length scale he has used and accordingly once we are convinced we use that as a length scale or a velocity scale. Now, whenever you do a CFD analysis so, once you have developed a code tested a code you take up a problem and then you run your code and in general there are two types of results. First it is called as a qualitative results where we create movies for let us say velocity vectors, streamlines right now here what I will be showing you is the steady state profile. So, this pictures or if you create a movie that is animation this gives us qualitative information ok. Here I will show you the variation of u velocity along the vertical center line. Let me go to the previous slide and then discuss how is the nature of the flow in this case the lid is like a conveyor belt which is moving from left to right. So, the top wall is having a velocity u naught now that we had I had taken this example when I was discussing physical interpretation of kinematic viscosity where I talk about penetration depth where I said that if the depth of this cavity is infinite then this momentum is penetrated up to certain depth at certain time step. However, with increase in time that penetration depth increases and I had mentioned that penetration depth is directly proportional to square root of kinematic viscosity. So, the momentum is diffused or penetrated to the bottom layer and the fluid moves with the maximum velocity at the top at the corner it cannot go out. So, it turns when it turns it goes downward but there is a viscous resistance from the bottom fluid which is stationary. So, there is a second turn and you get a clockwise vortex. When there is a clockwise vortex in this there is this is called as a benchmark problem because whenever we develop our code we compare our results with an accurate experiment with an accurate experimental or numerical result. So, for this there is one result which is considered very accurate which is which was published by Gia and Xin and the results which they have given in a tabular form which we can use for comparison is the variation of u velocity on vertical center line. So, this is the vertical center line passing through the cavity. So, as you move from bottom to top what will be the direction of u velocity of course on the top portion it will be in the positive x direction because it will have we having the effect of this conveyor built and what will be the velocity at penetration depth at slowly this velocity will keep reducing and as you know that there is a clockwise vortex. So, on the bottom half the direction of the velocity will be negative. So, on the top portion you have a positive velocity and on the bottom portion as there is a clockwise vortex it will be negative. So, there is change in the direction of u velocity from positive to negative as you move from top to bottom in the vertical center line. Similarly, if you look into the variation of v velocity on horizontal center line. So, on horizontal center line when you have a clockwise vortex near to the left fall the direction of v velocity will be upward positive and near to the right fall the direction of the fluid will be downward. So, there is change in the velocity as you move from left to right on the horizontal center line for v velocity as initially the v velocity is positive then it becomes 0 and then it becomes negative. So, other than this plots we generate data from our in house code which we have developed through the formulation implementation detail solution algorithm discussed here and compare our result with the published result. Right now the result is shown for 3 different grid size note that in yesterday lab session you had solved the problem on a very coarse grid size. This is just so that you should not feel that it is taking 2 time and you become impatient we have given you a grid size. So, that you get a quick result, but in that lab sheet I had written that if you want a very accurate solution you have to be patient and you have to keep running the code for a long time. Maybe you can start the code even in the night before sleeping and you can watch the result after in the morning. So, it may take as large as time as this note that the psi lab the program we had written in psi lab one of the primary objective is that this is an open source software first and second it is easy to go through the programs in psi lab it is almost like a pseudo code. The programming language in fact is very easy and in fact it is very easy whenever you run the psi lab the psi lab is very much similar to the commercial software MATLAB and it is not only easy to program actually here one good thing is that you do not have to declare variables it automatically takes the size of the variables like in photon or C you have to declare whether it is an integer or real whether it is a single precision or double precision you have to declare the size of the variable if it is a matrix. So, all those things you do not have to do in this programming language so with this psi lab you can understand the program. However, as compared to the conventional programming language like C and FORTRAN I would tell you if you develop the same program in C or FORTRAN it will take less computational time as compared to the psi lab code the reason being this psi lab the way it runs the code is that it does not creates an executable files and every time it loads all the variables and runs in each iteration so it takes more computational time. However, the objective was to get you started as far as programming is concerned and we believe that you should be able to convert the psi lab code into let us say C C plus plus or FORTRAN whichever language you want to convert to and in fact one another good thing about this psi lab is that when you are developing a program like if you want to if your result is not coming what you do is that you try to insert print statement in between the lines in the program you have to insert write statement in the C language and FORTRAN language to print some variable but here in psi lab you do not have to do that you just have to write the name of the variable in the command window because once this is run all the variable is stored in its memory so that is why it takes more computational time as compared to C program or FORTRAN program for the same method whether it is a conduction, advection, convection or navistoke. So there are certain disadvantage of whether you use a psi lab or MATLAB versus C program or FORTRAN program but we felt that right now our objective is to make you understand taking some simple CFD problems so that is why we decided that you will develop program in psi lab another good thing is that we had a problem that if we had given you code in C or FORTRAN then you need another software for plotting otherwise we have to develop the graphical user interface in our program which is more of a computer science job which we normally do not do so that way we decided this psi lab is another good thing is that it has its own inbuilt graphics so that way we decided upon this now this is the steady state result. Now what are the things which you are seeing in this figure there is a color, there is a white line and there are arrows there are three things what does the color represents? Color represents flooded contour of steam function line represents stream lines along with their values and the arrows represents which is what is called as vector plot what is this vector plot? Once you let us suppose you have obtained the steady state velocity distribution you let us suppose you have 100 points in the domain so you get 100 u velocity 100 v velocity and corresponding to those point there is some x coordinate y coordinate so you have 100 x coordinate 100 y coordinate 100 u velocities and 100 v velocity this is the numbers you have got which you have stored in a data structure matrix. Now what you do is that you take this data to a plotting software like if you are in psi lab as when you run it stores in the memory it is already there in the memory so in the program if you use a plot command it plots it otherwise if you are using a program C or FORTRAN as a programming language and if you have not developed graphical user interface then you store this data in a data structure which is required by a particular graphical software and then you take it to that software plot it and then visualize the result. So with that data when there is a velocity distribution what vector plot represent is that at different grid points if there are 100 points corresponding to those 100 points when you talk of velocity it is a vector quantity and vector we represent by some magnitude direction and sense. So what this software graphical software does is that it does some scaling okay maybe let us say the maximum value of the data maximum value of the resultant velocity it does a scaling let us suppose that will be represented by 1 centimeter and with that relative scaling depending upon the magnitude of the resultant velocity it creates a length of this vector and as each point not only we have magnitude we can calculate the orientation of the vector also. So the software does that also and then draws the at each grid point vectors that is what is shown in this vector plot many a time this vector plot if you draw you do not get a good feel of the flow structure most of the time you get an idea that okay at some location the velocity is low here you can say that the velocity is low in the bottom region velocity is high in the top region but as far as the overall idea about the vortex formations many a time you have a very fine grid and this vectors fills the region completely this arrows overlap over each other in space. So it becomes very difficult to understand so that is why in fluid dynamics a CFD one picture or one movie is not sufficient to give us the complete story about what is happening to the fluid flow. So if you want to know if you want to understand the vortex it is better to draw the stream lines for that what we do is that we post process this velocity information because you know what is the relationship between a stream function and a velocity like u is equals to del psi by del y. So what we do is that we do a numerical differentiation and we express psi 2 minus psi 1 is equals to once you know the velocity you do the numerical differentiation and you can calculate the stream function values at different normally the way we do is that we calculate if either velocity are defined at the centroid of the control volume then we calculate the stream function at the phases of the control volume phase centers of the control volume once you have so stream functions are calculated by a method which is called as post processing. So once we have got the converge let us say study state solution then we used the discrete form of the expression for stream function as a function of velocity gradient and we calculate let us see if there are 100 point we calculate the stream function values and then once we have got that data we take it to a software and we use a command what is called as contour command and then we get the stream lines. So this is the way it is drawn so from the stream lines one thing which you can see is that there is a although the stream line is not showing you the direction whether it is a clockwise vortex or is an anticlockwise vortex that you get from vector plot. So some information is given by the velocity in for vectors some other information is given by the stream line. The story about the characteristics of the flow we get different stories or different aspects of the characteristics with different types of plot this is what you can understand and appreciate through this figure. Right now I am showing you for a particular problem but this is applicable what I am discussing is quite generic in nature and this is applicable to any CFD problem when you are doing a CFD analysis note that you can use a CFD software or CFD code which you have developed you can know what are the governing parameter like in this case I can say the Rinal number is the governing parameter note that in earlier in the lab session we had told you to run the code on to Rinal number. So like a so if you want to do a research you can keep increasing the Rinal number from 100 to 400 to 1000 and you can what you will slowly see is that the size of this here you will see there is a corner vortex which is formed the size of this corner vortex will keep on increasing with the increase in the size of the Rinal number. So with the increase in the governing parameter you see that change there is a change in the flow structure now this change in the flow structure has a creates its effect on the engineering parameters like what is the engineering parameter in this problem wall shear stress near to the bottom wall top wall or let us say top like if there is a conveyor belt there is some energy which is spent in moving this conveyor belt and there is a resistance there is a viscous force which is opposing its motion. So let us say there is an engineering parameter that how much energy needs to be spent to move the conveyor belt and as you increase the Rinal number the velocity gradient near to the wall of the conveyor belt will increase so the shear resistance will increase. So that is the engineering parameter in this problem note that this engineering parameter varies from problem to problem like flow across an aeroplane it is a lift force and drag force which is there for most of the external flow problem and for most of the internal flow problem the wall shear stress whose non dimensional representation is a skin friction coefficient is an engineering parameter. Also when you have an open domain internal flow pressure drop is an important engineering parameter okay all this engineering parameter are obtained once you have obtained a convert solution of the velocities and pressure distribution by doing numerical differentiation to calculate the local values like at the wall if I want to calculate the wall shear stress analogously we had calculated the local heat flux at the boundary grid points in case of conduction problem. So to calculate local heat flux at the boundary grid point or local wall shear stress at the boundary grid point you have to do numerical differentiation because heat flux and wall shear stress are expressed by Fourier law of heat conduction and Newton law of viscosity where they are expressed in terms of gradients of temperature and velocity respectively. Now here you are having number which are discrete and although the expression is a differential expression you have here you have to do numerical differentiation. Now when you want to calculate total shear force let us say in this case or total heat gained by conduction from a particular wall when you want to calculate total value then you know that you have to do integration and as the data here is discrete you have to do numerical integration. So in a numerical method course it is a good idea that when you are teaching a topic on numerical differentiation or numerical integration you take example from fluid mechanics and heat transfer. In fact here we have two courses first course which we call as computational methods in thermal and fluid engineering where we teach all this numerical differentiation, numerical integration solution of linear algebraic equations on the first half of the course. In the second half of the course we teach complete finite difference method applied to starting from pure conduction and then moving on to steam function vorticity formulation and even near stoke equation on staggered grid. And we have a second course which we call as computational fluid flow and heat transfer computational fluid dynamics and heat transfer where we teach finite volume method. So whatever I have taught here it constitute approximately 40 to 50 percent of that course and another 50 percent consist of solution of near stoke equation on a collocated grid complex geometry formulation grid generation. So this is the figure showing the results so the using all the details which have been discussed earlier code is developed and that code is run on three different grid sizes. Here right now variation of u velocity on vertical centre line is shown you can see on the bottom half u is negative and on the top half u is positive as per our expectation. Grid line represent the results obtained on a grid size of 11 by 11, green line on a grid size of 31 by 31 and blue line on a grid size of 15 by 15. Now what the purpose of this figure is to show you that as many of you are asking question that how do we know that what is the grid sufficient grid. As each fluid dynamics problem has its own action I had answer that we do not know how much grid is enough because that enough word is a relative word. I had given an analogy that let us suppose you want to capture some phenomena which is changing with respect to time. So let us say water flowing in a river versus let us suppose an explosion now to capture if you want to create a movie you need a video camera which is a very fine very large frame rate to capture the details of the explosion how the shock is generated during explosion. Whereas, even with a normal camera you can at least pictorially get the flow of water in a river. So analogously here each fluid flow situation has its own action. So how much frame rate you need how much pixel or resolution or grid size you need for a particular problem you do not know a priori most of the time. You try to take guidance from the published literature where someone has done earlier taken the same problem although he may have done for some other governing parameter. So you can get guideline from the previous published results but you have to do this exercise to convince people that the results which you have obtained is accurate enough. Note that in a research paper code validation even if you are using a software the people who have developed the software they might have validated but when you are using you have to show that you are using the software correctly. So even if you are using a software and you are doing a CFD analysis if you want to publish your result in an international general conference there are two very important things which you have to show to convince people in your result. First is code validation which I am showing you in this slide and second is grid independence which also I am showing through this slide. So both the things I am showing through this slide. So here what is meant by grid independence is that as you refine the grid it can be seen that the difference between the results between 31 by 31 is large and the difference is negligible between 31 by 31 and 51 by 51. So you can write down that 31 by 31 is small enough to obtain the results which are accurate enough and obtain the result which is called as grid independence solution. This black circle are the results which have been taken from a research paper which is commonly used for code validation and you can see that the blue and green line are lying almost on the top of it. So this way you can convince people that you have got an accurate, your code is giving accurate results and if you are using a software you have to convince that you are using the software correctly because this software usage there is lot of things which requires understanding. As I had mentioned that for flow across a car and a rail plane if you take the size of the external size of there are two boundary for such case inner boundary which is covering the surface of car or a rail plane and outer boundary which is the far field boundary. Now if your far field boundary is too small then the effect of boundary condition from the far field will distort the result near to the solid boundary. So you also have to show domain size independent study in that case. So these are some of the things which comes because as you know theory is something which nobody believes except the person proposing the theory and CFD is of course a theoretical method. So these are all the things which we do like grid independence, code validation, domain independent study if it is a transient problem, time step independent study also to convince people that whatever results you are obtaining is accurate enough. Once you have convinced then you can start with two aspects of the study. First is the scientific aspects where you look into the pictures or create movies for the flow and try to have a qualitative description of the characteristics of the flow, quantify the structures of the flow and then you second aspect is you do a quantitative analysis where you plot results which I will show for this problem in the next slides. In this figure what I am showing you is the code validation but here it is a variation of v velocity on the horizontal center line. Now here again you can see that the result obtained by 11 by 11 grid, the difference between the result on 11 by 11 and 31 by 31 is large whereas the difference between this blue and the green which is obtained on 51 by 51 and 31 by 31 is less. So this shows that as you refined the grid there is a change in the result but the change is asymptotic in nature. What is in asymptotic? Note what is the difference between 11 by 11 and 31 by 31, 20 is the difference in the so 20 nodes you are increasing in the x direction when you change from 11 to 31. When you change from 31 to 51 again you are changing the 20 nodes but the change in the results which you see initially there is a large change and that change slowly dies down as you refine the grid. So the difference asymptotes so that is the nature of which of the grid refinement. So the change should be monotonic and it should asymptote. So that was about the qualitative analysis. There is a second aspect of the study which is called as quantitative analysis. So CFD has two types of analysis, qualitative analysis and quantitative analysis. Qualitative analysis we write which results which we use for qualitative analysis, pictures or movies of the flow field and in quantitative which results which we discuss we discuss engineering parameters. Like in this case variation of skin friction coefficient, the skin friction coefficient is non-dimensional wall shear stress. It is expressed as tau w divided by half rho u0 square u0 is the lead velocity. So variation of local skin friction coefficient along the different poles of the cavity at 52 by 52 grid is shown here. Variation of mean skin friction coefficient on different walls of the cavity. So this is the local value, this is the mean value. Next slide shows you the local value. This is the non-dimensional wall shear stress variation on the left wall. The green line represent the same parameter on the right wall. You can correlate that why this is positive and why this is negative by carefully looking into the direction of the velocity near to the respective walls. Now on different grid sizes, this corresponds to the grid size of 12 by 12 where delta x is 0.1, the domain size is 1, so 1 divided by 10 it is 0.1. This is the grid size for 1, 32 by 32, so 1 divided by 30 is this. So the grid size means delta x which is also equal to delta y for the present problem. So as you refine the grid, what you see is that there is a change in the results. So here again we expect that the change in the results should asymptote. That was for as an isothermal flow, there had shown a much more details of the result. In the other problem I will just show you the physical description of the problem and the mathematical equations. I will not discuss the results for the remaining problem. So here the problem which I had discussed earlier was isothermal flow. It is the same problem, now the difference is left wall, bottom wall and top wall the boundary condition is that they are maintained at a temperature which is less than the that of the hot wall, the top wall is hot as compared to the other walls, constant wall temperature. Now in this case note that you have a force flow, why there is a force flow which is created by due to the motion of this lead. If this lead is stationary then it becomes a natural connection problem. As this lead is moving, if it is moving with very large velocity and if the temperature difference is small then it can you can even neglect the buoyancy induced flow and it will become a force connection it becomes a problem. Whereas if the temperature difference is large buoyancy effects will be more and if there are not number is also large both effects will be cannot be neglected and then it becomes a mixed connection problem. Whereas if the wall this lead is stationary then the force flow you do not have any force flow and then you have only buoyancy induced flow then it becomes a natural connection problem. So, for this case which is a force or mixed connection it transfer problem where we are having lead which is having non-zero velocity this is the governing equation for which you have been given the lab sheet. So note that here in this case what is the diffusion coefficient 1 divided by a non-number for momentum equation and what is the diffusion coefficient for energy equation 1 divided by a non-number into Prandtl number. What is the body force term when it is a mixed connection problem? Note that here momentum equation has a temperature term so now it has become two way coupling. Velocity depends on temperature temperature anyway depends upon the velocity. In force connection case this is close to 0 so I think in your lab sheet you have to solve one case where Grashev number is 0. Grashev number is 0 means this term 0 then it becomes a force connection it transfer problem and for non-zero values of Grashev number then it becomes a mixed connection it transfer problem. And these are the expression Reynolds number is ratio of inertia force to viscous force Grashev number that of buoyancy force and viscous force. You also have a Prandtl number as a non-dimensional governing parameter. So if you want to study this problem you have let us say three tuning parameter. What are those three tuning parameter? How do we decide that how many parameters we have by looking into this non-dimensional equation and non-dimensional governing parameter? Note that there are two types of parameter governing parameter and engineering parameter. Engineering parameter is an input parameter engineering parameter is an output parameter. So Reynolds number is one non-dimensional governing parameter Grashev number is a second and Prandtl number is the third governing parameter. So if you want to do a detailed investigation you need to vary the Reynolds number, Prandtl number and Grashev number and you can do a detailed scientific as well as engineering study analyzing the qualitatively and quantitatively. Now here there is no lead, top wall is also stationary. Now this has become a natural conduction heat transfer problem and the boundary condition which has been given is top wall and bottom wall there is a constant heat flex. Left wall is at hot temperature is more as compared to the right wall. Now note that in earlier case actually I had not written here non-dimensional temperature but this is mostly defined as T minus T H divided by T minus T H divided by T C minus T H. You can define in different ways the two ways is that in one case you will get a non-dimensional value of temperature as one on the top wall hot wall and zero on the cold wall. You can define in another way also where you can get one in the cold wall and zero in the hot wall. Now here the non-dimensional in natural convection as lead velocity, lead is not moving all walls are stationary there is no characteristic velocity as far as the problem is concerned. So in this problem we have defined characteristic velocity as alpha divided by L. What is alpha? Thermal diffusivity and the length scale is the length of the plate and in this case when you do non-dimensionalization considering this as the non-dimensional velocity you end up with this non-dimensional equation and in this non-dimensional equation the non-dimensional governing parameters are two parameters one is Rayleigh number and second is Prandtl number. So with this I had come to the end of this topic.