 Good morning. I welcome all of you to this lecture on computational fluid dynamics. In the previous lecture, I was in the middle of the topic computational heat advection. Before we move, I would like to start with some animations to give you a feel that what advection phenomena is in a two dimensional situation and in a one dimensional situation. So let us go to the animation. So if the flow is from the ice side with a very large velocity that is what we consider as pure advection. Note that diffusion is anyway there but it is considered as negligible. If the flow is with a very large velocity from the fire side the temperature experienced by use is 100 degree centigrade. This is an example of pure advection one dimensional situation. If you take a two dimensional advection phenomena then let us consider a domain, square domain and flow is inclined at an angle of 45 degree. Let us say this is the left wall of the domain which is at 100 degree centigrade. This is at bottom wall of the domain which is at 0 degree centigrade and the flow is inclined at an angle of 45 degree. So what will be the analytical solution for this considering that the flow velocities are very large then it is a pure advection situation and in that case the exact solution is such that below the diagonal you have 0 degree centigrade and above the diagonal you have 100 degree centigrade. So note that there is sharp change in the temperature across this diagonal. Then so this was the advection phenomena there after I talked about the two level of approximations involved in advection equations and I had mentioned that there is an unsteady term and there is a advection term when you consider pure advection situation. So for unsteady term the approximation is similar to what we had discussed already discussed in case of conduction. So the unsteady term here and then steady term which was there in conduction is exactly same that is why the approximation involved in the discretization is also same. The discretization involved in conduction and then I showed you the discretization involved in advection here are quite similar there are two level of discretization. There it was for conduction flux here it is for advection flux the conduction flux is expressed in terms of gradient of temperature. So there the second level of approximation was how to calculate gradient of temperature at the phase center. Here in case of advection the expression for enthalpy consist does not consist of gradient it consist of the value of temperature at phase center and we need want to calculate when we want to calculate the temperature at phase center. We have to take into account the advection phenomena which just now I had shown you through animations. So we have to come up with a mathematical procedure guided by the fluid mechanics and heat transfer principle which says that our procedure of interpolation or extrapolation should be based on the direction of the mass flow. So the advection scheme the equation for the advection scheme is dependent on the direction of the mass flow rate. So I had shown you four different types of advection scheme I had also shown you the derivations the idea here is that locally we assume some variation like here in this case locally we are assuming that the variation is constant. So this is called as constant extrapolation this is called as first order of print schemes. Here I am showing you the expressions assuming that the flow is in the positive x direction similarly you can do for flow in the positive y direction. Note that I am showing you on only one of the faces but this scheme is applied on all the faces because when you discretize the enthalpy flux comes at all the faces of the control volume all the four faces in a 2D control volume. So this is a central difference scheme where you are using locally a linear variation between the two adjacent grid point. This is a second order upwind scheme where you take two upstream neighbors and this is what is called as linear extrapolations. Finally this is the quick or quadratic interpolation here it quadratic interpolation is done locally and it involves one downstream and two upstream neighbors. Note that in all these expressions which are shown here there is certain weight of the neighbors and the sum of the weight is equal to 1. Let us come back to the slide here again I would like to point out that for a uniform grid you can do a finite difference discretization and a finite volume discretization and you will get similar the way I had shown you in the last lecture in the wide board you will get similar expressions whether you use a finite difference or finite volume when you have a uniform Cartesian grid. When I stopped in the last lecture I was in the middle of this subtopic which is a solution methodology. So we have already discussed the finite volume method and now we are talking of so we have already got let us say the algebraic equations and now we will discuss how to solve those set of algebraic equations. Here I will show you the methodology for two types of formulation unsteady and steady. What is meant by this two different type of formulation is in the steady formulation we do not consider the unsteady term and we are solving the steady state form of the conservation law or steady state form of the governing equations. So for two dimensional unsteady state advection I had mentioned note that this word explicit and implicit comes into our discussion only when the when we use an unsteady state formulation because this explicit and implicit involves the time level at which we are calculating the in case of conduction it was conduction heat transfer here in this case we are using the previous time level value of temperature to calculate the total heat gain by enthalpy transport in conduction it is the heat gain by conduction heat transport. So if you are using the time if you are using the temperature of the new time level to calculate the total heat gain by enthalpy transport then this becomes an implicit approach. I had mentioned in the previous lecture that we use an explicit approach this is the stability criteria or the equation which we have to use to calculate what is the maximum delta T which we can use because if we use time step greater than this time step then the solution diverges the number approaches towards infinity. I would like to point out that this stability criteria we have for pure conduction problem pure diffusion pure advection problem we even have but we do not have a single expression for even when you consider the combination of the two that is convective heat transfer problem and we do not have any such condition for Neumostop equation. However we use this condition as guidelines to calculate the time step for when we are using explicit method in solving the Neumostop equations. This is the solution algorithm which I had discussed in the last lecture first you have there are user input and then there is a grid generation then you calculate the time step for stability criteria note that I am discussing the solution algorithm for explicit method. Once we have calculated the time step we calculate the mass flux note that here we are assuming that we are taking a situation where we want to solve advection equation now the advection equation involves the velocity as well as let us say if your advected variable is temperature then it involves velocity and temperature but here so there are two unknown variables if you see at the first instant that is flow as well as temperature but here what we do is we assume we take a situation where flow is prescribed to us such as the animations which are shown you in the beginning of this lecture the flow inclined at an angle of 45 degree the flow velocities are given to us and we just have to calculate the temperature distribution. So pure advection as I said as it is a hypothetical situation but when you are developing code as I mentioned in the previous lecture that this subject teaches you to develop a tool or a product which is a software by which you can create a video or movie of a fluid flow situation whenever you develop a product you know that you develop product component by component or software we develop module by module. So each of this modules or components needs to be tested separately so that is why we are using this we are taking this advection module separately and actually this module is used when you want to solve the combined fluid mechanics and heat transfer problem like convective heat transfer problem this modules are used while solving the x momentum equation to calculate the total x momentum transport across the control volume this module is used to calculate total y momentum transport across the control volume in energy equation it is used to calculate the total enthalpy transported across the control volume. So we develop a sub routine for this module but before we convert into a sub routine we through this topic whatever you have learned we develop a program of pure advection and there are certain test cases which are shown here and we test it out as you know in any product development each component when it is built it needs to be tested separately this way it is that is the purpose we are developing module by module we started with the first module that is conduction or a diffusion module note that there we are discussed only conduction but later on you will see that when we develop it as sub routine that module is not only used to calculate total heat gained by conduction more over it is also used to calculate the total viscous forces acting in the x direction for x momentum conservation it is used to calculate total viscous force acting in the y direction for my momentum equation and total heat gained by conduction for energy equation. So note that this diffusion module advection module are although we are taking an example right now here for temperature because it is easy to get a feel of heat transfer so that is why I am taking an example considering heat transfer for pure conduction and pure advection but note that they are equally applicable in fluid flow problems momentum transport and more detail will be discussed when I discussed a topic on there is finite volume method probably today towards the end or tomorrow in the morning. So I am saying here that when we want to develop module by module many times what happens in fluid mechanics the system of equations or the physics which are involved are coupled in nature like advection although you want to calculate only the advected variable but velocity also comes into the expression so which comes as a mass flux as shown here but here we take up a test problems where it is not that we solve first for fluid flow that is the velocity and then solve the advection equation take a test problem where let us assume that the continuity satisfying velocity field is given to us and then we want to calculate let us say advected variable is temperature which is the test problem which we will be taking. So as the velocities prescribed you can calculate the mass fluxes at the different phases of the control volume for let us say flow inclined at an angle of 45 degree uniform flow so this mass flux will be this is mass flux on east phase and west phase it will be same and it will be uniform all over the domain then we set the initial condition for advected variable which is a temperature in this case then we set the boundary condition for the advected variable then as our solution proceeds time step by time step so before we go for next time step computation whatever value we have we store it as a old value then this is a step where we calculate total advection now if you are advected variable is temperature then physically what it physical meaning of this total term is when there is an enthalpy transport across the surface of the control volume this term represents total heat gained by enthalpy transport now this analogously I will remind you that in conduction also instead of this capital A you had capital Q conduction and there was a similar term where we do the balances of the heat fluxes multiplied by surface area here we are doing the balance of the advection flux multiplied by surface area advection flux here is enthalpy flux now there it was total heat gained by conduction here it is total heat gained by enthalpy transport and the procedure remains same once you get total heat gained by enthalpy transport then we use this expression which is a function of the temperature of the old time level to get an temperature of the new time level and then whether you can call it checking for convergence or checking for steadiness I think steadiness is a better word as there was a question in yesterday evening about using this word convergence let me call this as check for steady state condition not convergence you can make a correction also in your slides if it is not if this which what we basically do is that we calculate the root mean square of value to check whether it has reached to a steady state or not so we calculate this parameter and we compare that whether this value is less than epsilon as a user input which a user enters what is called as practically 0 so if you have entered let us say practical 0 as 10 to power minus 3 to for the computer to recognize so if this root mean square value is less than epsilon then you can stop your computation if not you have to go back to the step 2 and whatever new value of the temperature which you have got you have to set it as an old value and then keep doing it getting an updated value of temperature calculate RMS check for steady state so this goes on till steady state this convergence is a more appropriate word when you are doing a when you are solving a steady state formulation for this unsteady stateness this convergence is not a good word better word is steady state continue till steady state so this was what I had where I had stopped in my previous lecture and that is the unsteady state formulation now let us go to the steady state formulation in a steady state formulation in a steady state formulation we do not consider unsteady part of the conservation law or unsteady part of the governing equations so we are taking a pure advection situation so in so which means that the total heat gain is total rate of change of heat transfer inside the control volume plus rate of change of heat transfer across the control volume is equals to 0 that is what we had taken when it was unsteady state advection okay pure unsteady state advection where we have assumed that the conduction heat transfer is negligible as compared to advection heat transfer more over we have also taken volumetric heat generation is 0 now in case of steady state rate of change of rate of change of internal engine enthalpy inside the control volume we take a 0 because that is the unsteady term so we are left with rate of change of heat transfer rate of change of enthalpy of the fluid across the control volume this is that term now so what we do is that we calculate the rate of change of enthalpy across the control volume so when this is 0 then whatever is entering that much should be leaving so this is on western south surface you can see that the fluid is entering with some enthalpy and on the positive phases it is leaving with some other enthalpy now this has to balance okay actually this is similar to what you do in mass conservation rate of change of mass becomes is 0 and rate of change of mass across the control volume has to be 0 so this is similar to that what we are doing here now when you do that you come up with product of advection flux into surface area where this advection flux is the enthalpy flux which is a product of mass flux specific heat and temperature now let me show you here you have temperatures at the phase center I have not till now used second level of approximation which is a discreet representation of temperature at phase in terms of neighboring cell center this is what is shown in this slide so let me take a case where let us suppose we are having the prescribed continuity satisfying velocity field such that the u velocity is in the positive x direction v velocity is in the positive y direction so for that case I had shown you the expression of the advection scheme so if so what will be the temperature at east phase right now I am not showing p what I am showing is 5 which is a general variable which is a u velocity for x momentum v velocity for y momentum but temperature for energy equation but here we are discussing heat advection because it is easy to get a feel of the heat transfer so that is why let us take this phi as t for the example problems which we will be considering here but the formulations indeed is applicable for momentum transport in case of fluid flow so this phi e if the flow is in the positive x direction then the upstream neighbor is this phi p so when you use the first order of point scheme this phi e becomes equal to phi p when the flow is in the positive x direction on the west phase so when the flow is in the positive x direction phi w becomes equals to phi capital W similarly phi n when it is in the positive y direction it becomes equal to phi p and when at the south phase center flow is in the positive y direction phi small s small note that small letter here represent phase center capital letter represents the cell center the value of the phi at south phase center is equals to the value of phi at the cell center which is south cell center which is this okay similarly when you apply the central difference scheme you know that it is just the you give 50 percent weight to both the neighbor in this case you had given 100 percent weight to the upstream neighbor and 0 percent weight to the downstream neighbor in central difference scheme you give 50 percent weight to upstream neighbor 50 percent weight to downstream neighbor so you give equal weight this is good when there is a pure diffusion phenomena however here also we are using this if you use this then you get for phi e is equals to phi e plus phi capital E plus phi capital P divided by 2 similarly the expression is shown on the other phase center now when you use this second order of print scheme I would remind you that we give 150 percent weight to the upstream neighbor and minus 50 percent weight to upstream of upstream neighbor so this phi e becomes 3 by 2 of phi p minus 1 by 2 of phi w which is shown here similarly we do at other phase centers okay so this way assuming that the flow direction is positive is in the u is in the positive x direction v is in the positive y direction that is the continuity satisfying velocity field which is given to you then when you do a finite volume discretization because you know this adduction schemes are based the expression for the adduction schemes are based on the direction of the flow if the direction both these directions are negative then this expression will change why I am doing this is that because I want to show you the final linear algebraic equation taking this case taking this example case so if you substitute this so although I had written it as a phi but if you are doing for energy transport this phi is temperature so if you substitute the temperature at the phase centers here in terms of neighboring cell center then you end up with a linear algebraic equation that is what is the objective of all this exercise so once you substitute okay now I further want to simplify this equation the way I want the way it has been simplified here to so that you can understand it in a much simplified manner is that I am assuming that the mass flow rates in the x direction and in the y direction is same okay so this mass flux will cancel down from the left hand side as well as right hand side the surface areas if it is a uniform grid and I am also assuming that the grid is square so delta x is equals to delta y so the surface area will also cancel down from both the sides specific it is same so it will also cancel down from both the side so you end up with an equation which is this I would like to point out that there is a typographical mistake here this west south is correct because this is the way it is entering and you can see that here it is leaving east north but here by mistake it is written as w so make a correction in your slide here it is correct east north by mistake here it is west north it should be east north only so if you substitute this values which are given in the previous slide to take this and substitute into this then we will switch to a whiteboard which is different from what I had used yesterday because I was finding that although my handwriting is not that good but that whiteboard was making it horrible so there was there is some problem in the electronic conversion so today hopefully it will be better ok so I wanted to show you the expressions which I had shown you is T w plus this is face T small s is equals to T small e plus T small n I have this is better as compared to the whiteboard now in a first order of point scheme what is this T w let me show you the cell also so this is p this is n this is e this is capital W and this is capital S this is small e this is small w this is small n this is small s so what is temperature at small w when you use the first order of point scheme it is T capital W what is T small s note that here we are taking flow in the positive direction positive x and y direction so T s upstream neighbor is T capital S now on the east way center upstream neighbor is capital P on the north if you go it is capital P so this will become P P plus T P that is 2 P P so here in this case you get an expression P P is equals to T w plus T s that is what is shown here come back to the slide so you can see although it is general variable 5 I had shown you in there that it is T P is equals to T w plus T s divided by there it was actually 2 T P is equals to T w plus T s finally T P comes out to be T w plus T s divided by 2 so in the first order of point if you want to see the stencil the stencil is such that in first order of point scheme this 3 points are only involved in the expression like in a if you do in a uniform grid if you do a similar exercise in a conduction problem just to highlight in a conduction problem you for a steady state formulation you get T P is equals to T capital E plus T capital N plus T capital W plus T capital S divided by 4 like in 1D you have 0 plus 100 by 4 in that ice and fire example that you have an equal effect of ice and fire in pure conduction problem similarly here instead of 2 neighbors you have 4 neighbors so to calculate temperature at a cell center in pure conduction problem you do the averaging of the 4 neighbors north south east west whereas when you use a first order of point scheme what you are finding is that you are taking the weightage of only upstream neighbor this is the upstream neighbor in the x direction this is the upstream neighbor in the y direction so you are taking giving 50% weight to the upstream neighbor that is in the x direction that is 5W 50% waste upstream neighbor in the y direction that is 5S and you are not giving any percent any weightage to the downstream neighbor so note that in conduction you give 25% weight to each of this 4 neighbor but here you are giving 50% weight to the 2 upstream neighbor and 0% weight to the 2 downstream neighbor. Similarly if you apply a central difference scheme what happens is that you know that in that case you just 5 small e is equals to 5 capital E plus 5 capital P divided by 2 so you just take the average value from the 2 neighbors then you get an expression like this but when you look into this expression what you realize is that finally in the steady state formulation the ultimate objective is to obtain an algebraic equation where you want 5P on the left hand side and all other neighboring values on the right hand side but here when you use the central difference scheme what you realize is that on the left hand side you have 5P by 2 plus 5P by 2 that is 5P and on the right hand side also you have 5P by 2 plus 5P by 2 so this 5P value cancels down from the left hand side and the right hand side and you are not getting explicit expression for 5P in terms of neighboring 5. So in a steady state formulation in a uniform grid it is not possible to use a central difference scheme. Now let us go to the second order upwind scheme. Now let us let me show that in this small window in a whiteboard how so this expression which I have shown you is for first order upwind. Now let us go for second order upwind. Now in a second order upwind let me write down the expression here what is t small w in a second order upwind if the flow is in this direction then we take two upstream neighbor west and one more neighbor let us say west of west two grid points and then what we do what are the weights we give we give 150 percent weight to this upstream neighbor and 150 percent weight to this upstream neighbor and minus 50 percent to this so this becomes 3 by 2 phi w let me write it as t w minus 1 by 2 t w w. Similarly t small e will become 3 by 2 t p minus 1 by 2 t w. Similarly you can do for t n and t s and then you substitute it here final expression after algebraic manipulation I will show in the slide. So you can see that this is the final expressions which you get in a second order upwind scheme note that here you are not only getting west immediate upstream neighbor but here you are getting expression where you have upstream of upstream also note that in first order upwind you only have the immediate upstream neighbor here in second order upwind scheme you also have upstream of upstream neighbor. Now the weights what is the weight this is for the immediate upstream neighbor what is the weight you are giving 4 by 6 and to the upstream of upstream neighbor you are giving a weight of minus 1 by 6. However you can note that the sum of the weights that is 4 plus 4 which is 8 minus 1 minus 1 8 minus 2 will be 6 6 divided by 6 weight is unity. So in this case the coefficients of the neighbor is equal to the coefficient of the cell center in this algebraic equation a p is equals to sigma a and b that is the way it is expressed symbolically similar procedure you can adopt for t small w t small s using quick scheme and substitute and finally you end up with an expression like this. Now here in this case if you compare the neighbors what you realize if you compare the neighbors from the second order upwind scheme here in quick another neighbor come which is a downstream neighbor. So here in this case you can see phi e and phi n which are downstream neighbor is coming into the expression. So this completes the steady state formulation now let us go to the implementation details for explicit method. Note that whenever you look into in fact most of the CFD books they discuss a lot about the formulation finite volume method solution algorithm but this is something which you will find new in this course implementation details because even if you look into a book they will give you the formulation algorithm but when you actually start to develop program you because the algorithm or the formulation need to be articulated in a better way so that you can program it without much difficulty. So this is the job done by this subtopic okay and here what I try to do in the implementation detail is not only I give you the pseudo code but I try to give you a visual information also so that you get a better feel that when you program what is the grid point of let us say fluxes what is the grid point of the flux in the x direction flux in the y direction actually this pictorial representation give you a feel because you know that in the one of the reason why people feel CFD is difficult because I do not see formulation is difficult but what makes is difficult is when you actually want to develop program there is lot of struggle if you are not systematic enough or if you have not then good homework after reading the solution algorithm and formulation and before programming. So this is something which you have to do which is called as implementation detail where you because in your programming note that you have to create loops and in books it will they will not tell you that this formulation part of the formulation what loop you have to use because you have to decide about the grid points. So those details are given here and they are very important because in this course ultimate objective is that you should be able to develop programs and another reason people easily get frustrated is that in this programming each you have to vary you have each and everything you have to do exact like if it is I plus 1, it has to be I plus 1, if you do one mistake if you make I minus 1, then you will get wrong results. So it leads lot of focus when in you carefully work down the implementation details before you actually start in front of computer and start programming and even after your program you take the print out and then sit down separately closing down your monitor or your computer and then see whether what you have understood and what you have written in your program whether they are exactly same whether each I, J is written as it is or there is some mistake otherwise you end up with results and then you struggle that where is the problem why I am not getting the correct result. So in this one of the important implementation detail I would like to highlight yesterday one question was asked in this let me tell what first tell me what the issue is yesterday there was a question that what is the need of border cell there I had mentioned that near to the border the neighboring cell center distances are different and near to the border if you want to apply the diffusion schemes which is central difference scheme or this advection scheme or advection here scheme is let us say especially here the second order upwind and quick scheme then the expressions which are given for let us say here second order upwind and quick scheme are not directly applicable and this expressions needs to be modified. So what I am trying to tell you is that near to the boundary that 150% weight to upstream and minus 50% weight of upstream to upstream that expression we had shown you the derivation when the grid points are equispaced now here what you realize near to the boundary. So let me take you to an animation to give you an idea so I will show you an animation in this window now here in this animation I will explain what I mean what is the issue which I want to address through this slide. So let us say you have a domain square domain in which you have some fluid and it is now let us so the domain is divided into equispaced part equispaced vertical lines equispaced horizontal lines and then you know that we get certain grid points all are interior grid points but there are certain grid points which are near to the boundary those are called as they are sitting at the border. So we call them as border cell the reason being that when we are implementing different schemes for the border cell we have to do special treatment and that is the issue which I want to discuss here this is the left boundary grid point this is the bottom boundary grid point this is the right boundary grid point and this is at the top now and this is the typical computational stencil for a central difference scheme now what I am showing you here is this is a grid point distribution if you consist consider interior grid points which are not at the border. So what happens near to the border I will show you very soon but the this picture which I am showing you corresponds to a case where there is no border cell okay and I would say that there is no boundary cell there may be a border cell but what I am trying to tell you is that this can this represents this can represent this three cells also. So in this case you do not have any boundary cell but the problem comes when you want to apply advection scheme on the faces which are lying on this red lines note that this advection scheme we apply at the face centers to calculate the temperature at face centers in terms of neighboring cell center values. So when you want to apply the advection scheme on the faces which are lying on this red square which I am showing you in the figure when the flow is inward into the domain note that in this there are two directions of flow this is what I have colleague it is inward and the flow is on the positive x direction on that this left face of the red line when it so when the flow is inward then in that case this becomes the upstream neighbor this becomes the upstream of upstream neighbor. Now in that case the computational stencil so I am trying to highlight through this oval red oval that the computational stencil in this case looks like this. Now what you realize in this case is that in the top stencil you have three yellow circles which are equi-spaced now when you look into this case what you realize is that now here also there are three circles but out of the three circle one is a blue circle and the other two are yellow circles now that blue circle corresponds to the boundary grid point now the distance between the boundary grid point and the border grid point is half of the distance between the other two neighbors. Note that using this type of uniform grid point distribution we have obtained second order scheme like phi small e is equals to 3 by 2 phi capital U minus 1 by 2 phi U U but in this case it is need we need to derive that expression again so to do that what I will do is I will go to the whiteboard and then show you how this is derived so these are the expressions which will be showing you okay but in the whiteboard I will show you the derivation okay so in the whiteboard I will show you the derivation so what I am saying you is that the computational stencil right now near to the boundary is such so this is your let us say interior grid point and let us suppose this is your border grid point and this is your boundary grid point okay now this is your east face and on the east face I am saying if the flow is invert from the boundary to the flow so this is your mass flux in the x east direction now if the flow is in this direction then this becomes a downstream neighbor this becomes your upstream neighbor and this becomes your upstream of upstream neighbor so we have a point distribution so let us assume so let us assume that this is the origin and the x is starting from here so at x is equals to 0 phi is phi U U at x is equals to delta x by 2 phi is phi U and at x is equals to this is 0 this is delta x by 2 delta x by 2 plus delta x which is 3 delta x by 2 phi is equals to phi D now for a second order upwind scheme what is the expression we use phi is equals to A x plus B so if you substitute the first let me write down as this 1, 2 okay I will not put it as 3 because actually in our second order upwind scheme this will not come into the expression this third one will come when we will apply the quadratic scheme right now in a linear expression there are two constants we so we need information about the two neighbors only the third one will be needed let me put it here also this third one will be needed when we apply the quick scheme because in a quick scheme we will have phi is equals to A x square plus B x plus C now so what we do is that we take the first and second values of x one year and then calculate A and B here here we take first second and third x location and the respective phi locations and obtain A B and C as a function of this phi u phi u u and phi D and then in this expression we substitute phi small e is equals to phi at x is equals to what is the this is x equals to 0 this is delta x by 2 this is delta x so x is equals to delta x once we substitute into that expression let us come back to the slide then you get this equation you can derive this using the procedure I had mentioned just now okay so the earlier expression was is applicable when this grid points are equi-spaced near to the boundary you find that the distance between the boundary and the border grid point is half of the usual distance that is the reason you have to do this derivation again and come up with an expression which is which is shown here note that this expressions are for when the mass flux is inward from the boundary if why because if the mass flux is outward and or let us say if the mass flux is outward it is going outside the domain then this is your upstream neighbor this is your upstream of upstream neighbor and this is your downstream neighbor then in that case this expressions are not applicable so note that this expressions which are shown you needs to be applied for the faces how many faces in this case 1 2 3 4 5 6 and 6 on this side that is 12 faces for this case so I had drawn this red line which is you can say on the border cell the vertical line and the horizontal line and if the flow is inward then only you end up with this type of stencil and then only the expression needs to be modified yesterday there was one question from COP Pune where the participant was referring to a book on computational fluid dynamics by and then he was saying giving a reference to the example problem also they have done same thing but they had done in a slightly different manner taking where what they do is like the book is maybe if you want to take the reference it is a book on computational fluid dynamics by Vastik and Malasekara what they were doing is they were not using this boundary grid point in their expression for adduction scheme what they were doing is that using this blue boundary point value and the border point value they were extrapolating linear extrapolating they were doing linear extrapolation and getting a mirror point okay so they were creating a mirror grid point which is minus delta x y 2 on the left hand side and on that grid point they were extrapolating the value of temperature of the boundary and border and once they obtained that value then they were giving let us say minus 50 percent weight to that mirrored value and 150 percent weight to this okay so that is another way of handling the near to the border but what I want to emphasize here is that near to the boundary you need to do some special treatment to apply this schemes.