 In the previous lecture we derived the Navier-Stokes equation and towards the end we made a conclusion we arrived at a conclusion that there are situations when you require to solve the Navier-Stokes equation in conjunction with the energy equation. I mean one example that we cited to establish that fact is that when density is a function of temperature and pressure. But I mean there are several other considerations when you may not relate density as a function of pressure and temperature through equation of state but the sensitivity of density with temperature is just given in terms of a volumetric expansion coefficient which comes into the picture by creating a density gradient due to temperature gradient that drives the flow and that is called as natural convection or free convection. So there are various possibilities when in which the energy and the Navier-Stokes equation they need to be dealt with together. So there are situations when they are coupled there are situations when they are not coupled for example in a heat transfer problem in which rho is a constant then you can solve the Navier-Stokes equation separately use that velocity field in the energy equation to solve for the temperature field. But if rho is a variable then you have to consider them coupled. So these are various possibilities. Now we will move on to the solution of the I mean the derivation of the energy equation. So to do that we will use the Reynolds transport theorem. In the Reynolds transport theorem now N is the total energy which is the summation of internal energy, kinetic energy and potential energy that is what we consider in thermodynamics. In classical thermodynamics we consider all forms of energy other than kinetic and potential energy we club that together and give it our name internal energy. So internal energy so just in thermodynamics books here we just use a little bit of different notation as compared to the thermodynamics books. In thermodynamics books the internal energy is given by u but we are already using u for velocity. So we are considering i as the internal energy per unit mass just a notational difference but otherwise these are very familiar forms of energy that you know from thermodynamic considerations. Small n is capital N per unit mass. So small n is what small n is i plus v square by 2 plus gz okay. So now the Reynolds transport theorem if we use n as capital E the total energy of the system then this is dE dt of the system. So dE dt of the system is what dE dt of the system is nothing but the change within the control volume. So the del del t integral of rho E dv plus the outflow minus inflow rho E v dot da v dot da is actually v dot eta into da as scalar where eta is the unit normal vector. So you are by this time very familiar with these types of terms and we are just going to use those here. So now under conditions of non deformable control volume you can take this del del t out of the derivative and for stationary control volume the relative velocity is same as the absolute velocity what with the velocity that you have used here and you can convert this area integral into volume integral by using the divergence theorem. So you will get this particular form right. So in place of ev dot da it is divergence of ev sorry rho is there. So rho ev dot da is divergence of rho ev. So divergence of rho ev is del del xj of rho E uj okay. So that is what is written here. Now you can see that so dE dt of the system can be written as the right hand side can be simplified further. So this is what form conservative or non conservative this is the conservative form remember we can always convert the conservative form to the non conservative form by using the continuity equation. So that is what we are doing in the next step. So what we are doing you have rho into del E del t. So del del t of rho E is what rho del E del t plus E del rho del t these 2 terms. Then del del xj of rho E uj rho uj into del E del xj plus E into del del xj of rho uj just like what we did for the Navier-Stokes equation very similar. And then you can see that these 2 terms they combined together become 0 because that is nothing but the continuity equation. So you will get rho into del E del t plus uj del E del xj what is this? This is the total derivative of E right. So rho dE dt the total derivative of V is acceleration the total derivative of D is just total derivative of E we do not have any special name associated with that. So the right hand side is the rho into total derivative of E dV and the left hand side is dE dt of the system. So in the next slide we will see how do we relate the dE dt of the system with heat transfer and work done and for that we relate that with the first law of thermodynamics. So let us go to the board a little bit to understand the background. So let us say you have a control volume the first law for a system. So first let us consider these are the system why we have written it in terms of the system because first law is traditionally defined for a system in fact the first law is traditionally defined for a system undergoing a cyclic process that is the cyclic integral of heat is proportional to the cyclic integral of work but that can be converted to a law that governs for a system undergoing any process need not be a cyclic process. So for that we have the positive sign convention that we commonly follow is heat transfer to the system that is considered to be positive and work done by the system that is considered to be positive okay. So energy entering the system in the form of heat is positive energy leaving the system in the form of work is positive work. So what we can write here is so this is just an energy balance basically say let us say you transfer some heat to the system. So what will the system do with that heat? It will do some work if it does not do some work the remaining part will change the simply increase the energy of the system right. So that is the basic energy balance give some heat to the system it can use the part of the heat to do work then remaining part will increase the energy of the system itself. So that is what it is and this d if you consider transport this is actually meaning total derivative this d dt because it is about the system. So the total change because of transport and everything change with respect to time everything is considered within it. So you can see that d dt of the system you have to remember it is not a must to take this sign convention you could have taken a different sign convention for work and then simply this will become plus instead of minus nothing more than that okay. So the next step is that remember that while deriving the Reynolds transport theorem we took a limit as delta t tends to 0 so that the system is tending to the control volume. So this for the system is as good as this for the control volume these are the thermodynamic parameters with which we are relating to the d dt of the system and these parameters we will write in terms of the transport. So let us try to do that now so q dot cv what is the rate of heat transfer now just like in continuum mechanics in terms in force you have surface force and body force similarly heat transfer volumetric heat transfer and surface heat transfer. So volumetric heat transfer let us say that q triple prime is the rate of heat generation within a volume per unit volume. So for the volumetric term this is this very simple this is q triple prime is per unit volume you multiply it with dv and integrate it over the control volume. What about the surface term the surface term is given by what surface term is given by heat flux in heat transfer whatever is the so let us say this is the control volume let us say there is a heat flux q typically q double prime we consider as heat flux and triple prime as volumetric heat generation that is the standard notation that we follow. So q double prime let us say this is a small area dA so q double prime which is called as the heat flux vector dot eta dA is the rate of heat transfer through dA. What is this eta? This eta is a unit normal vector so we can integrate this but we have to keep in mind one thing here positive heat flux is in this direction but by the sign convention that we are using in first law of thermodynamics positive heat transfer is heat transfer to the system or to the control volume to adjust for that we use a negative sign here. So minus integral of so what is this minus integral of divergence of this is control surface using the divergence theorem so this in a shorthand notation this is what index notation del qj del xj okay. Now this is about the heat transfer what about the work done w dot cb for work done what are the forces that we are considering surface force and body force. So first let us write the body force I will I am not committing about the algebraic sign the algebraic sign we will discuss later on but first let us write the contributions. So surface force let us first write for the body force it is more trivial so body force is what bi into dv is a if you take a volume element dv then the force acting in the ith direction is bi dv and work done is what dot product of the rate of work done is dot product of force and velocity right. So bi into ui this is basically b dot b so bi ui dv for surface force surface force is given by the traction vector so plus ti da one of our previous lectures we have discussed that this is nothing but the vector tau dot eta where what is this tau tau i1 i plus tau i2 j plus tau i3 so in terms of the divergence theorem what it is integral of divergence of what this is control surface this is control volume control surface divergence of it is not visible I think computer is blocking it so write it separately write it here. So tau that is del del xj of tau ij ui dv integral and all those things so we have represented all terms in heat transfer and work in terms of volume integral only thing which we have not yet done appropriate is the algebraic sign of this wcv. So why it is so because here we have considered work done by a force as positive work but in thermodynamics positive work is done by a system when it does work against a force that is a resist it overcomes a resistance a thermodynamic work is what that you have a resistance you overcome the resistance to do some work so that means that is what is positive work that that is why energy leaves the system because you have to overcome the resistance to do the work and work done by the force is just having an opposite thing. So to make up for that actually you have to put a minus sign here I mean either in the left hand side or in the right hand side if you take care of all these so let us see that let us go get back to the slides to summarize what we have learnt by now first law of thermodynamics then the expression for heat transfer and work done and of course with the positive like the positive sign convention as per the standard consideration that we have in thermodynamic text books. So these expressions we have just now derived now if you now these expressions you can see left hand side and right hand side you have left hand side you have in one side right or left is up to you. So rho into d e d t d v integral of that is the is equal to the heat transfer and work done d v equal to 0. So that means because your choice of the control volume is arbitrary this is what you get straight forward from the previous expression. So this is the rate of change of energy term this is the heat transfer term this is the work term. So we will take it up from here now this is what this is conservation of what this is conservation of the total energy of the system but in the in heat transfer we are mainly interested in the conservation of the energy in its thermal form that means we are basically talking about the internal energy. So we must sort of subtract the kinetic energy conservation from here to get the energy conservation in terms of internal energy. So that we will do let us go to the board to do that. So to get the kinetic energy equation we start with the Navier's equation. See at this stage we do not give us specific emphasis to whether the fluid is Newtonian Stokes here and all those things we start with the general equation of motion. So we have rho d u i d t that is equal to delta y j del x j plus b i. So what we do is we multiply this with u i. So you have rho d d t of u i square by 2 right and then this is u i del tau y j del x j plus u i b i. What was our total energy equation? Let us write at the top rho d e d t is equal to q triple prime minus del q j del x j plus b i u i del x j plus del del x j of tau i j u i. Now we subtract this equation from this equation. If we do that you have rho d d t. See what we are claiming is that if we subtract u square by 2 from e we will get the internal energy. Question is where has the potential energy gone? This is a very important point and we must discuss it very carefully. See we have already considered the work done by the body force and the potential energy is nothing but the manifestation of the work done by the body force for a special case where the body force is the gravity force okay. So we should not take one effect twice because we have already considered work done because of the body force we should not duplicate it by considering the potential energy term again in the energy term. Either we will reflect it in the work term or we will reflect it in the energy term but not in both. So because we have already reflected in the work term we will not reflect it in the energy term and simply if you subtract we get the internal energy then this is equal to q triple prime minus del q j del x j. Now this term is a collection of 2 terms del del x j of tau i j into u i plus tau i j del u i del x j. We can easily see that this term and this term they get cancelled. u i del tau i j del x j. So what you are left with is tau i j into del u i del x j. You may try to represent this is the non-conservative form. You may as well get a conservative form by using the continuity equation. So for example this term d rho into d i d t. So you can write rho del i del t plus rho u j del i del x j. That is the definition capital d d t is del del t plus u j del del x j. Now we just add plus i del rho del t plus del del x j of rho u j. This is just adding 0 because that is the continuity equation. So now what we can do is you can combine this term with this term. So what is that? Del del t of rho i and then this term with this term del del x j of rho u j i the product rule. So you can see that you may very easily switch over from conservative to non-conservative and non-conservative to conservative just by using the continuity equation. Again let us stop for a moment and try to understand the physics of this equation before we move further. So this is what? This is the total rate of change of internal energy and it is a combined consequence of heat transfer and work done. So the heat transfer is the volumetric heat transfer and the surface heat transfer. And the work done one important thing that you can understand is that work done due to body force cannot give rise to heating or cooling. It is not giving rise to a change in internal energy because it is just like work done by body force is just like creating a rigid body type of motion. So that cannot give rise to heating or cooling. So heating or cooling must be associated with what? The work done by the surface forces. So the surface forces should be responsible for heating or cooling and the reason is and the next question is that we are saying heating or cooling but is it trivially heating or is it trivially cooling? Now we will show that it is trivially heating and not cooling and we will see that if we consider that that is cooling then that will violate the second law of thermodynamics. So it is trivially heating and the reason is straightforward. So like viscous effect you can see that this tau ij is eventually related to the viscous effect. So viscous effect gives a sort of shearing between layers of fluid molecules. So instead of fluid molecules if you consider your pumps, if you rub your pumps your pumps will not become cooler but will become hotter because it is what it is, what it is? It is an irreversible conversion of the work done due to viscous interaction to intermolecular form of energy that will increase the temperature. So basically this is like a heat source that will increase the temperature. So it is something like this that there is a work done to overcome the viscous resistance between various fluid layers but this work is irreversibly converted into intermolecular form of energy and that will increase the temperature of the fluid. So this entire work is converted into the thermal form of energy. So let us go to the slides to sort of summarize this discussion in the board. So we had the total energy equation. We subtracted the mechanical energy equation from there and then we got the equation in terms of the internal energy. Now see let us get back to the previous slide. See one important consideration is this tau ij del ui del xj. What is this term? So we claim that this term should trivially give rise to a heat generation and not heat cooling. So it is possible to generalize this but to show this it is more convenient if we consider a special type of fluid that is the homogeneous isotropic Newtonian and Stokesian fluid to demonstrate that this term which is called as viscous dissipation term in the language of heat transfer that is always a positive term. So we will try to do that. Let us come to the board to show that. So tau ij del ui del xj. Let us assume that the fluid is homogeneous isotropic and Newtonian to begin with. So tau ij is –p delta ij plus lambda del uk del xk delta ij plus delta ij del xk delta ij plus mu del ui del xj plus del uj del xi for Stokesian fluid when we do the algebraic simplification we will use lambda is equal to –2 third mu in some in between steps. This into del ui del xj. So first term –p delta ij into del ui del xj. What is this? Delta ij is equal to 1 only when j is equal to i. So this becomes –p del ui del xi. So this is nothing but what? Divergence of the velocity vector. So this is like see most of you have studied basic thermodynamics. So see I mean one deficiency of all learning is we sort of try to in our mind interpret each course in the way in which we learn and do not relate that with the other. So we learn fluid mechanics separately. We learn thermodynamics separately. We learn heat transfer separately and it is not very common that we try to relate this but just try to observe this. Can you find any similarity of this with PDB? The thermodynamic the work done in a thermodynamic process PDB. So that this is because this is what? This is like dv the change in volume per unit volume. So this is interpreted like that PDB type of term okay. But this is not related to viscous effect. So this effect is there even if the fluid is in viscid. So plus lambda del uk del xk into delta ij into del ui del xj is what? Del ui del xj del ui del xi. Can you write del ui del xi as del uk del xk? We can do. There is no problem with that because it is the basically repeated index. Plus mu del ui del xj plus del uj del xi into del ui del xj equal to. So minus mu del xj del p del uk del xk plus lambda this into this del uk del xk into del uk del xk. So this into this is del v square. Then to simplify this term we will do it in a little bit systematic way. So what are the values? i is equal to 1, j is equal to 1. I am just writing the values of i and j here. Again it is not visible I think. So let us write it somewhere else. Maybe at the top of the board. So i is equal to 1, j is equal to 1. This is one set, i is equal to 2, j is equal to 2, i is equal to 3, j is equal to 3. This is one set. So then i is equal to 1, j is equal to 2 and i is equal to 2, j is equal to 1. This is another set, i is equal to 2, j is equal to 3, i is equal to 3, j is equal to 2. This is one j is equal to 2, this is one set, i is equal to 1, j is equal to 3, i is equal to 3, j is equal to 1, this is another set. Just see whether I have covered all. So if you systematically club all these, it is possible to simplify the terms in a systematic way. So i is equal to 1, j is equal to 1, mu is common, i is equal to 1, j is equal to 1, del u1 del x1 plus del u1 del x1. So 2 del u1 del x1 that multiplied by del u1 del x1. So 2 del u1 del x1 square. So this we have taken care of. Then if i is equal to 2, j is equal to 2, similar term del u2 del x2 square, i is equal to 3, j is equal to 3, del u3 del x3 square. Then i is equal to 1, j is equal to 2, del u1 del x2 plus del u2 del x1. And i equal to 2, j equal to 1 that is also del u1 del x2 plus del u2 del x1. So del u1 del x2 plus del u2 del x1 times del u1 del x2 into del u2 del x1. So plus if I make any mistake please let me know, I mean new people are much younger people who do algebra much better than me. So if there is any mistake please let me know. So this then, so this we have covered, i is equal to 2, j is equal to 3 and i equal to 3, j equal to 2 essentially the same term. So plus del u2 del x3 plus del u3 del x2 square plus del u2 del x2 square plus del u2 del x3 this term del u1 del x3 plus del u3 del x1. So see we have got already 3 positive terms and so remaining terms we will manipulate with these 2. Now let us substitute lambda is equal to minus 2 third mu. So this is minus p del uk del xk plus del u3 del xk plus let us take a term 2 mu by 3 common. So then this becomes 3 del u1 del x1 square plus 3 del u2 del x2 square plus 3 del u3 del x3 square minus this is a plus b plus c whole square. So a square plus b square plus c square plus 2ab plus 2bc plus 2ca. So minus and there is a 2 out sorry there is a 2 mu by 3 already there. So minus this one then minus 2 del u1 del x1 into del u2 del x2 minus 2 del u2 del x2 into del u3 del x3 minus 2 del u1 del x1 into del u3 del x3 into del u3 del x3 minus 2 del u1 del x1 into del u3 del x3. Then this is 2 mu by 3 then we have a plus term plus mu into del u1 del x2 into del u3 del x2 into plus del u2 del x1 whole square plus del u2 del x3 plus del u3 del x2 whole square plus del u1 del x3 plus del u3 del x1 whole square. I am afraid we are running out of space in the board but somehow we have to manage. So then let us simplify this further. So tau ij del ui del xj is equal to minus p del uk del xk plus mu 2 by 3 into 1 half is not required because del u1 del x1 square and del u1 del x square makes it 2 del u1 del x square. So half is not required. Then the last term that is plus so this entire term in the square bracket this entire term in the square bracket you can see is positive because it is a collection of some squares. So this term this is called as a viscous dissipation function or phi viscous dissipation function. So this is which is this phi is greater than equal to 0. So this is minus p del uk del xk plus mu phi. So let us get back to the slides to see to summarize up to this stage. So we have derived the energy equation in terms of the internal energy where you have tau ij del ui del xj term and then the tau ij del ui del xj term we have written in terms of the velocity gradients and the viscosity for the Newtonian and Stokesian fluid of course with homogeneity and isotropy in addition in consideration. So you have basically substituted tau i I mean substituted the viscous dissipation function here. So that tau ij del ui del xj is equal to minus p into divergence of velocity plus mu phi. Now let us simplify this further. So what was our governing equation del del t of rho i plus del del xj of equal to minus del qj del xj plus q triple prime plus tau ij del ui del xj. So that is now minus p into del uk del xk plus mu phi. Now our strategy will be that we have derived the equation in terms of the internal energy but normally we as an engineer or even as scientist we do not measure internal energy. Internal energy is not a measurable quantity. We have thermometer to measure temperature we do not have internal energy meter to measure internal energy. So what we will do is we will try to convert this expression in terms of internal energy to an expression in terms of temperature and that we will do via the definition of enthalpy. So the enthalpy h is equal to i plus p by rho. The common thermodynamic notation is h equal to u plus pv that specific volume is 1 by density. So you can write rho i is equal to rho h minus p. So left hand side so rho i is rho h minus p. Here also we have substituted rho i as rho h minus p. So then you can write this as del del t of rho h plus del del xj of rho uj h minus del p del t minus p by rho uj h. So this term we have written in terms of a product rule. Then these two terms together how it can be simplified if you take help of the continuity equation now it should come to your practice right immediately you can say rho capital D dt of h. Then minus of now del p del t plus uj del p del xj what is this? Del p del t plus uj del p del xj what is this? This is the total derivative of p. So minus dp dt minus p del uj del xj you can write as good as del uj del xj. Now you see the left hand side and the right hand side. The del uj del xj here gets cancelled with the I mean p del uj del xk gets cancelled with p del uj del xk. So this type of this term will not give rise to any effect in the enthalpy change because on both sides it is cancelled. So you are left with rho dh dt minus dp dt is equal to q double sorry del qj del xj plus q double prime plus mu phi sorry q triple prime plus mu phi okay. So we have achieved one step we have reduced the energy equation in terms of internal energy to energy equation in terms of enthalpy and then in our next class we will reduce this in terms of temperature. So that will give rise to the well known form of the energy equation. So to summarize let us go to the next slide I think or this slide itself which is there in this in the view graph. So if you use h equal to i plus p by rho so you have rho dh dt minus dp dt is equal to q triple prime minus del qj del xj plus mu phi. So this is the generalized thermal energy conservation equation. In our next lecture we will take up from this equation and then write h as a function of t and p. We will discuss in details that when we can write h as a function of t and p and when we cannot write h as a function of t and p. We will assume that we can write h as a function of t and p under those conditions when it is valid and then we will proceed to the derivation of the energy equation expressed in terms of temperature. So let us stop here today. Thank you very much.