 So, the next topic is computational heat convection. So, we started with the first module computational heat conduction then we moved on to the second module computational heat advection and then we are going to the third module it is computational heat convection. Now, this is just a combination or coupling of the first and the second module. So, in the first module you had conduction heat fluxes in the second module you had enthalpy fluxes. So, here we are taking the addition of those two fluxes here again as I had. So, the way the lecture is proceeding is the same way which I had done in the previous two lectures starting with introduction moving on to finite volume method then discussing the advection scheme followed by solution methodology implementation detail and finally, discussing some example problems. So, in a convection I had mentioned that if the temperature which you feel if you are standing in between ice and fire depend upon the flow direction magnitude of the flow as well as the direction of the flow. And I had mentioned that if the flow velocity is small from the ice side you experience a temperature of 40 degree if it is more you can experience a temperature as high as 10 degree. Whereas, if it is from the fire side the flow velocity is small let us say you experience a temperature of 60 degree, but if it is high you can experience a temperature as high as 90 degree centigrade. So, here the advecting variable or the driver is velocity or which constitute the normal velocity which constitute the mass flow rate and the passenger or the advected variable is temperature. So, this I had mentioned earlier, but this is the just as I am not giving you the lecture notes. So, in my slides I tried to be as much elaborative as possible this is just an explanation of those. Now, where do you find this combination of advection and diffusion? If you look into the energy equation energy equation without volumetric heat generation and negligible viscous dissipation is basically an unsteady advection diffusion equation this is what is shown here. However, if you look into the momentum equation other than the unsteady advection and diffusion term there is another term which is called as source term in computational fluid dynamics which constitutes the pressure gradient. So, here we want to study unsteady advection diffusion or unsteady convection. Now, for that either we if you take the momentum equation we have to assume the pressure gradient which I am not doing here what I am doing is that we will I am taking the energy equation because in this energy equation there is no other term it is a pure unsteady advection diffusion. However, it consists of this flow velocity. Now, this flow velocity. So, right now in this right now the equation which I am showing you is equation for a convective heat transfer problem for force convection not for mixed on natural convection. Now, when you have a force convection situation the energy the coupling between the momentum equation and the energy equation is one way because temperature depends on the flow, but the flow does not depends on the temperature. Now, we want to develop a module for unsteady convection, but if we take this equation what we realize is that there is some velocity which is coming into this expression. Now, if we want to develop this module and if we want to test this module we have to take a test problem where velocity is prescribed a continuity satisfying velocity is prescribed. Although that problem will be hypothetical in nature, but that is a good problem as far as the objective of the our objective is just to test. So, we take a hypothetical problem where velocity is prescribed and then develop a code for this unsteady advection diffusion. So, now let us discuss the numerical procedure for the unsteady advection. Now, for this I am showing you a problem this is the animation which I show that depending upon the magnitude of the flow you the temperature which you feel. Now, the test problem which will be taking up here and actually this is the analytical solution of this problem is given in a book convective heat transfer by Bermister. So, as I said that to solve the energy equation independently without solving the flow because for to solve flow is much more difficult it involves many more things which is the last topic in this lecture and right now we want to avoid solution of flow. So, in this case flow is prescribed and we just concentrate on the solution of convection equation. Now, an analytical solution has been provided for this physical situation and the physical situation is what we call a slug flow in a plane channel. So, the fluid is entering with the velocity u is equals to u infinity and v is equals to 0 left wall is maintained that let us say ambient temperature T infinity bottom wall is hot T w and the right wall it is a fully developed boundary condition dT by dx equals to 0. Now, as far as the flow field which is prescribed is concerned this is the flow field which is prescribed. So, what we are assuming our domain is this rectangular domain where the fluid is flowing there is an inlet there is an outlet at the inlet there is a u the constant there is a velocity in the x direction which is constant and note that all over the flow field we are taking a velocity field such that u is equals to u infinity everywhere and v is equals to 0. So, this is the prescribed field for which we will solve the unsteady advection diffusion which is a convection equation and obtained a we will discuss the formulation solution algorithm implementation detail develop a program then test into this problem. This is the problem which is which you will be solving in today's lab session let us come back to the slide. So, this is the problem which will take for testing. Now, let us go to the finite volume method I will not go into too deep too much detail I will just this is just a revision of whatever has been discussed because the approximation which are involved I had already discussed in case of conduction and advection is just that I am revising it. So, unsteady term there are two level of approximation first level is volume averaging to represent temporal gradient of temperature in a control volume as the value at the centroid second level is temporal gradient of temperature at cell center is calculated by forward difference method the advection term which constitutes the rate of change of enthalpy across the control volume note that the unsteady term in the previous slide constitute rate of change of enthalpy inside note the word inside here and the across in this slide across here when we say across there is an inflow and there is an outflow here in this case enthalpy inflow and enthalpy outflow first level of approximation whenever you have inflow and outflow the first level is surface averaging to calculate the enthalpy flux at the face control volume faces. Second level of approximation is the advection scheme which I had discussed earlier and this is the total advection. So, we had talked about unsteady term advection term then we come to diffusion term for heat transfer it is a conduction total diffusion represents total heat gained by conduction heat transfer here again as it is a as the exchange occurs at the faces there is a flux the first level of approximation is surface averaging to calculate heat flux at the control volume faces. Second level is to calculate the normal gradient of temperature note that here the second level is normal gradient of temperature in previous slide is the value of temperature at face and finally we get this is the unsteady form is the rate of change of internal energy of the fluid across the inside the control volume this is the rate of change of enthalpy of the fluid across the control volume this is the total heat gained by conduction this corresponds to this this corresponds to this and this corresponds to this. So, I had quickly covered the finite volume discretization which is similar to what has been discussed earlier now let us go to the solution methodology here I will discuss study as well as study state formulation there was a question on the oscillation which will be answered in this topic. Now, let us take one dimension situation because in a one dimensional I can show you a detailed expression and convince you that why oscillation occurs. So, the objective is to demonstrate the property of finite volume method for a simple problem which has an analytical solution. So, what is the one dimensional study state advection diffusion. So, this is the advection term says it is a study state. So, you do not have a d by d t term and this is a diffusion term where rho is the density u is the velocity note that here we just we want to solve for this variable phi which can be temperature and v is this velocity is prescribed. So, u is assumed to be constant here now we are taking a problem where we will assume that at x equals to 0 which is the left boundary of the domain phi is equals to phi 0 and on the right boundary of the domain phi is equals to phi l physically what does this represent this advection if you go to the control volume and if you try to understand what does this represent. Let us say if t is temperature then you are right now you are looking into a differential equation, but can you convert this into a control volume formulation can you go back to the control volume and say that this term is coming from enthalpy flux in which phases this is coming from enthalpy flux on the vertical phases this is coming from conduction heat flux on the vertical phases. So, physically it represent a situation where let us say enthalpy transport is balanced by the conduction heat transfer in the stream wise direction the advection in stream wise direction is balanced by diffusion in the stream wise direction. I will take an example in the next slide where this is what does not happen commonly what happens commonly is advection in a stream wise direction is balanced by the diffusion in the transverse direction that is how the boundary layer grows I will show you in the next slide. I will discuss this through an animation let us come to this small window. So, here what you see is a flat plate now here I want to show you that what is the direction of advection and what is the direction of diffusion. So, we are considering free stream flow over a flat plate what is happening when the plate is stationary and the flow is passing across it. So, why action is happening because plate is stationary if plate is moving with the same velocity with which fluid is moving then there will be no action. So, what is the action in fluid mechanics when there is a difference between the velocity of a object and the fluid velocity and it what action means is that it action means velocity gradients if there is no plate there will be no velocity gradient the fluid which is coming it will keep moving with that velocity no velocity gradient no action. As soon as you have a plate which is stationary you end up with a velocity gradient and the action of flow starts. So, what we mean by action is we see a velocity variation as far as physics is concerned and we also see engineering parameter like wall shear stress. Now, let us suppose this plate is hot and the fluid is at ambient temperature then what happens then you also see a temperature gradient. So, now earlier the flow was isothermal everywhere temperature was ambient it was only fluid mechanics problem no heat transfer problem. Now it has also become heat transfer problem and what I am showing you here is what is called as ponderlai thicknesses. Here I would like to draw your attention to there was one question when Professor Puranik was teaching fluid mechanics that why there are two types of two types of viscosity. So, the question was why there are there is separate dynamic viscosity and separate kinematic viscosity. Now, before I explain the situation I would like to go back to that question and then I will come back to this slide. So, let us go to the whiteboard. So, right now I want to discuss about the physical interpretation of dynamic viscosity and kinematic viscosity. The physical interpretation of dynamic viscosity is that it represent internal fluid internal friction. So, it is a basically internal friction coefficient. So, when the fluid is moving in layers with different velocity there is a internal friction which is expressed in terms of dynamic viscosity. Now, let us try to understand kinematic viscosity denoted by mu which is mu by rho or to understand what is kinematic viscosity let us take an example. The example is let us suppose we have a tank which is infinite in this direction y tending to infinity and let us suppose we have a conveyor belt here which is moving with a constant velocity let us say u0 and let us suppose you have water here. Then what happens is that let us suppose after 5 minutes after 5 minutes let us see that the velocity or this velocity is penetrated to what depth let me denote it as delta. So, this is the penetrate this is the depth up to which this momentum is penetrated why this is happening because the depth of this tank is infinite and right now what is happening is a diffusion phenomena. The momentum of that conveyor belt is being penetrated or diffused to the bottom layers of the fluid and it takes time to penetrate. So, this kinematic this penetration depth is directly proportional to square root of kinematic viscosity. So, instead of water if you take oil it has a different kinematic viscosity. So, you can physically interpret kinematic viscosity that it has a role as far as this penetration depth is concerned. So, if a fluid has more kinematic viscosity there will be more penetration depth and a legus to kinematic viscosity there is another term which is there in heat transfer what is that term? That term is thermal diffusivity denoted by alpha which is k divided by rho Cp you can do a same experiment and you can draw the same similar physical interpretation. Let us suppose now you have a slab you have a slab which is infinite which is having a infinite depth and let us suppose this slab the slab initially it is at let us say ambient temperature and the top surface is expressed to let us say some constant temperature let us say 100 degree centigrade. So, now what will happen? Now that temperature now the temperature will be penetrating to some depth. So, let us suppose this is ambient temperature this is Tw and let me denote it as delta T. Now this delta T it is a penetration depth what penetration depth? Here it was momentum penetration depth here it is a thermal penetration depth this is directly proportional to square root of alpha. Why I taken this physical interpretation because this physical interpretation has a role in the growth of the thickness of the boundary layer? Let us come back to this slide. So, this delta there I had shown you as momentum penetration depth delta T I had shown you as thermal penetration depth or heat penetration depth. Here it is different it is basically delta is the boundary layer thickness velocity boundary layer thickness this delta T is the thermal boundary layer thickness and the point I want to emphasize here is if you see the momentum exchange the momentum change if you say the along the x momentum is changing along the x direction. So, the advection of u velocity and in fact there is lot of change of enthalpy of the fluid in the x direction. So, advection of u velocity and temperature in the x which is horizontal which is the stream wise direction is balanced by the this actually right now the velocity gradients which you are getting is in which direction? It is along the flow direction or it is in the perpendicular direction. So, the diffusion momentum diffusion due to which results in momentum penetration and thermal diffusion which results in temperature penetration, but this is diffusion is occurring in which direction? Transverse direction. So, in the most of the real world situation advection in a particular direction is balanced by the diffusion in the perpendicular direction like here advection in the stream wise direction is balanced by the diffusion in the transverse direction. But the example here we are taking is advection is balanced by the diffusion in the same direction. So, this is a you can say hypothetical situation, but this is a good test problem. So, I was in this slide when I finished before T break where I mentioned that in the real world situation most of the time advection of velocity and temperature in stream wise direction is balanced by the diffusion of momentum and thermal diffusion in transverse direction. However, we are taking a test problem just because we wanted the problem to be one dimensional. We had taken a case where advection is balanced by the diffusion in the same direction. Now, let us go to this window I will show you an animation. So, what is being shown here is let us suppose we are taking a one dimensional problem. And let us suppose ice is at 0 degree on the left boundary and let us suppose there is a fire at 100 degree on the right boundary. And you know that if there is no flow and if you are sitting exactly in the middle pointed by let us say yellow circle at 4. If there is no flow you experience a temperature of mean of the two which is 50 degree centigrade this is what is shown here. Now, when there is a flow from the ice side the x location at which 50 degree centigrade is experienced will be at x greater than 0.5. Because if you are in the middle now you can see that when the flow starts from the ice side you will start feeling cold. So, the x location at which 50 degree centigrade is experienced will be further downstream. And if the value of the velocity from the ice side is very large then that location will be very close to 1. So, let us suppose if the flow is 1 meter per second if there is no flow let us suppose 50 degree is experienced by node 4. Now, let us suppose flow has started from the ice side then let us say 50 degree centigrade is experienced by the node 5. And let us say that the flow velocity has increased from 1 meter second to 10 meter per second then 50 degree is experienced by node 6. What I want to highlight is that under that situation the change in temperature from 0 to 50 degree centigrade occurs between node 1 and node 6 whereas the change from 50 degree centigrade to 100 degree centigrade occurs in a very small distance. So, under that situation where there is very sharp change in the temperature. Not that here we are talking of convection not pure advection ok. So, the velocities are not very very large still have diffusion vice versa if the flow is from the fire side at 100 degree centigrade. Now, in this case the x location at which 50 degree centigrade is experienced will shift towards x is equals to 0 with increasing velocity. So, when the flow is from the ice side the location at which 50 degree is experienced shifts towards fire side. When the flow is from the fire side the x location at which 50 degree is experienced shifts towards the ice side. Let us come back to the slide. So, that is what is being shown here. Now, why we are taking this one dimensional situation is because this situation has an analytical solution and it is always good that when you are developing a formulation when you are developing a program we take a situation for which we have an analytical solution. So, that when we run our program we can compare with the analytical solution and get a confidence and we can make other people believe in our results. So, as I mentioned physically this represents a situation where advection is balanced by diffusion in the stream wise direction where x is the stream wise direction. Here we define a non-dimensional number which is called a speclet number. It is ratio of strength of advection and that of diffusion. The strength of advection is denoted here by a and is expressed by the product of density and the velocity. The strength of diffusion is expressed in terms of diffusion coefficient divided by the length of the domain and this is the exact solution which you obtained if you integrate the differential equation. Note that the differential equation is this differential equation. So, for this differential equation with this boundary condition where at x equals to 0, phi is equal to phi 0, at x equals to l phi is equal to phi l, this is the exact solution. What you see in this exact solution when peclet number is 0, peclet number 0 means flow is 0. It is a pure conduction or diffusion phenomena. The variation is linear as you know that pure conduction temperature distributions are linear without polymetric heat generation. Whereas as I said when peclet number is greater than 0 means u velocity is greater than 0 which in our example case flow is from the ice side. Then I had mentioned that the sharp change from 50 to 100 degree centigrade occurs in a small distance. So, when the flow is from the ice side initially there is a slow change in the temperature. So, from 0 slowly there is an increase in temperature and suddenly there is a large change near to the accident. Why so much if the flow is from the fire side? There is a slow change in the negative x direction and then when it reaches close to the ice side there is a sharp change. What I discussed physically that is what is coming out from this analytical solution. So, this is what is written here also. So, if left boundary condition value let us say temperature on the left side is less than that on the right side. In case of small velocity peclet number is close to 0 and adduction can be neglected and solution is linear. Where peclet number is very large and it is positive 5 grows slowly with x then suddenly rises over short distance and vice versa for negative values of peclet number. Now the real challenge in this test case is there is a sharp change near to the exit near to the outlet and how to capture it accurately is a real test. This is the finite volume discretization. Now what I will do is that for that differential equation I am showing you the finite volume discretization for different advection scheme. So, in this slide I am taking the central difference scheme. So, when you use a central difference scheme this is the finite difference discretization. I am not sorry not finite difference finite volume discretization do not get confused that I am using a same ball i plus 1 i minus 1. So, this is finite difference however in this case finite difference scheme will also give you the same result because you are taking a uniform grid distribution for the interior grid points. But what I am showing you here is a finite volume discretization where this delta x is the surface area which we are taking sorry there is a mistake here this is not delta x this should be delta y. There is a mistake here you can correct it this is delta y because and this delta y comes will be unity as we are taking a one dimensional situation and here we have used a central difference scheme. I would like to point out that when you apply the advection scheme on the west face and the east face on the east face you get phi capital. So, here you get phi capital E plus phi capital P divided by 2 minus of phi capital P plus phi capital W divided by 2. So, phi capital P cancels down and you get phi i plus 1 minus phi i minus 1 and this is the discretization of the diffusion term and this is the final linear algebraic equations which you get. Now this linear algebraic equation this is the coefficient of P this is the coefficient of capital E this is the coefficient of capital W which are shown here. So, this you get a linear algebraic equation note that we are talking of steady state convection one dimensional steady state convection and let us see how is the nature of the coefficients. So, we get a linear algebraic equations where the neighboring coefficients are a i plus 1 which is the east neighbor coefficients a i minus 1 is the west neighbor coefficient. Now when you look into this expression what you realize is let us suppose the pecklet number is 0 sorry pecklet number is greater than plus 2 then what you see is that this coefficient becomes negative. When pecklet number is greater than plus 2 this expression becomes negative when pecklet number is less than minus 2 this coefficient becomes negative then a situation comes like let us say if you have a equation z is equals to 3x minus 4y if you have z is equals to 3x plus 4y. So, when x increases as well as y increases z increases when there is a plus sign in between 2, but if it is minus sign that is z is equals to 3x minus 4y then when x increases z increases whereas, when y increases z decreases with this what I want to emphasize is the coefficients of the neighbors in the algebraic equations they should have same sign. If you follow the book of numerical heat transfer and fluid flow by Patankar he has given this as a rule that all the neighboring coefficients all the coefficients in fact this a i also should have same sign in fact a i should be equal to sigma a and b a i plus 1 plus a i minus 1 if this rule is not followed then what happens I will show you through example problems. So, with central difference scheme the rule is not been followed the neighbors are all the neighboring coefficients are of not same sign when pecklet number is greater than plus 2 or less than minus 2 note that otherwise it is obeyed. So, only when there is a pecklet number goes out of range if it is within the range minus 2 and plus 2 no problem, but when it goes out of range then the nature of algebraic equation is such that it results into some oscillations which I will show you through example problem this will answer the question which was asked in the next in the last lecture that why there is an oscillation in quick and second order of point scheme right now I am showing you through central difference scheme oscillations, but that this discussion is also applicable for the higher order schemes. Now if you do the finite volume discretization of the same equation in earlier slide it was for central difference scheme in this slide it is for first order of point scheme when you do the discretization you end up with the coefficients here you will see that the coefficients are will always be of same sign because if this u is negative then this minimum will give you 0 and if this u is negative here also this maximum will give you sorry if this u is negative then you will get a negative value and there is a negative sign outside with negative into negative it will become positive if u is negative here the maximum function will give you 0 if u is positive then this minimum function will give you 0. So, this term becomes 0 so you will never get our negative coefficients you will always get a positive coefficient. So, this is following that rule that all the neighboring coefficients are of same sign. So, when fou connections advection scheme is used all the coefficients of the resulting linear algebraic equations are positive thus increase in phi i will increase in the value of the variable will increase the if there is an increase or decrease in the value of the neighbors it will have the same effect on the grid point. So, phi i will increase with the increase in the neighboring phi values phi at a particular grid point will increase if the neighboring value is increasing it will decrease if the neighboring value is decreasing it is having the same effect that is what we want that is what happens physically also and that is what we want to be obeyed in the algebraic equations. Whereas, when you go to the central difference scheme a i plus 1 at when you earlier becomes negative when pecklet number is greater than 2 which will result in decrease in the value of phi i for a grid with an increase in the east neighbor value this result in non physical oscillation as I had mentioned earlier and I will show you through an example problem. So, we have taken we are taking an example problem where the length of the domain is 1 density is 1 u velocity is 1 diffusion coefficient is taken as 0.02 left ball boundary condition is 0 right ball boundary condition is 1 grid size is taken as 12 by 12 with 2 boundary points and 10 interior points if you in this case if you calculate pecklet number which is rho u l by gamma. So, rho is 1 u is 1 l is 1. So, rho u l is 1 divided by gamma what is gamma 0.02. So, if you take the inverse of this it is 50 this is the on a domain this is the pecklet number when you consider total length of the domain. Now, I will want to show you that in this expression the pecklet number which is shown here this is calculated using length total length of the domain or width of the control volume this pecklet number is calculated with width of the control volume. So, we want peck what we call as cell pecklet number not the domain length pecklet number to be less than 2. So, in this case that cell pecklet number is 5 this is what we have to note that this is greater than 2. And for this case let us see what happens if you use the central difference scheme and first order of point scheme. I will show this through an animation which will come in this window. This is a central difference scheme this is a first order of point scheme what I am showing you is that on the x axis you have x coordinate on the y axis you have a value of 5 I will play it once more this is central difference scheme. So, if there is you can see there is an oscillation and this is the steady state result when you use a first order of point scheme is smooth there is no oscillation. Let us come back to the slide and I will show you the steady state solution this is the steady state solution. And in this steady state solution you can observe there is an oscillation in the central difference scheme why because the cell pecklet number is greater than 5 which makes the east neighboring coefficient negative which results in oscillations value going oscillating about 0 by the way this oscillation is occurring in which region which x location what is the flow direction this is the x coordinate flow direction is positive x direction. So, this oscillation is occurring in the between x to between x equals to 0 to 0.5 or between x equals to 0.5. So, it is occurring near to the inlet or it is occurring near to the outlet note that this oscillations are occurring near to the outlet why because near to the outlet it is a sharp change in the temperature from 50 to 100 degree centigrade close from the ice side. So, you know that the location at which 50 degree centigrade is there is close to the outlet and close to the outlet there is a sharp change in the temperature. So, even when pecklet number is greater than 2 it creates problem in regions where most of the action is occurring it creates problem where sharp changes are occurring. So, if you generate a if you are clever enough if you know where real action is occurring you can use a non uniform grid and make sure that the self pecklet number in those regions are less than 2. Note that this I am discussing it for an convection problem where we have one dimensional advection diffusion equation when we solve the Neusdorff equation this is used as a guideline. Although right now whatever we have shown this is for this equation where there is no pressure gradient term. This is not directly applicable to Neusdorff equation which has other than the advection diffusion pressure gradient term but this is used as a guideline when using central difference scheme. Now, this is the now if you in earlier slide what was the grid size 12 by 12 if you increase the grid then what will happen to the self pecklet number? Self pecklet number is directly proportional to delta x rho u delta x by gamma. So, when you have more grid size your delta x reduces. So, your self pecklet number reduces like here in this case the interior grid point in earlier case was 10. Now, it is increased by 4 times. So, the sales size reduces by 1 fourth. Pecklet number reduces by 1 fourth. So, in earlier slide it was 5. In this slide self pecklet number is 5 by 4 and in this case you see that in central difference scheme there is no oscillation and as this case has an exact solution you can see that the central difference scheme result is having an excellent match with the exact solution. They are almost lying one over the other the green sorry the blue line is calculated value or computed value from the code and the black line is the exact solution which I had shown you earlier. This is the exact solution which is plotted there. When you go to the first order of print scheme now what you are seeing is that the result is not matching. Actually if you so the domain pecklet number is right now 50. Now, what I what you do is that go back to that exact solution. So, in 50 this black line is coming. Now, if I want to know create this exact solution which almost goes matches with the first order of print scheme then what I do is that in that exact solution this pecklet number I keep reducing. When I keep reducing the pecklet number in this expression. So, what I am saying is telling is that with the cell pecklet number 1.25 and right now let me tell you that the in this exact solution the pecklet number which is used this is which one cell or domain this is domain pecklet number. So, in that slide domain pecklet number was 50. However, with that 50 pecklet number or domain pecklet number the black line which I am getting from the exact solution the first order of print scheme is not matching. However, let us do one thing let us reduce this pecklet number. So, that black line exact solution will keep on changing and there will be a particular pecklet number for which the steady state solution of the first order scheme almost matches with this blue line and that pecklet number let us suppose in this case if you do an exercise comes out to be 18. So, the result if the result of first order of scheme of a particular at a particular domain pecklet number is matching with analytical solution at low pecklet number. What does that mean? Note that pecklet number is a ratio of strength of advection to diffusion. So, what is the meaning of low pecklet number? Low pecklet number means more diffusion. So, with this I want to highlight that first order scheme has what we call as numerical diffusion. So, due to this numerical diffusion although the domain pecklet number is 50 as it has additional diffusion which is called as numerical diffusion and as pecklet number is inversely proportional to numerical diffusion, inversely proportional to diffusion. So, if diffusion is increasing pecklet number will reduce. So, that is the reason that the solution of first order of scheme matches with the exact solution at a lower value of domain pecklet number at which simulation has been done. As this is not a we are not going into the numerical analysis we are discussing about the numerical methods in CFD here. I am not discussing here the why there is a numerical diffusion in first order of a scheme. For that we have to do Taylor series expansion if you for reference I will suggest you to read the book competition fluid dynamics by JD Anderson where mathematically it has been shown that which terms causes the numerical diffusion. So, the conclusion is the central difference scheme I will take one scheme at a time. So, let us start with the central difference scheme then go to the first order of a scheme. So, the central difference scheme exhibits several severe oscillation which disappears on fine grid as cell pecklet number becomes less than 2. No oscillation occur if pecklet number is less than 2 at every node. Note that this is sufficient, but not necessary condition for boundedness of the solution. Why? Why it is not necessary? The answer is the next point. Oscillation appears only when the solution changes rapidly in the region of high pecklet number as I showed you that where oscillation occurred near to the exit. So, this is condition which is sufficient for oscillation, but it is not necessary because so in the region in which not much action is occurring even if you have large cell pecklet number which is sufficient to cause oscillation, but it is not necessary because if there is not much action, there is not much change then in that region you may not get oscillation. So, it is not always necessary that when you have large pecklet number in central difference scheme you will have oscillation. So, the necessary condition is that in that region there should be large chain in the dependent variable. So, oscillation appears only when the solution changes rapidly in region of high pecklet number. On the other hand when you go to the first order of a scheme this overcomes the problem of oscillation as it unconditionally satisfies the boundedness criteria. I had shown you that in first order of a scheme we get the coefficients which are always positive. So, you will not have oscillations or boundedness problem your values will not go below 0 when oscillation occurs. So, this is robust this does not have that problem it is very good converges characteristics, but it introduces excessive numerical diffusion resulting in poor accuracy especially for convection dominated flows. For example, as I mentioned earlier the result of first order of wind at domain pecklet number of 50 matches with the exact solution of self-pecklet number approximately equal to 18. Thus the stable numerical solution is obtained at the price of truncation error which increases with the increase in the strength of convection. So, this is a very good converges characteristic, but it has artificial or numerical diffusion which reduces the accuracy and this is not goes in a convection dominated flows. Hence the quest for optimal what is the optimal advection scheme which is stable as well as accurate which does not have oscillation and is accurate because central difference has problem of stability and first order scheme has a problem of accuracy. Other promising alternatives are higher order schemes such as second order schemes and quick schemes and quick has been found from the literature to be better as compared to not only second order advection scheme, but first order of wind and central difference. So, I hope that has answered that the question which was asked in the earlier session that why do we get oscillation? We are getting oscillation due to change in the sign of the neighboring coefficients. Now, I am showing you as I mentioned that when there you have a steady state formulation you have two different types of method explicit and implicit. So, this is the expression where we calculate the total heat gain by conduction and enthalpy transport by using the temperature of the previous time level this is fully explicit and this is fully implicit. There is another method which are not discussed as far as which is called as Crank-Nickelson where they give the calculate 50 percent of heat transfer from the using the temperature of the previous time level and other 50 percent from the new time level which is second order accurate in time, but I had not considered that in this lecture. This is the total advection terms which represents total heat in this case it is east outflow minus inflow. So, this will represent total heat lost by enthalpy transport this is inlet minus outlet this was outflow minus inflow this is lost and this is inflow minus outflow this is the total heat gained by conduction and these are the different fluxes which are involved advection flux which is enthalpy flux conduction heat flux. Now, as I said that in pure diffusion there is a stability criteria fusion explicit method for pure reduction there is a stability criteria, but for combined that is convection combination of the two we do not have one equation for. So, what we do is that we calculate two values of time step one for pure diffusion second for pure advection denoted here as delta Td and delta Tc and we take the minimum of this two time step in our computation for a convection problem. Note that even while solving the new and stoke equation this is the way for explicit method we calculate the time step. So, the solution algorithm is first step in all the methods or all the modules is the user input material property geometrical parameter number of control volumes boundary condition inputs and the steady state criteria grid generations when you generate grid basically what we mean is that all the geometrical parameters like width of the control volume surface area volume of the control volume distance of a cell centre from its neighbouring cell centre all those are calculated in this step. Then we calculate time step from the stability criteria mentioned in the previous slide here as I said that we are not solving the fluid flow the problem we take flow field is prescribed. So, we can calculate the mass fluxes we set the initial condition for let us say temperature then the boundary condition before we go for the computation for the next time step whatever temperature we have we take it as an old value in this step we calculate total heat here you can see it is inflow minus outflow it will represent total heat gained by the enthalpy transport when you calculate total diffusion it represent total heat gained by conduction heat transfer I think there is a mistake in this sign this should be positive the way I have taken a here. So, this should be positive because here this is total heat gained by enthalpy transport plus total heat gained by conduction heat transfer this is the total term there should be no negative sign here. So, you can make a correction here and then check for steady state you calculate a value rms value and then compare with epsilon which is practically 0 if it is not reached the steady state go back to the step 7 and continue till it reaches to steady state. So, this completes the solution methodology what is the next thing next thing is the implementation details that I will show you through an animation. So, focus into this window. So, this is a control volume for temperature now this is the grid point which you have used to calculate the conduction heat flex for in the first lecture this is a second lecture first lecture was introduction the second thing is the total right now I am taking it as minus a x so minus a x a x will be heat lost by momentum transport and this is again. So, we are taking the combination of the heat transport by the enthalpy as well as conduction and this are the grid points for green square gives you the total advection diffusion in the x direction and inverted triangles gives you the same value in the y direction. So, we draw equi space horizontal and vertical lines we get certain grid points for temperature inside the domain certain other points at the boundary where we apply the boundary conditions note that we apply conservation law for the yellow circle inside the domain and boundary conditions for the point at the boundary these are the running indices these are the grid points for which we calculate the convection flux in the x direction these are the grid points at which we calculate the convection flux in the y direction and this is the computational stencil. Let us come back to the slide. So, this represents the ad actually I had shown this slide earlier in the earlier two lectures also because there it was in first case it was pure conduction then pure advection now we are taking the combination the loop is this loops I had shown earlier also for conduction pure conduction pure advection, but in pure conduction only you have to calculate q x and q y now here there is a combinations we have to calculate both in the x direction and in the y direction this is calculated on those green square points this is calculated on those red inverted triangle points and this is the balance of the two actually I write I am showing you ax but this adx which I am showing you is a sum of this two ax plus you do you do a balance and then you calculate this adx on each faces which will be the sum of this ax plus qx this is the total convection flux this is the convection flux on the west face which is entering this is the convection flux which is leaving in the x direction you are multiplied by the surface area of that vertical phase delta y this is the total convective heat transfer in the x direction this is the total convective heat transfer in the y direction and this is the total heat gained by convection which is a combination of enthalpy transport and the conduction transport. So, total heat gained by convection you multiply by this value delta T by rho Cp delta V and whatever temperature you get you added with the previous time level temperature. So, this is a pseudo code in the afternoon session you have been given codes for pure advection and convection and for convection you are given two different codes one dimensional and two dimensional. For one dimensional you will see oscillations and in a two dimensional you will solve the problem which I will discuss next the example problem. So, I had mentioned that we are taking a problem where there is a slug flow I had shown you in animation also in the beginning of this lecture of this topic where I had seen that we are taking a prescribed velocity field as u is equals to u infinity v is equals to 0 everywhere. However, temperature is changing because at the inlet temperature is ambient and the top and bottom wall of this channel is maintained at higher temperature Tw. Now, here before going into the results I want to mention that the boundary condition is written in non-dimensional form. So, theta is T minus Tw divided by T infinity minus Tw. So, at the bottom wall this T is Tw. So, theta becomes 0 and at the inlet T is T infinity. So, when T is T infinity theta becomes unity. So, the boundary condition is at the inlet non-dimensional temperature is unity and on the top and bottom wall it is 0 and this is the result which has been obtained at different axial location. This figure shows you the non-dimensional temperature profile at different axial location. There are two result the symbols represent the analytical solution proposed by Burmister. There is a book on convective transfer where this analytical solution is given and the lines here represent the result which has been obtained using the formulation and implementation details solution algorithm which has been discussed earlier. So, the red solid line and this red symbol you can see the line of a scalar as well as the symbol of the same color you can see they are exactly matching. So, which shows clearly that there is an excellent agreement or matching between the numerical and analytical solution. So, this is close to the inlet. So, as you move away from the inlet that so, near to the inlet the center line temperature is close to 1. But as you what happens is that when as the fluid enters heat transfer starts and thus what will happen. So, at the inlet fluid temperature is ambient wall temperature is higher, but as the fluid enters and passes across the channel then slowly the center line temperature will reduce sorry center line temperature will increase, but the way we have not done the non-dimensionalization the value of theta will reduce. So, there is a reduction in the center line temperature. Note that this is at axial location 2, this is at 6, this is at 12 h, this is at 18 h. So, this will continue. So, with this I had shown you the formulation, solution algorithm, implementation detail and the testing for two-dimensional convection problem. We had also taken one-dimensional steady state convection and there at shown you why oscillation occurs in central difference scheme. I had shown you for that there is an analytical solution. So, you can develop a 1D code and test with that problem and when you are developing a 2D code you can test with this problem. For both this problem you had been given a in the afternoon you will be solving both this problem and obtaining similar results. So, for teaching CFD we have given you sufficient material which you can use to prepare your lecture notes. So, with this I had come to the end of this topic and thank you for your attention. Let us have 5-minute interaction. Nithya Meenakshi, Institute of Technology Bangalore please ask the question. Yeah, the question is about the advection code you have developed and this actually tracks the temperature, but here we are not solving the Navier-Stokes equation. Is that right? Yes. So, which means that we can also solve this problem in totality by using the complete Navier-Stokes equation and energy equation? Yes, you are right. Can you just elaborate on this? The purpose is only for benchmarking or? So, the question is right now I have shown you advection taking an example of temperature, but indeed this is applicable for momentum transport and the question is can I elaborate further on it? I would request you to hold on because the next topic which I am taking I will be elaborating all those and there I will show you that the same advection we will apply for momentum transport across the control volume. So, if you have further question you can come back in the evening session. Thank you. Just one more sir, just one more. This free slip boundary condition and far field are the same? Yes, yes. VPCOE by Aramati please ask the question. Yes sir, my question is what is optimal advection discretization? Please elaborate it and what is the procedure for that? Slide number 27. Yes, it is an important and interesting question that what is the optimal advection scheme? As I said that each scheme has certain advantages and certain other disadvantages. So, we to know what is the optimal I will try to give you a flavor that optimal means that ultimately we want to achieve the accuracy by paying a price. So, what price we pay? Price we pay in terms of running the ACs and the computers. So, and unfortunately the optimal scheme is problem dependent in computational fluid dynamics. It is problem dependent, it is dependent on the range of Reynolds number also let us say. For low Reynolds number maybe you can find that first order of print is optimal, but at higher Reynolds number maybe if you can come up with a conclusion that quick scheme is optimal. So, what I am trying to do is that but that conclusion you can only draw if you take up a problem, run your code. However, in general for most of the cases quick scheme is considered to be better as compared to the other scheme as far as the price which we pay and the accuracy which we get. But this is highly dependent on problem and the range of governing parameter. If you want to confirm you have to run your own code for different schemes that is why in softwares you have all those options. We will stop the interaction here.