This is the last lecture session of this workshop and the last topic is solution of Neyvistok equation on a collocated grid. Let me first discuss what was the motivation of this development. In the previous topic I discussed staggered grid method. That staggered grid method when people tried to solve the complex geometry problem on a curvilinear structured grid or unstructured grid, it was almost impossible to stagger the grid and keep account of the neighbor. So that was the motivation for a development where people wanted to handle this pressure velocity decoupling where all the variable grid points are at the same location. So there is a method which is called as the momentum interpolation. So there is a mathematical procedure which was proposed and which works well. But in staggered grid there was a, you can understand and appreciated that in staggered grid we avoided certain interpolations, then linear interpolations to be more specific. What linear interpolations we avoided? Whenever we are calculating mass fluxes for the mass conservation and energy conservation we avoided interpolation of mass fluxes. We avoided interpolation of pressure at the phases of the control volume. So it was thought let us try to use collocated grid and let us try to avoid this interpolation. What finally came up is that they avoided pressure interpolations and for mass they are doing some interpolation but not linear interpolation which they called as momentum interpolation because that interpolation is done by taking the predicted values from the momentum equations. I will start with the introduction, move on to finite volume method. Then I will discuss the semi-explicit method formulation, implementation detail solution algorithm and finally I will discuss isothermal as well as non-isothermal forced mixed and natural convection batch back problems. So this is the grid points for all the variables. Yellow circle representing the interior point and the blue circles representing the boundary points. This is a typical computational stencil and discusses earlier when I started the staggered grid that if you do linear interpolation of pressure at the phases you find that to calculate the velocity at the particular grid point you get expression where the pressure of that cell is not involved. So that is what is called as breakage in the commutation between the velocity and pressure of the same cell. This is called as pressure velocity decoupling. Similarly for calculating mass fluxes at the phases if you do linear interpolation for the normal velocity you get expression where the velocity of that grid point disappears. I will not discuss in detail the finite volume method for collocated grid because I had a separate topic which I discussed yesterday after the lab session. So that whatever I discussed there that was on a collocated grid finite volume method the same is used here but just I will discuss that in 3, 4 slides for revision. So this is the way we discretize the continuity equation. This is the way we discretize the momentum equation. This is the rate of change of x momentum inside and across the control volume. This is the viscous force in the x direction. This is the pressure force in the x direction. Similarly this is for the y momentum equation and this is for the energy equation. Now I will discuss collocated grid I will discuss here staggered grid I discussed both semi explicit and semi implicit method. For collocated I will discuss only the semi explicit method in detail and we are talking of solution methodology. So once we do a formulation then we need to develop a step by step procedure to solve and in the solution methodology in the last lecture you might have seen the way we proceed is that there is an original proposition and in an explicit method the original proposition is that pressure we need to take as implicit and all other terms are taken as explicit. Then we basically follow a predictor character method where in the predictor step what we do is that we take the pressure at old time level instead of new time level and the velocity which we get does not obey the mass conservation that we call as the predicted velocities. Here in the collocated grid details will follow but what we basically do is that we not only predict velocities at cell centers but we also predict mass fluxes or normal velocity at the face center using momentum interpolation to avoid pressure velocity decoupling. This will be clear after few slides. So what I am telling I would like to point out that basically here we are not doing linear interpolation for mass flux but we are doing some other interpolation which is called as nonlinear interpolation and named as momentum interpolation. In the character step here we will follow the pressure correction approach. We do pressure correction and calculate the updated value of pressure at cell center. We do mass flux correction at the face center and velocity correction at the cell center. I would like to point out that we predict and correct two variables. What are those we predict note that here we predict as well as correct velocities at the cell center and mass fluxes at the face center. So the original proposition is given in the slide. This is the original proposition where the pressure is taken implicit. This is for the x momentum u velocity, y momentum v velocity and this is the predictor step for the u velocity. Predictor step I am writing in this is the full expression for prediction but what I am saying is that let me break into two different parts. What is the first part? This first part I am noting as tilde velocity which we call as the provisional velocity. This part is basically not considering the pressure term. What I am saying is that when we are predicting that star velocity let us break into two term. One which is so excluding pressure the combination of this you can see u tilde as equals to upn plus delta t divided by rho delta vp total diffusion minus total adduction from the previous time level. Is this clear? Why we are taking this is because this tilde velocity later on we will be using in momentum interpolation. So in the prediction in staggered grid we were taking only star. There was no tilde velocity. Here what we are doing is that we are using the same expression but we are taking it into two terms. Non-pressure term and the pressure term. Similarly we do for v velocity.  Is that clear? Now before I go into this let me discuss first few things. That here we not only predict velocities at cell center but we also predict which we were not doing earlier. Here we also predict mass fluxes at face center. So let us suppose this staggered grid I am showing you for understanding. Later on as far as the numerical implementation goes we do not do anything of staggered grid. But if you want to understand momentum interpolation I had found that if I take the help of staggered grid understanding becomes easy. So what I am showing you in this figure is this was the grid point and this is the staggered grid point for at the west face. Staggered grid right now is shown only for understanding. Later on I will show you that when we finally get those expressions. The expressions are such that the geometrical parameters of the staggered grid are not involved. So let us take a staggered grid. So what I am saying is that if I want to calculate mass flow rate at the west face then I need a controlled volume staggered control volume where that west face center is sitting at the centroid. So this is my collocated grid and this is my staggered grid. This I am showing you only for description understanding this momentum interpolation. So the idea which is used here is that let us suppose for this staggered grid I write down the discrete form of predictor step. In the earlier slide when I was predicting this star I had subscript p because p was where the yellow circle was sitting. Now I want to do this at here at east face center. So wherever I had p I had written small e. Is that clear? Now here again what I do is that I break into two part tilde velocity and the pressure component. Now this tilde velocity I have already calculated this tilde velocity using the yellow circle values. So this tilde velocity at green squares is obtained by using the tilde velocity at the yellow circle values of the neighbor by linear interpolation. This is what is called as momentum interpolation and the good thing is that actually this u tilde e requires all the geometrical parameters for the staggered grid which we are avoiding by doing the linear interpolation of this u tilde from the neighboring cell center value. But the good thing about this because this is this face center velocity will finally be used to calculate the mass flux at the east face center and the good thing is that to calculate the mass flux the pressure which you are using there is no interpolation used for that. Is this correct? Because this pressures are not interpolated pressures but what is interpolated is non-pressure component and when you do interpolation of the non-pressure component you avoid using the geometrical parameters of the staggered grid. Actually it is not a staggered grid but this is I had shown staggered grid just to explain what is momentum interpolation taking some idea from the staggered grid. Any question on this? Whether you are able to understand and appreciate that I am explaining using the staggered grid but actually when you implement in the code there is no parameter because what parameter basically you get this u tilde for the cell center you had already calculated for the staggered grid if you feel this is the parameter which is needed geometrical parameter delta x e which is just the distance between the two cell center neighboring cell center that anyway you calculate that is not that is not you can call it as a geometrical parameter corresponding to the staggered grid. So the non-zero non-pressure component that tilde velocity we calculate by linear interpolation and this is what is called as momentum interpolation. With this finally we get the prediction of mass fluxes which involves no interpolation of the pressure at the phase center. We do this for mass flux we have to predict on all four phases I had shown you for east phases we do the same thing for west phases also. So this tilde velocity on west phase center is computed by linear interpolation from the west and P neighbors. So we predict u velocity at cell center v velocity at cell center mass flux on the east phase mass flux on the west phase mass flux on the north phase and mass flux on the south phase and note that while predicting the mass fluxes we are avoiding the interpolation of pressures at the phase center. Although we are avoiding interpolation for pressure but we are doing linear interpolation for tilde velocity and that is what is called as momentum interpolation because this pressure interpolation was causing pressure velocity decoupling and that is what is being avoided here. So with this the mass fluxes which are predicted this predicted mass fluxes are used in continuity equation. So if you go back to the animation which I had shown you where I talked about the philosophy of pressure correction you have certain pressure distribution from which certain mass flux are predicted where I showed in the first slide 1 kg per second 2 kg per second. So with this expression you can say that you obtained the predicted mass fluxes but this predicted mass fluxes what happens to the mass conservation? They obey mass conservation? No they do not obey. So we need a corrector step. Now we will go to corrector step. Note that we had done prediction for velocity as well as mass fluxes and we need to do correction for both the variables velocity as well as mass fluxes. What is the procedure? We are basically first equation as original proposition, second equation for prediction and the third equation correction we get by subtracting the two equations. If you subtract the two equations you get a so if you want velocity correction for cell center you go to the original proposition for the cell center and the predicted and subtract the two and you get an equation for velocity correction. This is the equation for velocity correction as a function of pressure correction. Note that these are the velocity corrections at the cell center. We will need velocity corrections or mass flux correction at the phase center also. However I had pointed out here that when you are calculating the velocity corrections at cell center the pressure corrections at the phases they are calculated by linear interpolation for the pressure correction. Now we will last slide was velocity correction. Now this is mass flux correction. So for the mass flux correction we had u e n plus 1 equation u e star equation in the earlier slide. If you subtract the two you get an equation for velocity corrections at the phase centers in terms of cell centers at pressure correction. Note that when you were predicting the velocity correction at cell center for the pressure you had to do linear interpolation. So velocity correction at cell center demands linear interpolation. But when you do mass flux correction because basically this velocity when you multiply by rho what is this? This is mass flux correction on the east phase. This is the mass flux rho multiplied by this is the mass flux correction on the west phase. And in this you see on the right hand side there is no need to do any interpolation. So that way you are avoiding interpolation for pressure in the mass flux prediction as well as mass flux correction. Although you are doing linear interpolation for tilde velocities and linear interpolation for pressure correction when you calculate velocity correction at cell center. Similarly you can obtain velocity corrections on the other two phases and what is the expression? If you multiply this this is a I had written it in a general form. You can write mass flux correction is goes to minus del t normal gradient of pressure correction at the phase center. This is a general expression which is applicable to all the four phases. This equation is similar to with equation. Symbolically this is similar to what? Any heat transfer any fluid flow equation some equation you have studied. This equation is similar to what type of equation? Minus k del t by del n. And what is analogous to k here? Delta t. And what is analogous to temperature here? Pressure correction. That is why this equation later on becomes when you substitute in the continuity equation this becomes similar to steady state heat conduction equation where I had mentioned in the previous lecture that this delta t acts like a conductivity. So we have completed correction step where I had shown you expression for velocity correction and mass flux correction at all the four phases. Velocity correction for you as well as we had the cell center. Interpretation of the situation. You can draw analogy but so this is the equation which I had shown you earlier and I will again repeat here that this equation actually all that written on the left hand side u n plus 1 but is strictly speaking this is u star. This is the new value of u star using the old value of star plus velocity correction and this is done iteratively.  So once you have I had shown you expression for velocity correction at cell center and I had also shown you expression for mass flux prediction and mass flux correction. Whatever saying is written here the pressure and velocity correction is continued iteratively till the divergence free velocity field is obtained then only the right hand side of the above equation becomes the velocity and pressure for the next time state. This right hand side becomes the correct value only if the left hand side obeys the continuity equation. So the derivation of the pressure correction equation from the continuity equation is similar to what I had discussed in the previous topic on staggered grid.  We already have equation for m prime. I had shown you this is analogous to heat conduction. What is the expression for m prime minus delta t del p prime by del eta del n. So if you substitute that expression delta t del p prime by del n negative of that you get an equation like this. Again this is basically the discrete representation of the equation which I had shown in the morning this equation. This equation discrete representation is this equation and here I had shown some super script also. So let us suppose if you are using a Gauss-Seidel iteration then what happens is that the way you scroll let us suppose you are scrolling from the bottom left corner then you always have a situation that the west neighbor and the south neighbor are updated values. When you do a Gauss-Seidel iteration and if you are scrolling because in iterative solution what you do is that you mark you scan the grid points. So let us suppose you have 5 by 5 grid points. So you start from bottom left corner let us say i is equals to 1, j is equals to 1 then you move from left to right at j is equals to 1 for all i then j is equals to 2 then j is equals to 3. So this way you basically scan the points whenever you are using this Gauss-Seidel with scanning this type of scanning you always know that west and south are updated values so that is why their iterations in Gauss-Seidel are updated ones and that for north and east is the old iterative value. So using the Gauss-Seidel iteration and with a mass source on the right hand side this is solved iteratively till convergence and once this is converged here it is suggested that in some problems you may have to even use the under relaxation. So this is the total mass source denoted by m star plus m prime actually what is done is that many times this pressure Poisson any Poisson equation or a Laplace equation can be converted into a form which is called as the residual form of the equation. So here what I am showing is different from what I discussed in the previous lecture for solving the pressure correction equation here what we do is that we actually solve the pressure correction Poisson equation in a residual form. So this is converted into a residual form where this r is m star plus m prime and the m prime is given by this expression. So we convert this pressure correction Poisson equation into a residual form and this is what we do we do Gauss-Seidel using this expression where this r is expressed in this form okay and this coefficient Ap is given as this. So we solve the pressure correction Poisson equation till converges then whatever pressure correction we get that pressure correction we use to obtain the mass flux correction and add it to the predicted mass fluxes we calculate velocity correction set cell center. So the procedure is like this you take the pressure of the whole time level velocities pressure of the whole time level you predict the velocities at cell center mass fluxes at phase center then you obtain this then you will obtain this predicted mass flux and then you can obtain the mass flux correction and the residue then you solve this equation till convergence when the r approaches 0 then the pressure corrections which you get you calculate velocity correction at cell center mass flux correction at the phase centers add it to the predicted value to get the true value of the velocities at cell center and mass fluxes at the phase center. So note that here you get two solutions one at the cell center and one at the phase center I would like to point out the implementation detail that you need mass flux in continuity as well as transport equation because mass flux comes as an advection term in the transport equation and for mass flux what we are doing what interpolation we are doing we are calling it as a momentum interpolation and what is this basic momentum interpolation it is a linear interpolation of the tilde velocities or the provisional velocities and it uses the adjacent center values for the pressure for pressure we are avoiding any interpolation. So here I am showing you what are the different interpolations you do. So first is interpolations for mass flux momentum interpolation in the transport equation for the advected variable you use an advection scheme which is an extrapolation or interpolation procedure to calculate normal gradient in the diffusion term we use central difference scheme note that we not only need to calculate gradient to calculate the viscous stresses or heat gain by conduction but we also need to calculate normal gradient where we need to calculate when we want to calculate mass flux correction because mass flux correction I had shown that it is analogous to Fourier law of heat conduction minus delta t del p prime by del n to calculate mass flux correction also we need to calculate normal gradient then for that we use a central difference scheme. When you are predicting velocities at cell center the pressure which comes into the expression you calculate by linear interpolation but when you are predicting mass fluxes you do not need to do any interpolation for pressure. So this pressure interpolation is needed only for the prediction of cell center velocity not the base center mass flux you do linear interpolation for pressure correction in the velocity correction I am just emphasizing it here but if you go back to the slides you will see that I am specifically pointing out this interpolation but this I am writing at one place normal gradient of pressure correction in the mass flow rate correction and the pressure correction equation uses central difference this I had mentioned already. So this way I wanted to emphasize the different types of interpolations or extra interpolations which we use in this method. Now I will show you the pseudo code so here these are the great points not only for pressure but also for u velocity and v velocity these are the great points where we will calculate the fluxes in the x direction mass fluxes adduction fluxes diffusion fluxes these are the boundary points these are the points where we will calculate the fluxes in the y direction note that we need to calculate fluxes not only inside but at the boundary also and the way we are the convention which we are following as far as the running indices is concerned we do not want to use different running indices for the fluxes and the cell centers we use a convention where the for the fluxes the running indices corresponds to the flux if it is lying on the positive phase then the running is this j, i same as this similarly in the y direction this convention I had shown you earlier we have been consistently using it from conduction adduction convection so the pseudo code is in fact this is the loop to calculate qx this was the loop to calculate the enthalpy flux in adduction the same loop ij loop is same this is basically scrolling all the vertical phase center here to calculate the adduction flux diffusion flux and finally to predict the so here I am showing you how to predict the mass fluxes at the phase center in the x direction this is a loop to predict the mass fluxes in the y direction note that here we are using this how we calculate this is calculated this tilde velocity is calculated may be I am not showing you here the procedure to calculate the tilde velocity and we do the linear interpretation of tilde velocity and this source which I am showing here is the basically the normal gradient of the pressure del p by del x minus delta t del p by del x is this second term here I am showing you basically the momentum interpolation let us suppose you have predicted the cell center velocity that way you know always what is this u tilde and then use that u tilde to predict the mass flux at the phase center this slide should have been before what happens actually when you look into the solution algorithm although it seems that this slide should come little later but actually in solution algorithm the way it happens is that we first need mass flux then we predict the cell center velocity so the solution algorithm demands that first we should predict mass flux that is why I am showing it before but you may be wondering that what will be this ut and vt actually when we are giving the boundary conditions initial condition and boundary conditions we not only give for u and v but we give it for u tilde and v tilde also so when we are doing the first time marching this comes out from that initial condition and boundary condition is that clear that is why this slide is before the velocity prediction so note that the sequence is first we predict the mass fluxes and then we predict the cell center velocities and as we when we predict the cell center velocities we calculate total adhesion total diffusion source term which consists of consist of pressure gradient volumetric heat generation and then first we calculate the tilde velocities and then use the tilde velocity along with the pressure component to predict the cell center velocity so that completes the prediction what was the sequence first we predicted mass fluxes then we predicted cell center velocity now the next step is correction when the correction we take the predicted mass fluxes do a balance and obtain the divergence and if it is less than the converges criteria it means mass balance is offering and then you can go back go and solve the temperature equation if it is a non-nose thermal flow otherwise you obtain the new pressure correction using the residual form of the pressure correction equation and then actually here I had written a short form actually here for loop is used for the cell center actually this ij i from varying from 2 to ix minus 1 j varying from 2 to this jx minus 1 this loop is used to predict the mass imbalance then the same loop is used to solve this and then the same loop is used to update the value of the predicted mass fluxes and this updated value of mass fluxes results in new mass imbalance new pressure correction and this goes on so this is the correction step as I said although in the expression I have written m n plus 1 is equals to m star plus m prime but actually this is the new value of m star is equals to old value of m star plus m prime and this new value becomes the correct value once it obeys this mass balance this loop for pressure correction is similar to what I had discussed for the staggered grid that we in that in this loop we do one iteration of pressure correction update the mass flux correction get a new mass imbalance we use that new mass imbalance to get in to do one iteration of pressure correction this was the procedure of the loop in case of staggered grid also and here we are not using any geometrical properties of staggered grid but instead we are doing a interpolation which we call as momentum interpolation so this completes the implementation detail we started from formulation went on to implementation detail and now solution algorithm after solution algorithm code is developed and some problems are solved this is what we call as the pre-processed state where user and to enter the thermo physical property the geometrical parameters like size of the domain maximum number of control volumes boundary conditions convergence criteria grid generation where all the geometrical parameters are calculated initial condition note that I had written initial condition for phi t also why because when we go for prediction sequences such that first to predict mass fluxes because the mass fluxes are needed in when you want to predict the velocities then you set the boundary conditions for phi as well as phi t time step is obtained from the stability criteria for the first time step compute the face center mass flow rate using the initial condition and boundary condition of pressure and tilde velocity then you set before this velocities or temperature changes you take that matrix to the old actually here the way I had shown you that the code which we will be giving using in the lab session in the afternoon you will be solving problems in the mix convection and natural convection and numerically it had been found that it has been found that especially if you have a mix convection and natural convection and if you solo actually when you have flow equation as well as heat transfer equation the idea is this in CFD we follow a sequence if you decide that I will solve first solve for flow then when you are solving for flow and if it is a natural convection or mix convection then in the bi-momentum equation you have one source term for temperature like in mix convection you have g r upon re square into theta in the bi-momentum equation so when you are solving for flow you need to use the temperature of previous time level but after that if you solve energy equation you get updated value of flow in solving the energy equation because flow will come in energy equation in advection term so this is one way the second way is that the first way is first I solve for flow then I solve for energy equation the second approach is reverse of this first I solve the energy equation then I solve for flow for the mixed and natural convection problem it has been found that it is better to solve energy equation first it is better to use lag previous time level velocity field to up to calculate the temperatures for the new time level so that is why I had taken the energy equation before flow solution so using the previous time level mass fluxes which is used in the advection term of the energy equation convective heat transfer from convective heat transfer problem we need to solve the energy equation then after solving the energy equation we solve the flow so with when you are solving the flow and especially if it is a convective heat transfer problem especially mixed convection natural convection you can use the updated value of temperature while solving the flow first you calculate the fluxes and calculate fluxes at the phase center using velocities and mass fluxes of the previous time step so basically you predict the velocities at cell center and mass fluxes using this equation this slide you are predicting the velocities at cell center all these steps is basically to first calculate the source term advection term diffusion term then do the balance and calculate the q tilde and v tilde because here phi is u then you take phi is equals to v and repeat this so in this basically what you are doing you are solving energy equation and you are doing prediction of velocities at cell center and then after predicting the velocity at cell center you predict the mass fluxes for that we use linear interpolation of phase center tilde velocity and cell center pressure to predict the mass fluxes m star once you know the m star you do the balance and get the mass imbalance and check for the rms value of the mass imbalance if it is converged then you avoid the loop if it is not converged then there is a loop in the next slide pressure and mass correction and note that here we need to use the boundary condition for pressure correction because pressure correction is a as double derivative compute pressure correction at the interior node using the mass imbalance using that residual form of the equation once you get the updated value of pressure correction update the predicted mass fluxes by adding with mass flux correction as a function of pressure correction once you get the updated value of m stars you can get updated value of residue and then you go back to step 15 which is you check for the rms value of the mass imbalance and when it is satisfied then you go to step 25 so once the mass once you get a pressure correction which obeys the mass imbalance then what you basically do is that you compute the correct velocity for the next time step by adding the cell center predicted mass flux with the cell center velocity correction and predicted with this two step you get an updated value of the velocity at the cell center and mass flux at the phase second I change move this step from here to previous step but I forgot to delete from here actually this solve the energy equation at shifted earlier due to that natural connection and mix if it's a force convection problem then you can solve this after the flow but if it is a mix connection and natural connection it is suggested that this needs to be shifted to what I had shown in the previous slide where I had shown you okay so this step at is there for mixed and natural and you can delete this step at and then you have step 25 for force connection however the eight step anyway you can use for force connection as well it's always better to solve the energy equation before this is basically the condition to check for the steady state now we will take some problem but before we move into problems if you have any questions this question is how do we use boundary condition for tilde velocity we use the same boundary condition which is there for velocity for the tilde velocity because it's a numerical it's not a physical term this tilde velocity we are introducing due to our numerical method the safest way is that you take the velocity whatever you have for you I am not discussing here the pressure correction boundary condition because I had already discussed that in staggered grid the same pressure correction boundary condition is used here because if you look into this equation they are similar to what was there earlier okay the pressure correction boundary conditions remain same pressure is prescribed pressure correction is equals to 0 the normal velocity is prescribed normal gradient of pressure correction is equals to 0 I will conclude this formulation saying that in this methodology while what we basically do is that we predict not only the velocities at center but we also predict as well as correct the mass fluxes at the phase center and we have iterative loop to check for mass conservation so the number of loops in the staggered grid collogated grid they are similar in fact almost same and here what we have done is that we have avoided using linear interpolation for calculating pressure when you are predicting as well as correcting the mass fluxes and this works well okay now let us take the problem whenever so using this procedure we have developed a code which will be using in the lab session so today's lab session we had given you four codes and now let me just think first code is for isothermal flow but in isothermal flow there will be two codes one in staggered grid second in collocated grid okay isothermal flow means no heat transfer lead driven cavity flow no heat transfer now in the force convection and mixed convection this two we have combined as one because if you take Grashof number is equals to 0 it becomes force convection whereas if we take it take it non-zero then it becomes mixed convection so we have taken it as a one problem and this force convection mixed convection there is only one code and that is saw that is done coded with collocated grid method then for natural conduction also we have collocated grid code so basically four codes two for isothermal one for forced and mixed and one for natural conduction note that all this heat transfer codes are in are on collocated grid system okay so this is the lead driven cavity flow problem this is the square cavity of dimension L and the lead velocity is the characteristic velocity the dimensions of the cavity is the characteristic length scale this is simplest form of the grid generations okay now in this slide I am showing you feel of that if you run a code you get a lot of results but how to do a CFD analysis this is a simplest example of that one of the once you get the data you need to create as I said pictures and movies of the fluid dynamics mechanics so these are the different plots like in this problem I will be showing you the velocity vector plot because here in fluid dynamics we get velocity which is a vector quantity when you want to visualize there is a visualization technique which is called as a vector plot you also once you get the velocity field you can do some post processing and obtain the stream lines so we will have a stream line plot and as far as this validation of the code is concerned this problem is probably the most widely used benchmark problem and the result published result is available for variation of u velocity along vertical centerline and variation of v velocity along horizontal centerline let us try to understand what is mean by that this lead is moving what do you expect how the flow pattern will be this is moving from left to right this is a tight fitting there is no gap between the top wall and the cavity so what will happen to the flow so we will try to move along with the top wall but at the corner it cannot go out it will come down as it comes down there will be at the bottom half stationary fluid it will oppose its motion so it will turn and there will be a setting of clockwise circulation of the fluid correct when there is a clockwise circulation of the fluid if you draw the vertical line and if you see the u velocity draw vertical line and if there is a clockwise circulation then how will be the u velocity sin wise on upper half it will be positive lower half it will be negative so that way we plot variation of u velocity along vertical centerline and if you take horizontal centerline when there is a clockwise circulation what happens on the left portion it is in positive y direction and on the right portion it is in negative y direction so there is a change in the sin of u and v velocity along this centerline so this data from the published results which is called as the benchmark data is used for comparison I will be showing you results on three different grid sizes 12 by 12 32 by 32 and 52 by 52 to give you an idea what we call as graded independent study so this is the how many plot it has this is an overlap plot what are the things you have here velocity vector and contour and contour are of two types line contour shown by white lines and flooded contour shown by color both the contours are for stream function let me ask you a question whether the magnitude of stream function has any meaning magnitude of stream function has a meaning or the difference of stream function has a meaning difference of stream function difference of stream function discharge per unit okay so the magnet that this color don't mean much what I mean is that this red color the magnitude is this this doesn't mean much but I just shown you to show you the at least it gives you the pattern now when you look into the why the difference of stream function has a meaning because the difference of stream function gives us the velocity now this is a this black circles which is seen here is what is called as the benchmark result there is a research paper by Gia Gia Shin which is who have given this data what is commonly done is that this data is used for benchmarking and here I am showing you three lines red line obtained on a grid size of 11 by 11 green line obtained on a grid size of 31 by 31 blue line on a grid size of 51 by 51 so what do you see by comparing with the black symbols which is most accurate blue line is almost following the sir going through the black circles this gives you an idea that as you refine the grid from 11 by 11 to 31 by 51 your results approaches towards the correct or physical this is what is called as gradient dependence study you do any CFD research it is expected that you should show the gradient dependence result it's not that you do simulation of flow across an aeroplane in 100 by 100 grid and just start reporting the result that this is the result first convince that you have done it accurately because you can give wrong message wrong information wrong ideas if you do if you draw conclusions on a very course I would like to point out as I mentioned earlier that this is u is equals to 0 so on this side it is you is negative on the bottom portion you can see that the u is negative and on the top portion you is positive due to clockwise circulation now here what you see is the variation of v velocity along horizontal center line and on the left half you see that the v is positive and on the right half it is negative here again you can see that as you refine the grid from 11 by 11 to 31 to 51 it approaches towards the benchmark so this is the validation exercise so I have shown you the qualitative results as stream functions and the velocity vectors then I showed you the code validation now let us look into the quantitative results like in any problem there is some engineering parameters like in this case what is the engineering parameter wall shear stress on the walls of the cavity there is some velocity gradient which will give rise to wall shear stress so like in heat conduction I had discussed engineering parameter as heat flux on the surface of the wall heat flux was varying on the bottom wall left wall right wall top wall here what varies wall shear stress so non-dimensional form of wall shear stress is called as the skin friction coefficient as I said that mostly we do a non-dimensional study so the results which I had shown you in the previous slide note that this is at Reynolds number of 100 so at a Reynolds number of 100 on a 52 by 52 grid size I will show you the variation of skin friction coefficient local skin friction coefficient where it will be varying on different walls and the mean skin coefficient on the different wall in yesterday lab session you had to you know you were given a table where you have to enter the total heat loss from the different wall that was a total but I could have told you to plot the variation of local heat flux also on at different walls then it will vary with x for horizontal wall vary with wire for vertical walls this figure shows the variation of local skin friction coefficient on the left wall so the red one is the skin friction coefficient variation on the left wall what are the left and right wall they are vertical walls so there is a variation of we coordinate and the skin friction coefficient in that is I had taken in the x axis so what you see is the on the right wall the skin friction coefficient is negative this is just to give you that as you refine the grid this is 0.1 means 11 by 11 grid this is 31 by 31 and this is 51 by 51 as you refine the grid how your engineering parameters vary it is expected that you should have a plot where this asymptotes then only you can say that your results is grid independent that completes the isothermal flow yeah sir as you said about the grid independence if the problem is unsolved then we do not have the benchmark results as such so how do I know whether I am going closer to the exact solution or away from it this question is many times most of the time but not many times most of the time we solve a problem we simulate a problem where we do not know the exact solution but the grid independence does not depend upon the exact solution here in this case I had a grid independent actually I would say that this is not only grid independence but this is also validation if I do not have this black symbol then then also this figure is called as grid independent let me tell you if I have a black symbol then along with grid independence this is code validation you got the point that does mean sir if I refine the grid further there is no change in solution you can see the difference between the green line let us suppose I do not have black symbol I do not have the benchmark result then also by this three line I can make a statement that from red to green there is a lot of change but from green to blue there is a change is small if I refine it further the change will be further small and then I can say that my solution are grid independent how is the coefficient of friction defined here in this case characteristic velocity okay characteristic velocity is the lead velocity that was obtained numerically maybe 20 years back I am not wrong it's 83 paper you know solved by using technique as far as I remember it was in function you may say that how can I call that as a benchmark result yeah but people mostly use this as a benchmark result here it should be an experimental result with a very good instrumentation any other question for turbulent flows they have been done but not in general for some specific cases there are some guidelines but those guidelines are only near to the wall but not about the total number of grid points yeah yeah near to the wall if you can confirm other places then the problem is not that severe yeah so what is basically pointing out is that there are certain guidelines like specially for turbulent flow where near to the wall you can have a particular refinement so that you get an accurate solution total number of grid point for validating the results is it always necessary to have the point-to-point distribution of velocity whereas we are getting the impact on shear measurement so if we if the shear matches yeah I think this simulation is done this question is whether detailed point-by-point comparison is necessary or the gross engineering parameter comparison is good enough correct like for flow across a car rather than on the surface of the car point-by-point pressure validation this is one way which you call as a detailed point-by-point comparison and the second comparison could be I calculated the drag force and then validated it normally point-to-point come validation is considered to be a better or because many a time what happens is that this gross parameter this they are overall effect many times it matches very well but if you do the matching with the point-by-point you will get more error but then you have got the flow visualization techniques in which you can trace the streamlines and by numerical simulation also you are tracing the streamline pattern if the kinematic part matches I think it is good enough no if you are matching point-by-point you don't need to what I mean is the more strict is the point-by-point point comparison because if they are matching anyway your engineering parameters will match but it's not necessary that if you are engineering parameter matches you will get that much of accuracy in the point-by-point measurement comparison most of the time let us I'll give you an example like for flow across a cylinder if you let us say doing simulation at normal number of 100 and if you let us suppose you did simulation of 100 by 100 grid point and you saw that okay your lift force drag force is within 5% but if you compare point-by-point and that is suppose you calculate the rms error velocities or pressures and then maximum error may be 10% or 15% what I said is streamline pattern you match yeah you have got the flow visualization techniques yeah so in the simulation you have you have plotted the streamlines yeah if if the kinematic part is matching yes you are right and the gross parameters are matching I don't think there is any need to have experimental results point-by-point on velocity and turbulence both if your stream line is matching how can you be sure about okay the directions are matching but impact of velocity and turbulence is measured on the gross parameters like force and shear stresses gross parameter may give you matching but the matching which you get from the gross parameter maybe let us see you got within 5% but if you do point-by-point comparison you may get most of the time error is more in that case because when you calculate gross parameters is overall effect many times overall effect are captured good in coarse grid also like if you use k epsilon turbulence model it gives you very good matching as far as gross parameters are concerned okay so if you need more strict validation is point by point if you do gross you can get even on a coarser grid good comparison yeah variation with the experiment analysis is generally good enough as far as research paper is concerned and that too varies from problem to problem class of problem whether you are solving a single phase flow problem multi-phase flow problem boiling condensation granular flows the acceptance depend upon the present status let me tell you see if it is not a magic software may say that they can solve every problem but they cannot solve every problem with that much accuracy like laminar flow they can solve within 2% or 5% but if you consider boiling condensation it's not even they they can simulate they have some procedure with simulate but so the answer to your question is acceptance of the error in the solution varies from the physics of the problem and there are many problems I would like to point out that for which the mathematical models are not well established like if you take a simple example you take a pan of water and put in the gas stove and you can see bubble rising from the bottom of the pan that simulation that experiment if you do on let us say rainy season or winter season you can see that the patterns which you get varies so this phenomena itself is so it varies on surface roughness moisture contents and that too incorporating those in the mathematical model till now we have not been successful I just want with this your question of your his question is that how much accuracy is considered acceptable the answer to this question is it varies from the physics of the problem whether you're solving laminar turbulent single phase multiphase granular flow and so on then be a plot a greedy independent study for different parameters yeah maybe the velocity pressure density and mass flow rate mass distribution on temperatures which can be a criteria that as a thumb rule suppose which will be moderated or observed on a priority that will decide the accuracy accuracy level which can be obtained that means if I see the both for a simulation if I get some distribution of velocity pressure distribution is there density distribution is there temperature distribution is there but if I observe the deviation between the experimental results and the simulated result the deviation might be different variables all variables yeah so is there any criteria or yes velocity calculation is more accurate than pressure distribution no you cannot say that read independent study what to confirm the grid independent study if I priority if I observe for pressure then which will be the most appropriate criteria then pressure is most difficult to match is the last one yeah then also for the mass distribution yeah so which will be the first one so that we can confirm yes if this is the parameter no mass conservation will definitely occur but pressure is the most difficult to match yeah I want to take this opportunity to thank you also and we are very passionate enough to clarify all our doubts and we are all attending this program not only to teach our students we want to do research in the CFD now yesterday also mentioned that required about that conference and to submit abstract now could you tell us some latest problem in the CFD so that immediately we can work on those problems what are the recent things in AB now or which of the problems will be able to solve immediately I had given some hint about certain things in the grid generation topic where I had mentioned that the ultimately what drives the market is that any industry which is using they want to get big solution they do not they would not bother with software using what you are doing but they want big solution they want the job to be done quickly so ultimately when you talk of challenges and upcoming trends or problems in CFD everything is driven by computational time which method takes less computational time or which methodology takes less computational time so I mentioned that in CFD started with caution grid then it moved on to curvilinear structured grid multi block structured grid then it moved on to unstructured grid and nowadays especially with the complexity of industrial problems where this type of grids take a lot of grid generation time the trend is coming that people are coming with caution grid method non body fitted non body fitted caution grid method where there are certain partially field control volumes also like for flow across a cylinder if you draw caution grid there will be some control volume which will have solid also so there is a numerical method which is called as immerse boundary method so solution methodology wise there is an method immerse boundary method which is becoming popular immerse boundary method and so this is on the methodology wise and second as far as the grid generation is concerned there is a multi level adaptive caution grid method which I showed in my grid generation topic on one small simulation of the moving source other than that multi phase flow is something which is gaining lot of interest and popularity multi phase when we say we have three phases solid liquid gas so we have different types of flow liquid liquid flow liquid gas flow like boiling and condensation and solid gas flows like granular flows this is also this is a lot of modeling challenges mathematical model for this class of problem so we are doing research in these two areas mainly so I am aware of these two to a large extent so this is what I can mention right now and if you are interested maybe in the final workshop if I get a time maybe I can devote last one hour or two hour on upcoming trends in CFD or advanced topics in CFD okay but in this probably I will not have the time to go through that okay so from isothermal let us go to nanoisothermal flow so we will have no heat transfer so for this what I am doing is that I am showing you the physical description of the problem so we will have two codes for isothermal flow one in staggered grid one in collocated grid and then we have one code in force and mix connection so here the boundary the situation is that we have taken the same driven cavity flow the left wall is let us suppose maintained at a temperature which is relatively cold left wall right wall bottom wall are at temperature Tc and top wall is heated okay and in this the length scale is l and the velocity scale is u0 we define a non-dimensional temperature T minus Tc divided by Th minus Tc so with that non-dimensional temperature on this left bottom and right wall the non-dimensional temperature becomes 0 and in the top wall it becomes 1 so in the afternoon you have to simulate this problem where you have to simulate for Grashev number of 0 10 to power 6 plus 10 to power 6 and minus 10 to power 6 0 corresponds to force conduction and non-zero values corresponds to mix connection I will also show you the Gavan equations in case of force and mix connection this is the continuity equation this is the I have there will be j vector here I have missed that because this term comes only in the y momentum equation so this is the unsteady term this is the diffusion term non-dimensional form this is the pressure term 1 by a non-number del square u and this is Gr by Re square and the non-dimension and this is the energy equation non-dimensional here which are involved parameter involved are Reynolds number Grashev number and Prandtl number so note that Gr will be 0 in force connection and non-zero in case of mix connection the natural conduction problem which we have taken we have not taken because in natural conduction there should not be forced flow correct so there should not be any lead velocity so this is a closed cavity where left wall is hot right wall is cold and the top and bottom wall are insulated and here we do not have any characteristic velocity so here the characteristic velocity is taken as alpha this thermal diffusivity divided by l what is the unit of this thermal diffusivity meter square per second so alpha by l has unit of meter per second so using this characteristic velocity what you find is that the Reynolds number the product of Reynolds number into Prandtl number becomes unity and this is the non-dimensional form of the govern equation here again there should be a J unit vector so in the y momentum equation you get Rayleigh number into Prandtl number theta in the earlier equation you have 1 by Re Pr here but in this by doing non-dimensionalization in this way Re Pr product becomes 1 that is why you do not have any here in the earlier equation here you had 1 by Re but here Re into Pr is 1 so 1 by Re becomes P r that is why the diffusion coefficient here becomes Prandtl number and this are the governing parameters Rayleigh number and Prandtl number for this sorry there is title is wrong I did copy this with the problem here this is a natural conduction it is not mixed force non-mixed okay so this had come to the end of this collocated grid in this chapter I had discussed about the collocated grid method for complex geometry problem free dimensional complex geometry problem finite volume method for that so with this had come to the end of the lecture thank you for your attention.