 Hello, good morning. I welcome all of you to the second day of lecture of computational fluid dynamics as far as my part is concerned. I know there were feedbacks that I was going very fast in my first lecture. This was intentional because the second part of the course which I will be covering which constitute the core part of the computational fluid dynamics after Prisroporonic had let down the foundations of fluid mechanics. The syllabus is lot although I am trying to cover it as a first course on computational fluid dynamics. So in my first lecture was just an introduction. So I was intentionally quite fast. So in the previous lecture I had given an introduction where I would like to emphasize certain points. First point which I want to emphasize is that I mentioned that what is the definition of computational fluid dynamics. I had suggested that you can define it as a method by which you can develop video camera like tool by which you can create a movie of fluid mechanics, fluid flow and heat transfer. And once you create a movie of fluid mechanics and heat transfer, fluid flow and heat transfer, the picture of this movies should corresponds to velocity vectors, streamline, vortices because one picture or one movie is not sufficient enough to give the complete story about the fluid flow. So we need different types of movies, different types of pictures to get an understanding. I also mentioned that if you create a movie of a flow situation to understand the characteristics of the flow, this is of primary interest to scientist. However for an engineer what is of interest is certain engineering parameter. Like an automobile industry they may not be that much interested in let us say flow structure behind the car or across an aeroplane. But what they may be interested is what is the price they have to pay as far as fuel economy is concerned and which is dictated by the fluid flow governing engineering parameters such as lift force and drag force. So once you create a movie you basically get a certain data and once you get a data in terms of the flow properties you need to post process this data near to the solid object to convert it into engineering parameter. So for that you have to do numerical differentiation to calculate the local parameters like local wall heat transfer or wall shear stress. And you may have to calculate, you may have to do numerical integration to calculate the global parameters or an average parameter like total rate of heat transfer on a wall or total shear force on a wall. Thereafter I had gone into the derivation of the continuity equation and momentum and energy equation. I had done the derivation in slightly different manner using a control volume based formulation. I derived the momentum and energy equation saying them to be a transport equation and I mentioned that this is a transport process which is going on as far as the momentum and energy conservation is concerned. And in this transport process I had mentioned that whenever there is a transportation there is a driver and there is a passenger. So I mentioned that the mass flow rates acts like a driver and the scalar quantities like the component of the velocity u velocity is the passenger in case of x momentum v in case of y momentum and temperature in case of energy equation. I also showed you an animation for flow between ice and fire to give you a feel. I would like to repeat that animation. So let us go to the animation I will show you in this window. So I will show you an animation although in the earlier lecture I had shown you as a static picture. But I believe that this animation this is just created by a power point animation and as all of your teacher I would draw your attention that you can create power point animation to give a better feel of a concept. So these are some of the few animations which I will be showing you. So let us suppose now you can see here that you will see an animation. So when you are standing between ice and fire and if I had mentioned that the diffusion phenomena which I am showing here as a conduction heat transfer the temperature which you experience is the mean of the two temperature that is 0 plus 100 divided by 2 that is 50 degree centigrade. This is I had mentioned about the two transport mechanism molecular transport and advective transport. So this right now the process which is being shown here corresponds to the molecular transport. Then the second transport which I mentioned advective transport here I am taking an example for heat transfer. This phenomena I would like to mention that they can be understood they can we can get a better feel of the advection phenomena through an example for heat transfer as compared to the momentum transport. Here if you are standing between ice and fire and the temperature which you experience depending upon the flow direction if the flow is from the ice side and I mentioned in my previous lecture that when we talk of advection phenomena we are saying a case where the flow velocities are very large. So if the flow velocity is very large from the ice side you experience a temperature close to 0 degree centigrade. Why so much side if the flow is from the fire side you experience a temperature close to 100 degree centigrade. Now let us take a situation where you have a combination of an advection and diffusion this is a more practical real world situation pure advection is a hypothesis because in practical situation you will not encounter pure advection there is always be some diffusion. So you cannot consider diffusion to be negligible. This is more practical situation which we call as a convection when you look into the flow as I mentioned earlier that the magnitude of the flow also dictates the temperature which you feel. So let us suppose from the ice side the temperature is 1 meter per second then let us then if there was no flow you were experiencing 50 degree centigrade. But when the flow started from the ice side the temperature which you will experience will be less than 50 degree centigrade. In the first example which I had shown here if the flow is 1 meter per second you get 40 degree centigrade and if the flow velocity increases from 1 to 100 you may experience temperature as low as 10 degree centigrade. Now why so much side if the flow is from the fire side with 1 meter per second you may experience a temperature greater than 50 degree centigrade if it is 1 meter per second let us say you get experience a temperature of 60 degree centigrade and if it increases to 100 meter per second you experience temperature close to 90 degree centigrade. So this was what I this give you a feel of the different types of phenomena and after this I had gone into the derivation of the continuity equation and then I went into derivation of the momentum equation and in momentum equation I would like to show you that these are the terms which represents the rate of change of x momentum y momentum and energy equation. And when you to a control volume analysis this is the x momentum which is going inside the control volume from the left surface and from the other surfaces these are the x momentum which are going in or out. So using this x momentum at the momentum fluxes x momentum flux multiplied by surface area at the different phases of the control volume you can just you have to just do a balancing out minus in and divide by the volume when you divide by the volume as these are flux term you get surface area divided by volume surface area divided by volume give you a length scale in the denominator and when you take the limit corresponding to that length scale you get a differential term. Similarly, we do in case of y momentum. So here y momentum flux multiplied by surface area is shown at the different phases of the control volume and here again when you do a balance and divide by the volume you get a differential term corresponding to what you call as the advection term in y momentum equation. When you go to the energy equation in a earlier slide it was x momentum flux and y momentum flux in energy equation here we are talking of an incompressible flow and in that case you get enthalpy fluid enters with some enthalpy it leaves with some other enthalpy here you do a balance of enthalpy and divide by the volume and end up with a differential term for momentum equation. So let us come back to the lecture. So that we have shown you the different fluxes as far as the advection term is concerned I have shown you animation for the diffusion phenomena, advection phenomena and a convection phenomena and other than this diffusion terms I had mentioned that other than the advection term we have a diffusion term and in case of momentum transport the diffusion terms comes from the viscous forces. I had shown you there are certain viscous forces which act at the phases of the control volume and basically when you apply when you take a fluid control volume you consider the viscous forces acting in the x direction and you do a balance you get a del dot sigma term and when you apply what I would like to draw an analogy between the fluid flow and heat transfer that whenever we do derivation like in case of heat transfer class may be in the first class of heat transfer when you derive you get del dot q and similarly in momentum transport when you do a derivation you get del dot sigma term then there are two types of laws in fluid mechanics and heat transfer one which is called as a fundamental law and second which is called as a subsidiary law. So, law of conservation of mass momentum and energy are fundamental laws and Newton's law of viscosity Fourier law of heat conduction are called as subsidiary law because what happens is that we correlate stresses with velocity gradient using this laws and using let us say Newton's law and we correlate the conduction heat fluxes with temperature gradient us using Fourier law of heat conduction. So, with that we get final diffusion terms which is del square k del square u in case of x momentum k del square v sorry mu del square u in case of x momentum mu del square v in case of y momentum and k del square t for energy equation. So, with this I had shown you the total mu stroke equation in dimensional as well as non dimensional form towards the end of the last lecture I had discussed about the flow properties and fluid properties. So, flow properties are those properties which represents a flow and they are velocities, pressures and the vortices and the fluid properties are the thermo physical property like density, viscosity, thermal conductivity and so on. I have also mentioned that there are two types of parameter one which is called as the governing parameter and second which is called as an engineering parameter. I had mentioned that whenever we do an analysis we try to do in a non dimensional form. So, the non dimensional form of this parameter like governing parameter is Reynolds number, Prandtl number, Weber number, Rayleigh number, Grashof number and the non dimensional form of the engineering parameters like non dimensional form of lift force is lift coefficient, drag coefficient, friction factor and so on. So, with this I had completed the last lecture and let us start today's lecture. I was left with 4, 5 slides of the previous lecture on introduction. So, I will start with those. This is a very important subtopic initial and boundary condition. I would like to mention that the governing equation or the conservation law which I had discussed earlier that same equation is applicable for various problems in fluid mechanics and heat transfer. However, so the same law, same equations are applicable for many situations of fluid mechanics and heat transfer almost all the situations in fluid mechanics and heat transfer. In some cases you may have some additional terms to for some complex situations as far as modeling is concerned. But this new stoke equation is applicable for large range of fluid mechanics and heat transfer problem. However, what you see is that you get different results. So, if let us say there are 100 problems and you get 100 different results what is that which makes the results different. What makes the result difference is the domain and the boundary condition. So, note that this initial and boundary condition acts as a jury to the problem. They dictate the solution. So, it is a very important thing you should try to understand the different types of boundary condition. If you look into the classification of boundary condition mathematicians have defined it into 3 types. Here I have taken an example of heat transfer to explain the boundary condition in a general manner. I would like to point out that this is basically a two dimensional and steady state heat conduction equation with volumetric heat generation. And in this equation what you see is that you have a first derivative with respect to time. So, you need one condition in time which we call as an initial condition. There are two derivatives in the x direction. So, you need two conditions at x direction. Let us say I take an example. Let us suppose you have a plate where taking a two dimensional heat transfer case. Let us say we have a plate whose which is taken from a furnace. Let us suppose when you took it from furnace the temperature is 200 degree centigrade. And let us assume that left wall is maintained suddenly when we took the this plate from the furnace we had subjected it to certain boundary condition. Let us assume that this plate is subjected to a constant wall temperature on the left wall. It is insulated on the bottom wall. On the right wall there is a constant heat flux boundary condition and on the top wall there is a convective boundary condition with H and T infinity as convective heat transfer coefficient and ambient temperature. So, with this problem set up now what I wanted to highlight is that you need two boundary conditions in the x direction. So, what are the two x direction? This is corresponds to x equals to 0. This right wall corresponds to x equals to l 1. There are double there is a second derivative in y direction. So, you need two boundary conditions in y direction which is y is equals to 0 which is insulated and y is equals to l 2 which is convective heat transfer boundary condition. So, this looking into the order of the differential equation you can know you can decide that how many conditions you need to solve that problem. Now, mathematicians have classified the boundary conditions into three types. Initially, where the value of the variable is prescribed note that here we are talking of temperature, but this definition is generic in nature. This is also applicable for fluid flow case. So, in fluid flow situations if the temperature is prescribed if the velocity is prescribed then that then also it is called as a Dirichlet boundary condition. Then we have a Neumann boundary condition is that where the gradient is prescribed like when it is insulated what is the gradient? Gradient is 0 when it is a constant heat flux what is the gradient? Gradient is minus q w by k. So, whether the constant is 0 or non-zero if the gradient is prescribed then that boundary condition is called as a Neumann boundary condition. However, if you have a linear combination like when you have a q conduction is equals to q convection at top wall then at top wall q conduction is equals to minus k dT by dy at y is equals to l 2 is equals to q convection is by applying Newton's law of cooling h temperature at top wall minus T infinity. Now, this expression consists of a gradient of temperature and the value of temperature. So, it can be expressed as a linear combination of temperature and it is normal gradient. So, when temperature is prescribed it is Dirichlet when gradient is prescribed it is Neumann and when you have a linear combination of the temperature of the variable and it is gradient then this is called as a robin or mixed type of boundary condition. This is a very important topic this example had taken from heat transfer. Now, let me take an example from fluid flow this is a classical problem of heat and fluid flow across a circular cylinder right now I am showing it as a circular cylinder, but it could be an aeroplane also. So, it is an external flow problem. So, in this case when you want to set up the problem as I said that if you want to create a movie you have to zoom to certain region in space. Similarly, you here you want to create a movie of let us say a flow across a cylinder or heat transfer across a cylinder then you have to zoom to some region in space. Here the space which we take to let us say create a movie of fluid mechanics is what is shown here this is the left wall this is the right wall and this is the bottom wall and this is the top wall. So, within this wall you have zoomed. Now, once you zoom to a region in space then as I said that this makes your computational domain and another thing you should know that you cannot arbitrarily zoom to a region in space. You may feel that if I take very small instead of this rectangle size of this rectangle if I take very small whether it is ok or not you have to actually understand the boundary conditions which you are using before selecting the domain. So, let us talk about the boundary condition. So, what is the boundary condition on the left hand side? Left hand side we are taking the inlet boundary conditions. So, when you talk of free stream flow the inlet boundary condition is u is equals to u infinity v is equals to 0 and temperature is ambient. We are taking a problem where this circular cylinder is having a temperature it could be two types of heat transfer problem. First constant wall temperature second constant heat flow. So, here at shown though both this cases. So, when there is a free stream flow we have to take an inlet boundary. So, the flow comes from this side we have to take an outlet boundary and it goes on this side. Now, let us look into the boundary conditions which we are applying and let us try to understand that as far as this position of the left wall and the right wall is concerned whether it could be arbitrary or there should be some physical basis of the position of this boundary. I would like to draw your attention again as I mentioned that CFD is just a numerical method where which is guided by a fluid mechanics principle. So, here we will use numerical method, but we have to whatever we do we have to be guided by the fluid mechanics principle. So, I am asking question that the position of this left wall can it be too close? What happens if it is very too close? Physically if you consider flow across any object let us suppose if you consider flow across a car let us assume that this instead of this circle there is a car here. What happens when the flow comes near to the surface of the car? Let me go to the outlet and then maybe you can appreciate this in a much better way. I am saying this is the outflow boundary conditions and this is the inflow boundary conditions. If you how does the streamline as far as your understanding fluid mechanics is concerned what do you feel how the streamline pattern will be? Initially it will be straight up to certain distance then what should happen? It will start the streamlines which are above the horizontal centre line passing through the cylinder will try to move up will have to move up. The streamlines which are below the horizontal centre line of passing through the centre of the circle. Let us take horizontal centre line which is passing through the centre of the circle and let us try to understand the streamline pattern. The streamlines which are above this horizontal line will initially be horizontal but when it comes close to the cylinder it has to go up. The streamline which are below the horizontal line of the cylinder horizontal line have to go down to obey mass conservation. Now if you take this boundary very close so what we have the deviation of the streamline basically means that the velocity is deviating from u is equals to u infinity. When the streamline is deviating from horizontal when it is becoming inclined what does it mean? When it is horizontal v velocity is 0. As soon as it gets inclined it means that there is some v velocity which is generated. So if you take this left boundary very close to this let us say car or a cylinder or an airplane what you are doing is that you are forcing that u is equals to u infinity which is not correct. So this left boundary needs to be and this depends upon the Reynolds number also. Like at Rhone and Reynolds number the deviation start with a much larger upstream length because the diffusion phenomena is more dominant in those cases. It is a lower Reynolds number case. So this upstream length let me call the horizontal distance from the centre of the cylinder to this wall as let us say upstream length. So this upstream length for lower Reynolds number should be much larger as compared to that at the high Reynolds level. So this is about the inlet boundary. Now let us go to the outlet boundary. What is the boundary conditions which we are using at the outlet? This boundary condition where do we use? Del u by del x is equals to 0. This we use for flow in a plane channel or for flow in a pipe. This is what is called as a fully developed boundary condition. You are saying that the inertia of the flow in the stream wise direction is equals to 0. Can you assume this fully? So this is basically a fully developed boundary conditions which are you are using at outlet with pressure is equals to 0. Whenever you use this boundary condition you are saying that the gradient of u velocity is equals to 0. Based on your understanding in fluid mechanics you have to make sure that the flow which is going behind this let us say car or another plane can whether the flow will be fully developed immediately downstream of this object or it needs some distance to get fully developed. What does the fluid mechanics say? You need some distance, quite some distance, large distance. Note that in computational fluid dynamics this outflow is a very critical thing. Many people use CFD software without proper understanding and they take this boundary very close and do not realize that they are using a fully developed boundary condition in a region where there is a flow separation where there are vortices where this expressions are not applicable. Like if you consider a car what happens behind the car when the flow passes through the top surface of the car on the rear side it gets separated because on the rear side there is a diffuser type of situation where the flow has to diverge. So it is an adverse pressure gradient which gives rise to flow separation. Now in the flow separation region there are vortices which are generated and the flow is not fully developed. So if you put your right boundary just behind the object then you are forcing this boundary condition saying that the flow is fully developed. But you know from the understanding of fluid mechanics that when the flow separation takes place then the flow has to go to much larger distance downstream after it becomes fully developed. You may say that at outlet why cannot we use u is equals to u infinity and v is equals to 0. I would say you can use but for that you need much larger downstream length to apply this boundary condition. If you try to understand the flow behind the object may be a car or an aeroplane initially there is a flow separation and then the flow becomes fully developed and then it reaches to u is equals to u infinity. And the position of this you want as close to this object as possible why? The idea is very simple. Let us suppose you want to create a video you want to zoom to a region where most of the action is happening. But here what I am trying to caution you is that you have to zoom to a region very intelligently because this boundary of this region you are applying a boundary condition and that boundary condition should be realistic, should be guided by the fluid mechanics principle. So understanding of fluid mechanics should be used in the positioning of this boundary. It cannot be used as boundaries at any position and you want it to be as close as the subject because most of the action is happening near to the solid surface and smaller is your domain size. So smaller is the size of the domain you can have larger number of grid and get more accuracy in the result or you have you can get the result in less computational time less computational cost. You have to run your computer you have to pay the electricity bill for less amount of time. So this is about the left boundary and the right boundary. If you go to the bottom boundary and top boundary again here you can say that why cannot I use u is equal to infinity v is equal to 0. But the boundary condition which I am showing you is a better boundary condition because as you move away from the cylinder initially this boundary condition will be obeyed then that boundary condition will be obeyed. So this is a better boundary condition. Using this boundary condition you can get an accurate result with lesser height of the computational domain. To use u is equal to u infinity on the bottom and top boundary you need a much larger domain height. So this is so here boundary condition which I am showing you is called as a free slip boundary condition. What free slip boundary condition means is like here I am showing you v is equal to 0. What is the v velocity on this boundary? This is a horizontal boundary. So v is basically normal velocity is equal to 0 and what is u velocity on this boundary? It is a tangential and what is this direction to the boundary? This is normal. So this is the normal gradient of tangential velocity is equal to 0. So in general a free slip boundary condition means normal velocity is equal to 0, normal gradient of tangential velocity is equal to 0. For temperature it is like an insulated boundary condition. Normal gradient of temperature is equal to 0. So this is a very important topic. So I had to discuss this in detail. So I had taken an example, a classic example of an external flow and with that I had discussed the boundary conditions for the fluid flow. But let me tell you that again in the earlier slide as I discussed this different types of boundary condition these are not only applicable for temperature that is in this slide but this definition is equally applicable for the fluid flow situation. So here you can see what is the type of this boundary condition? Here the variable is prescribed. So this is a Dirichlet boundary condition. On this boundary gradient is prescribed. This is a Neumann boundary condition. So here also you have different types of boundary. Here you do not have a Robin or mixed type of boundary condition. On the solid wall if temperature is prescribed it is Dirichlet. If the constant heat flux is prescribed it is a Neumann boundary condition. So after starting with the equations in a dimensional, non-dimensional form I had shown you the initial and boundary condition. So now another important thing which you need in as I said in fluid mechanics is that one is the what you call as the engineering parameter which are also called as the integral parameter. I am showing you here how to calculate this engineering parameter like drag force, lift force and the rate of heat transfer. Basically they are calculated using a surface integral. Like for flow across a car or flow across an aeroplane or flow across a circular cylinder you have to take the surface and the surface is a closed surface. And on that closed surface you have to do this integration. Now what is this integration? You have n dot sigma. What is this n? n is the unit normal vector. So if it is a curved surface unit normal vector will vary from point to point. If it is a horizontal surface what will be this n? It will be j. If it is a vertical surface this n will be i i hat. In general if it is an inclined flat plate this normal unit vector will have ai plus bj. Sigma is a second order tensor. So the dot product of a vector with the second order tensor is a vector. So you get net force. This force will act in any arbitrary direction. Now this force has a horizontal component which is called as a drag force and a vertical component. So this is called as a lift force. This is a total force which is acting on the object which may be surface of the car or aeroplane. This horizontal component if you want you have to take the dot product of this with i. So this if you take the dot product of this with i you get a horizontal component. If you take a dot product with j then you get this vertical component. And this stresses varies point to point on the surface of a car or aeroplane. You have to do a surface integral to calculate the total drag force, total lift force. Now when you want to calculate the rate of heat transfer, unit normal vector this is a here it was dot product of a unit normal vector with a tensor. In heat transfer stress is a tensor but what about the rate of heat transfer? Heat flux it is a vector. The dot product of a unit normal vector with another vector will give you a component which is aqx plus bqy. So this I am showing here more generic mirror if you look into undergraduate heat transfer books these are shown in much more simplified manner. Here I have taken an example of flow across a horizontal plate and I have shown you expression of the drag force and the lift force. Here the unit normal vector is plus j on the top side, minus j on the bottom side and using this expressions what you finally get is shown here. So I will stop here.