open systems now and the pattern will follow is initially we will be doing a few slides that is just to go slightly faster and after a certain point we will switch to the paper and pen mode. So, we begin with open systems. So, as you know open systems are something where we will allow mass to cross the boundaries. So, either mass can be coming in or mass can be going out or may be even both are happening. So, these are the typical systems we will be analyzing. So, initially we will have a few illustrations of open thermodynamic systems. Then we will take a specific system. So, basically it will be just one system where we will study and derive equations and then we will see that we will come up with a very general equation which we can use later. And finally, we will apply it to typical engineering system that when we say engineering systems it will be turbines, boilers etcetera such kind of systems will be applying it to. And finally, we will come to the numerical exercises that are those problems. So, illustrations now typical examples turbines, compressors, pumps I mean these are used in power plants, in refrigeration industries, fans, boilers, condensers, heat exchangers all of these are used in various engineering applications. I mean power plant is a typical example which will have nearly all of these boilers, condensers, heat exchangers, ducts, rooms and buildings. And then you know other system like car and human being these are also you can consider these as open systems of course, but no we will be primarily looking at may be the first 4 or 4 of these because these are more typical engineering applications. And we will see how to apply our analysis to these kind of systems. So, in normal parlance and open system is also called a control volume. And you must have seen such a thing in let us say in fluid mechanics where you know people would draw a sort of control volume and show lot of inlets and outlets out of these control volume. So, in a typical open system we will see that you know there are inlets, outlets or you know it could be you are probably analyzing a particular volume in space where all through each boundary there may be inflow and outflow happening. So, this is what we would typically call a control volume.  So, this is what a typical control volume will look like what we are going to analyze is a very simple system and we will see that this will work for us for most of our applications. So, this is a very simple open system that we are going to show a control volume. So, what is shown on the slide right now is just a system with one inlet and one outlet and all the shaded area is what is called as the control volume and it has been named as C v and where you can see the you know port mention i that is the inlet and where it is mentioned e that is the outlet and we are also showing that we can have heat transfer and work transfer. So, the q dot and w dot are the heat transfer and work transfer. So, let us look at the situation now the control volume would have you know of course a volume v a mass m and energy e and entropy s. So, these are properties of the control volume and as you can see we have put in the brackets the time t and this is because with time all of these could be changing. So, volume mass energy entropy all these are functions of time then we have the fluids at the inlet and exit and we assume that they are in local equilibrium that means that they will also have their own properties which can be clearly defined. So, the fluid at the inlet will probably have its own temperature its own energy its own entropy and they can be well defined and that is the case even with the exit fluid and you know we are going to assume that the situation at the inlet and exit is one dimensional and everything is uniform across a cross section. Now, if you have more than one inlet and outlet you know you can have you can model each of those or if you have continuous you know inlets and outlets what we do normally is take small areas on the surface and each of these is usually modeled you know or can be usually modeled as 1 d and it suits our purpose to do it this way. But right now we have a situation only with one inlet and one outlet and what we model is that everything that is coming in is one dimensional everything that is going out is also one dimensional. So, for the inlet state as we said it has its own properties these are density specific volume energy velocity etcetera and all these are entering at the inlet which has an area A i and for the exit we will have exactly the corresponding you know properties for the exit that is the area A e exit area and then the density specific volume energy velocity etcetera which correspond to the exit properties. So, these are as far as the system properties are concerned how is it interacting with the surroundings we will have as with any system there may be some heat transfer interaction with the surroundings and there may be some work transfer interaction with surrounding. So, what right now the work transfer that has been displayed on the slide has a subscript s typically you know this stands for shaft work, but you know we will say these are this is all the kinds of work that is done by the control volume which includes you know may be expansion may be stirrer work etcetera. But it does not include the work that is required to push the fluid inside the inlet and to push the fluid outside at the exit. So, W s includes all those components of work and we require may be some work to you know push the fluid inside the control volume and some work to put the fluid outside the control volume and we will see how to take care of this otherwise W dot s includes all other kinds of work which does not include these. So, again we come back to our control volume. So, whatever was the shaded area in the previous thing now it is not shaded this is called the control volume and if I take two instances of time t and t plus delta t. So, the control volume we are going to draw as if it is fixed in space and apart from that we will show in at least in this figure what we have shown are two plugs. These plugs are you can say they are fluid plugs one is shown at the inlet and one is shown at the outlet and the inlet plug you know it is shaded and we have marked t to t plus delta t. So, what you can imagine is that this is the amount of fluid that will get pushed into the control volume from a time which begins at t till t plus delta t. And at the exit there is a similar plug which will you know which is the amount of fluid which will get pushed out of the control volume from t to t plus delta t. The amount of you know volume or the amount of mass in these two plugs need not be the same it is just that this is the exact amount let us say we have you know we are monitoring the control volume for a fixed amount of time delta t. Then this is the exact amount which will come in that small delta t time. So, the inlet plug will correspond to the amount of mass which will come in into the control volume in the small time delta t and the exit plug corresponds to the mass which will leave the control volume in the small time delta t. We have still shown q dot and w dot in this figure and now we are going to just you know to make it clearly defined we have put alphabet. So, that we can define what the system looks like at different types of different points in time. So, you will see that there is a system which let me now you know shift to the paper I will just show you what we have put here. So, this is the inlet plug here and we are naming we are going to include this much part along with the C v at time delta t at time t. So, that is what is being done here. So, this C b is the start at time t and similarly E f is at the start of time t. So, basically we are going to consider a system that not only includes the control volume, but also the plugs. So, at time t we will choose the control volume plus the inlet plug and not the exit plug and at time t plus delta t we will now no longer have the inlet plug, but will have the outlet plug. So, how does this look like and why have we done this. So, what we are going to do is we are going to try to model something which looks like a closed system in the sense that its mass does not change. So, a b c d e f a. So, I will again go back to the previous figure. So, a is at the bottom of the control volume b c includes the inlet plug you know beginning a b c d is at the top and e f is at the beginning of the exit plug. So, it does not include the exit plug. So, a b c d e f a is the mass which is contained within the control volume plus the inlet plug. So, this is what is happening at time t. So, now I will get back to the next slide again. So, this is occupying the space a b c d e f a at time delta t and it occupies a b dash c dash d e dash f dash a at time t plus delta t. So, this is a closed system that we are considering that is because we took the mass of the inlet plug equal to the mass of the outlet plug. So, at time t we had the mass in the control volume plus the mass in the inlet plug at time t plus delta t c this boundary here b c gets pushed to b dash c dash and an equal amount of mass is getting pushed from e f to e dash f dash. So, what we have is that the mass in the system at time t the system includes at time t c v plus the inlet plug. That mass is the same as the mass in the system at time t plus delta t and the mass and the system at time t plus delta t is exactly having the same amount of mass it is basically we have considered a system when we consider a b c d e f we are considering a system across which no mass is flowing because all that has happened is that b c as if there is a piston at b c which has pushed the mass up to b dash c dash and an equal amount of mass is coming out from e f to e dash f dash at point t plus delta t. So, this has what has happened. So, basically this closed system occupies the space a b c d e f a at time t and it occupies a b dash c dash d e dash f dash a at time t plus delta t. So, no mass is flowing across the boundaries of the system at this place this is a closed system and we are going to apply our you know normal equations the first law and second law to the closed system because we know how to do it and we will see how we can now correlate this to the control volume which is the volume without the inlet and exit and the exit plug. So, this is a closed system as I said and we can apply not only the first law and second law, but initially we will have to apply the conservation of mass to the system and we will see how this is going to happen. So, just to refresh this is the system in the initial state which is a b c d e f. So, everything that is shaded which is the control volume plus the inlet plug. So, this is the system at time t and if I see how what has happened at time t plus delta t all that has happened is b c has been pushed to b dash c dash and e f has gotten pushed to e dash f dash and the mass within this has remained the same no mass is crossing any boundary. In fact, it is just the same mass which we are analyzing. So, this is what it looks at t plus delta t. So, you can just see what has happened you have pushed from here to here that is all that has happened between the inlet initial state and the final state. So, this is the initial state and this is the final state and this is how the system looks at time t plus delta t and q dot and w dot s have been drawn as before. So, now we will look at the process and interactions. The mass you can say we have put there is mass in the system at time t it is m t and at time t plus delta t it will be t plus m at t plus delta t of course, the mass is not changing but we are just denoting the quantities in the system which is m mass energy volume entropy and we are just mentioning that these exist at time t and these exist at time t plus delta t whether they are the same or not this is how we are going to analyze using not only the mass conservation of mass, but the first and second law. Apart from this you will see that you know in this time delta t the amount of heat interaction is q dot times delta t the amount of work interaction is w dot s times delta t and you will see that we have also shown w i at the inlet and w e at the exit. So, this are the or this is the work done or w i is the work done by the system when I mean it will be negative or positive depending on what is happening. So, actually at the inlet the surroundings are going to push b c to b dash c dash. So, technically it is a work done on the system, but by convention we will show all work interaction arrows as outside. So, there is a work interaction with the system does to push b c to b dash c dash in time delta t. Similarly, you will see that there is a work interaction happening at the exit. So, e f is getting pushed to e dash f dash. So, what is really happening is that the system is actually pushing against the surroundings and moving from e f to e dash f dash. So, there is a work interaction at the exit and that is what we have labeled as w e. So, these are the various you know interactions that are happening with the system. So, I think now I will just shift to using the white board. So, if I look at the at the conservation of mass, let us see what has happened. So, we will look at conservation of mass. So, if I had looked at the system, the system is the CV plus the inlet plug at time t and it is CV plus exit plug at time t. So, the mass in the system m system at t is actually equal to m system at t plus delta t. That is because all that has happened is really the inlet plug got pushed into the system and an equal amount of mass got pushed out and it is really the same mass and it was a closed system as far as we are concerned. And if we consider that as the system, really no mass has crossed the boundaries and what has really happened is that the mass is the same, sorry there is a mistake here I should have written t plus delta. So, m system at t is nothing but m of the CV plus m that exists in the inlet plug and m system at t plus delta t is just m CV. I can put this as t here and m CV at t plus delta t plus m which exists in the exit plug. So, both these are same I mean it was a closed system really no mass escaped these boundaries, but I cannot say the same about m CV at t and m CV at t plus delta t. We will have to see how this differs what really has happened is that m system at t and t plus delta t have the same mass. So, if I just want to look at what is happening at m CV t and m CV delta t, I should just figure out what is m in the inlet plug and what is m in the exit plug. If you look at the if I just look at the inlet at t and t plus delta t, the fluid was entering at a velocity v i and the area here is a i. So, what has really entered into the system is you can say rho multiplied by a multiplied by v all at the inlet and these are of course, this is the rate of change of I can say it is the rate at which the mass is entering. What you can say is that this cylinder really is just v or the length of the cylinder just v times delta t, this is v i and the volume of the cylinder it just a times v i a i times v i times delta t and the mass in the inlet plug is just rho times a i times sorry rho i times a i times v i times delta t. So, this is the mass at the inlet. So, similarly I will have a mass in the exit plug which will be just rho e multiplied by a e multiplied by v e multiplied by delta t. So, this is what is really happening at the inlet and exit. So, if I say what has happened here let me go back to the document now, this is the conservation of mass. So, I am just telling what I have already said m system t plus delta t is m system at t, m system at t is just the m in the control volume c v plus the mass in b c c dash b dash which is the inlet plug and m system at t plus delta t is just the mass in the control volume at t plus delta t plus the mass in the exit plug. And I have now already told you that the mass in the inlet plug is just rho a v at the inlet multiplied by delta t. Similarly, I can write a similar expression for at the exit and if I see what the first equation is the mass in the system is the same at t plus delta t and t. So, I will just equate this is m c v t plus delta t plus rho a v delta t at the exit this is the mass in the system at t plus delta t that is the same as the mass at t. So, this is what we have just written and if I just write an expression for m c v all I do is divide by delta t. So, I am writing getting an expression only for mass change of mass in the c v. So, m c v at t plus delta t minus m c v at t divided by delta t is just rho a v calculated at the inlet minus rho a v calculated at the exit. Now, what I do is just take the limit as delta t tends to 0. I mean this is the typical way in which if I take the limit I get the differential. So, I can just write the left hand side as d m by d t for the control volume is just rho a v at the inlet minus rho a v at the exit. So, I mean I hope you know you realize what happened I mean the mass in the system was not changing, but the mass in the control volume could be changing depending on how much came in and out. So, what we call just for short form we will call rho a v at the inlet as m dot i and rho a v at the exit as m dot e.  So, this is what we call the basic form of the conservation of mass. So, this you have of course, seen earlier I mean this is similar to expressions you would have seen in fluid mechanics. All that we are saying is that the mass in a fixed control volume the control volume the volume does not change the mass in the fixed control volume changes because there will be a difference in what is coming in and what is going out. If more comes in then what goes out then the mass in the control volume will increase if less comes in then what goes out then the mass in the control volume would reduce. So, that is all that is happening there is no mass getting created we are not talking of if some mass can get created. If such a possibility existed then you know then the d m by d t would have increased just because of production of mass, but there is no production of mass or destruction of mass all that is happening is the mass in the c v changes with time just if there is a difference in what is coming in and what is going out. So, now what we will do is we will have a similar explanation for the first law. So, we took the conservation of mass first now we go to the first law. The first law as far as the closed system is concerned was what we wrote earlier as delta e is q minus w. So, if a system if a closed system undergoes a process then the delta e of the system in after or at the end of the process is equal to q minus w where q and w are the heat and work interaction that the system had with its surroundings. So, in our case if we consider the same system the system is a closed system as we said. The system is such that let us say it underwent that process whatever we decided in time delta t. So, let me get back to the white board again. So, there was the system. So, the system initially was here at time t this is what the system looked like at time t at time t plus delta t it just you know the mass within the system is the same it is a closed system all that happened was some boundary at the inlet got pushed and some boundary at the exit got pushed out and this is what has happened. So, that is one of the processes that the system has undergone that is somewhere at the inlet a boundary got pushed and somewhere at the exit sorry this hash is not here this is the system at time t plus delta t. So, this is one of the processes that occurred during the time delta t. So, what we are trying to figure out is what is the change or what is the process that has happened from t to t plus delta t. So, one of the changes is the inlet got pushed in and the outlet got pushed out the other things we said is there is a q interaction that q interaction is nothing but q dot times delta t. So, we will just show it with an inward arrow I mean if it is negative it means the system was losing heat to the surroundings otherwise if it is positive it means that it was gaining heat from the surroundings and this is the shaft work which we are showing and as we said earlier this work is all other work that the system is you know doing apart from the flow work which was this work. So, this is what we call the flow work where you know there is work required to push the inlet boundary in and the work required to push the outlet boundary out. So, apart from this whatever else whatever other work the system may be doing that we have put in W s. So, this is all the other kind of work. So, if we want to know what is the net q and w interaction the q interaction is entirely here and the w interaction is all these other works plus the inlet flow work and the exit flow work. So, these are the q and w interaction that the system is undergoing and because of this there is a change in delta e which we can very clearly write with our first law here. So, let me get back to the presentation again. So, delta e as we said of the system it has undergone a process during the time delta t. So, delta e is just e of the system at t plus delta t minus e of the system at t and e of the system at t you should know is e of the control volume at t plus the energy of the inlet plug I mean that goes without saying. So, at time t whatever was in the system it is the energy of that. So, it is the energy of the control volume plus the energy of the inlet plug. So, we are you know taking care of the fact that the inlet plug of course, may have slightly different properties and the different energy, but the net energy of the system is the energy of the control volume plus the energy in the inlet plug. So, this is the energy of the system at time t and energy of the system at time t plus delta t is just again you know the energy in the control volume plus energy in the exit plug because the system really is occupying the control volume plus the exit plug at time t plus delta t. So, if we take the difference of these two energies we will get the delta e of the system and we can write similarly what the energy of the inlet plug is. So, it is just the mass of the inlet plug we had figured out that the mass of the inlet plug was just rho a v at the inlet multiplied by delta t that is the mass and the energy is just that mass into its specific energy e i. So, this is the total energy in the inlet plug we can have a very similar expression for the energy of the exit plug that is the mass in the exit plug which is rho a v calculated at the exit time delta t multiplied by the specific energy e e. So, this is the total energy in the exit plug. So, delta e is just the difference. So, now of course, it is unlike mass mass we said mass of the system it was a closed system mass did not change with time delta t the energy of the system can change that we have calculated. So, energy of the system at time t plus delta t minus energy of the of the system at time t this is the expression that we have written where the first two terms are the energy of the system at t plus delta t and the last two terms are the energy of the system at time t. So, again you know we are just clubbing the terms of the CV together I mean there is nothing different that we have done it is still the same expression for delta v. We are just bringing the terms for the CV together because finally, we want to write an expression for energy change in the control volume itself. So, as I mentioned q is just q dot times delta t that is rate at which q is entering assuming that is constant. So, in a small time delta t we can assume q dot is you know constant and q dot times delta t is the q interaction that the system is having during the time delta t and we have already I have already discussed what the W interaction is. So, the W interaction consists of W dot s times delta t that is the work interaction that the system is having which is not including the flow work at the inlet and outlet and W e is the work at the exit that the flow work and W i is the flow work at the inlet. So, these are the three components of the total work interaction during the time delta t. So, now we come back to what is happening or how do you calculate W e that is the work interaction at the exit.  So, all that is all that is really being written is p delta v here a e is the area v e is the velocity here. So, v times delta t is the length of the cylinder and a times v times delta t is actually the volume that has been displaced. So, p times delta v. So, I will again just show the whiteboard. So, at the exit what has happened is you have pushed this from here to here. So, this is the delta volume. So, let me just write it as volume because v was being used for the velocity. So, this is just a times the length of this delta volume is just a this is exit. So, it is a exit times l exit these are e the subscript is e and l e is just v e this is velocity times delta t. So, this is the p delta v work which has occurred at the exit and similarly there is a p delta v work which is occurring at the inlet. So, if you as I have mentioned earlier you know the way you can look at it is the system is actually probably performing work on the surrounding by pushing the exit plug out. So, if you look at it from the systems point of view that will be positive work and the surroundings are actually pushing the inlet plug in. So, that p delta v work actually is the work being done by the surroundings on the system and that can be considered as negative work as far as the system is concerned. So, this is what has happened as far as the work interaction goes. So, let me come back to the document again. So, here we have an expression for w e that is the work done at the exit plug that is for pushing the exit plug out that is w e which we call the flow work at the exit and w i we have written suitably with the negative sign here. Normally you know if you want to work vectorially you would have just seen that the normal vector for the area a i and v i are actually opposite to each other and a dot v would have automatically given you the negative sign here, but we are just going ahead and putting the negative sign to show that it is a negative work interaction. And so finally, what we have is the total flow work that is w e plus w i is just m dot e t e v e the m dot came in you see we have already substituted p a e v e delta t and we have substituted it instead a v delta t we have put as this is the specific volume v e by m dot e because rho a v or a e v by specific volume would have been the m dot. So, a e v e is just nothing, but m dot e times the specific volume. So, we have just substituted instead of a e v e m dot e into specific volume here the same thing we have done at the inlet. So, what we have done essentially is just try to write the expression in terms of m dot and that is because you know in the mass conservation equation just to simplify we had written d m by d t just m dot e minus m dot i. So, we had written everything in terms of m dot e and m dot i.  So, what we can see this is this expression is only the flow work it is m dot e p e v e times delta t multiplied by m dot i p i v i times delta t. So, the first law finally, we have all the components for the system in place. So, it was a closed system again repeating delta e is just q minus w. So, delta e is calculated by figuring out what the energy of the system is at time t plus delta t and subtracting the energy at the time t. So, this is the delta e that the system is seeing and the delta e that the system is seeing as we have already shown very clearly is nothing, but e at time e at time t plus delta t which is just e c v at time t plus delta t plus the energy of the exit plug which is the third term here on the left hand side. And you subtract from it the energy at time t which is just the e at e of the control volume at time t along with the energy of the inlet plug which is the fourth term here on the left hand side. So, this is the delta e for the system. So, it has we can assume that it has undergone a process in this time delta t and delta e is just q minus w q is nothing, but q dot time delta t where q dot is rate of heat interaction q dot time delta t is net q during the time t and the net w during the time t is just w dot s time delta t which is what we call normally the shaft work and the two flow work components. So, appropriately we have put the signs where now because of the negative negative sign the m dot i p i v i is coming with a positive sign. So, all we have written is delta e which is the left hand side is equal to q minus w where q is only the first term and w is actually having three components the shaft work and the two flow work components at the inlet and exit. So, this is the first law for our closed system and we will just write it or you know make it suitable for the control volume also all that we have to do is just divide by delta t as we had done earlier. So, first we just transpose and combine terms that is all the c v terms we put together on one side. So, on the left hand side we collect only the terms involving the control volume which are just the first two terms on the left hand side of the previous equation and all the remaining terms we are putting on the right hand. So, on the right hand side we have the q term the flow work term and the two energy terms for the two plugs and you will notice what we have done that is we have combined or let me write this again on the right. We have written e c v at t plus delta t minus e c v sorry c v at time t. So, this is the delta e only of the c v it is not of the system, but we are now trying to figure out how we can come up with an expression for e c v. So, all that we have done is put all the other terms on the right hand side.  So, what we have done is combined this e e plus p e v e and this e i plus p i v i because these two are the same. So, we are just combining e e plus p e v e and we realize immediately that this is a quantity which we have seen before e plus p v and we are going to basically you know this is one of the reasons that enthalpy is defined you know often in flow systems we will see that the combination of e e plus p v is very very common. We will just come across it every time and instead of just writing a big expression for it it is very useful to just you know invent a short form and write something else there. So, we just substitute h instead of e plus p v. Let me get back to the document.  So, once we have done the combining we will combine this and come up with the h term I am sorry it is not e plus p v that is h, but u plus p v that is h. So, we have initially just combined it and then we will see how to we will just ensure that u plus p v is taken together and we make h out of it. So, this is what we have done here first we have come transpose and combined terms we have put e plus p v together and we will just separate out e into its components. So, that is what we are doing here d e c v d t is just q. So, what we have done again if you I look behind I will just divide everywhere by delta t and take the limit as t tends to 0. So, I will get d e c v by d t here this is what has happened.  So, we are assuming that these are the components of the energy term. So, it is just the thermal internal energy u plus the kinetic energy plus the potential energy. If there is some other form of energy we can just add it to e right now we are assuming it is just made of three components and u plus p i v i as I pointed earlier that we are going to combine and say that is h.  So, we will have the next term here d e c v by d t it just q dot minus w dot and this w dot is only the shaft work it does not include the flow work. The flow work has been consumed into this inlet and exit you know energies you can say you know. So, we had only the m dot i e i and we just you know combine the flow work along with the energy here combined it along with the u term there and made it into h. So, we have just you know brought in the flow work term into these inlet and exit components here and this q dot and w dot are now purely the interactions with the surrounding we do not include the flow work. So, this is how we have formulated how the energy of the control volume changes as a function of time. So, this is a very general form. So, what is to be done next now? So, we will have to take up the second law and you can see the second law we can operate in more or less the same manner that is you know you take you take you take a control volume and you see what is the s of the system at time t and you see what is the s of the system at time t plus delta t. So, the entropy of the system at time t would include the entropy of the control volume plus the entropy of the inlet plug entropy of the system at time t plus delta t would be the entropy of the control volume plus the entropy of the exit plug. So, what we know from the second law is just that delta s is d q by t plus s dot p or you know delta s should have been greater than or equal to d q by t. So, we had just written it as an equation that delta s is d q by t during the time plus s dot p that is the entropy produced during that time. So, we can do a similar analysis what we will do is we will just do an analogy you will see that you know yes it was the same you should know what the equation we are coming up with. So, we will do the second law now by an analogy and we will take up special cases and then you know numerical examples. So, let us see what we did again for a typical open system with one inlet and one exit and we will just show a simpler schematic this is one control volume which we have drawn there is an inlet arrow i there is an exit arrow e and there is a q and w. Second law for open systems. So, as I said we will use an analogy. So, for the conservation of mass for a closed system we have d m by d t is 0 that is the mass of the system does not change. But when we applied it and you know applied it to a control volume what we got was that the mass of the control volume d m by d t of the control volume is just m dot i minus m dot e. So, this is what we got as the conservation of mass for the control volume. So, for a system the mass did not change for the control volume it will depend on what is the inlet and outlet masses. For the first law for a closed system if it was just a process we would have said delta e is q minus if I take a differential it would be d e by d t is just q dot minus w dot. So, this is for the system and if I now separate out w dot you know and apply it for a control volume I will see that there are these flow work components and energy coming in and energy going out and this is what we got for the control volume d e by d t we just got q dot minus w dot is m dot i e i plus p i v i. So, this is the inlet energy which is coming in plus the flow work at the inlet and the last term is the exit energy which is going out plus the flow work at the exit. So, this is the equation which we got for the control volume and we can do exactly the same for entropy that is if you will realize that I would have a term which is very similar to d s control volume by d t. Now, if I have that term you will realize that for the control volume at time t we had entropy is entropy of the c v plus the entropy of the inlet plug. So, I should have a term which is very similar to m dot i e i in this case. So, I would have for the entropy m dot i into s i on the right hand side similarly for the exit plug I would have m dot e s e term. Now, there was a flow work in the energy equation in the first law we do not have an equivalent term for the second law. So, we will have d e or d s by d t of the control volume we will have it as what is happening the q interaction plus the entropy production rate although we will be having a dot there and we would have what is coming in the rate at which entropy is coming in through the m dot i s i term and the rate at which entropy is leaving the system through the m dot e s e term. So, you will see that you know you just have to write what the equation would look for a closed system and you can immediately deduce what it would look for an open system. You would have to just do the same with the inlet and exit plug. So, for a closed system the second law is as such that is d or you know delta s of the system was q by t plus s dot or d s by d t just summation over all q dot by t is whatever q interactions are taking place plus s dot p where s dot p is what we call entropy production rate and as has been discussed earlier it will always be positive. So, for the closed system or sorry for the control volume this is what we will have where we will have d s by d t of the c b and I said you know this term the first term on the right hand side would look the same. There would be an entropy production rate which would be exactly the same which is the last term on the right hand side and because of the inlet and exit plug we would have an m dot i s i which is the rate at which entropy is flowing into the control volume and at and an m dot e s e which is the rate at which it is exiting the control volume. So, you can see this is more or less how we have derived the equation for the control volume for the first law. So, often once we have come up with this equation very often we will come and deal with the situation which are in steady state. So, in fact, most of our engineering analysis we do around system which are in steady state. So, for example, we analyze the turbine we will analyze when the turbine is running at steady state we rarely analyze in our systems especially any transient that is how does it start how does it go from 0 rpm to whatever rpm it should run at. So, such analysis are something that we are rarely doing in our course we are probably always going to do steady state analysis that is the turbine is running in steady state it is receiving steam at such and such you know pressure and temperature at the exit of the turbine there is a condenser what is the work output. So, this is the kind of question that we are going to answer and the turbine is going to run in steady state. Similarly, we will say that you know pump is working in steady state this is the inlet mass flow rate this is the condition at the inlet this is the condition at the exit how much work do we input into the pump or when we analyze a boiler we will not discuss that the boiler is cold now and we will take some time to start it up. So, we are not going to do such analysis right now in this course those are transient analysis. So, most of the analysis we will do are steady state analysis where we say you know m is coming in at this rate in the boiler it is going out with you know as super heated steam outside the boiler and everything as far as the boiler is concerned it is at steady state. So, each of these systems that is the boiler the pump the turbine all of them are going to be open systems where there will be you know one or more inlet. So, we will typically model all of these as you know just having one inlet where something is coming in and one exit where something is going out as far as the turbine or the boiler or the pump nothing is changing with time we are going to just analyze the steady state situation. So, you know we will not assume that flow rates are changing with time or the states within the boiler or the states within the turbine are going to change with time. So, none of these are going to change with time and this is what we call typically a steady state situation. So, we will have steady state situation. So, you know as I said you know the inlet flow rate and the exit flow rate are constants if the turbine is you know if we are extracting work from the turbine we are assuming steady state work extraction rate W dot S. So, that is the constant if it is a boiler normally there will be a Q dot interaction and we will assume that you know that is the constant those quantities do not vary with time. And as a result in the control volume m dot i m dot e you know not only are they constant, but they will be equal to each other and the mass in the control volume does not change. If it is changing with time it is not a steady state situation. So, the mass in the control volume is not changing similarly the energy of the control volume does not change entropy of the control volume. So, all the previous equations that we wrote earlier for mass conservation for the first law and for the second law the left hand side in all those equations would be 0. So, that is how we are going to analyze our situation. So, this situation is known as the steady state. So, the conservation of mass if the left hand side is 0 it was just d m by d t is m dot i minus m dot e. If d m by d t is 0 then I will know that m dot i is the same as m dot e. And since they are the same we might as well you know remove the subscript and just call it as m dot. So, this is what will happen with the conservation of mass that is m dot there is just one m dot which is flowing through the system. The first law which was d e c v by d t is q dot minus w dot minus m dot i h i that term I would just transpose the q dot minus w dot on the left hand side that is because the d e by d t term has gone.  So, this is how it has become simpler the left hand side d e by d t has gone out. And in the second law I will just write it as m dot s e minus s i is q dot by t plus s dot p. So, the d s by d t of the c v has gone to 0. If you look at the first law we have combined each of the you know kinetic energy term the potential energy term and the enthalpy term. So, instead of writing m dot multiplied by something at the inlet minus m dot something multiplied by the outlet. We will combine each of the terms h e minus h i and call it delta h across the system or delta e k across the system which is just the change in kinetic energy of the system and delta e potential across the system. So, all that we are doing is just combining the enthalpy term the kinetic energy term and the potential terms together and we will just write q dot minus w dot is m dot delta h plus m dot delta e k plus m dot delta e p. And the second law we are just going to write as m dot s e minus s i is q dot by t summation over all interaction plus the entropy production. So, these are going to be our laws for the open system which is working in a steady state. And you should realize this is of course, assuming that there is one inlet and one outlet. If there are many inlets and many outlets we can devise such problems. Let us say there were two inlets and one exit then you know m dot i would be made up probably of m dot i 1 and m dot i 2, but the addition of those two should have been equal to m dot e. So, net m dot i would have been still equal to m dot e and I would have called net m dot you know i is probably as m dot and we can then solve the equation further. Similarly, if we write the first law you know there is an m dot exit and m dot at the inlet. If there are many inlets we will just sum over each of these terms at the inlet. Maybe it will not be now easy to write an m dot delta h and m dot delta e k and m dot delta e t that is because delta h is not just straight forward h e minus h i, but if there are many many let us say inlets and one exit one exit then I cannot write a delta h term so easily, but the first term on the top for q dot minus w dot s. I can write that very easily and I can write that if there are two inlets I can write two separate m dot h plus v square by 2 plus g z for the inlet. So, I can have two of those. Similarly, for the second law you know there we have written it just as m dot s e minus s i. If there are more inlets and outlets we can just model that q dot by t you know there can as many as there are q interactions on various boundaries is just the summation of the q dot by t and the entropy production rate is just you know the net s dot v. So, these are the equations that we have. So, these are what we will use. We will see now that you know as we take on different engineering problem not all these terms are going to be significant. In fact, you know some of these terms we can neglect and we will you know justify why some of these terms can be neglected. So, for example, here in this previous equation you know if you are solving for a particular situation you know if it is adiabatic if someone says you know the system is the control volume is adiabatic. You will automatically know that in the first law q dot can be put to 0 or if someone says that the work interaction is 0 you will know that w dot has to be put to 0. Sometimes you know that you know something is flowing through, but the velocities are not you know very huge or significant. So, you know rather than trying to worry about the velocity and the kinetic energy term we may put v square by 2 s 0 because we think that they are not significant. Similarly, you know in most systems unless you know you are you know taking something to a height or water is falling over a distance there is a in usually in turbines and pumps there is hardly any change in the height between the inlet and exit of that control volume. So, if I consider the turbine as a control volume there is hardly going to be any change in the height at the inlet of the turbine and the exit of the turbine. In that case I would rather not deal with the potential energy term at all because g z at the exit and g z at the inlet are going to be the same. But there will definitely be cases where you know there is going to be a difference we have to recognize those cases and try to figure out when certain terms are significant and when certain terms can just be neglected because it is not worth the while to spend time over there. So, going back to this slide not all terms in these equations are significant and we will need to make suitable assumption. So, you know it is written whenever possible we will check whether these assumptions are valid. So, sometimes we will make a few calculations and try to see you know we may have assumed that you know velocity kinetic energy term can be neglected. But during our calculation maybe you know you will come across that know know somehow the exit velocities are high and then it was not really correct to neglect the kinetic energy term we will come and check whether you know really it was to neglect certain term. Sometimes we may think that if we compare work and work output of a system the kinetic energy terms will be neglected because we think that they will be very small. But when we do the calculation it may turn out the work interaction is so small that maybe the kinetic energy term is equivalent to the work input. So, in that case we will have to come back and maybe redo the calculations if those assumptions were not really valid. And we will look at some of the default assumptions that we will deal with some of the typical classes of devices. So, the devices that we will look at are turbines, compressor, pumps, boilers and such things. So, for some of these systems we will have a few default assumptions and you know you should realize that these are default assumptions and you may come across a situation where the default assumption is not correct. So, for example, normally you know in any turbine analysis we will assume that the turbine is really an adiabatic system. And you know most turbines are really well insulated and we try to minimize the heat interaction as much as possible with the surrounding. But you know if you come across a turbine which you want to analyze you realize that it has very less insulation and it is losing heat to the surrounding. Then you must be very careful you know maybe in our standard analysis as default you would have put that q dot for the control volume is 0. You must realize that you should not be doing this and if you come across let us say you are going to some industry and analyzing the turbine there you see there is no insulation. You better assume that the q dot term is not 0 that is it definitely is having some kind of a heat interaction with the surrounding. So, but by default we will have a few assumptions, but if the situation comes you should realize that some of these assumptions you must not take into consideration and you should just initially start with the full expression for the first law and the full expression for the second law. And then you know see if really you can throw out a few terms because this it is not too complicated there are not too many terms in these equations if you see it is just a q dot and w dot on the left hand side and the difference in edge the difference in kinetic energy and the difference in property. Similarly, in the entropy term there is a difference in the inlet and exit entropy there is a term which includes the q dot interaction and there is a term which is the entropy production. So, you can always start with this equation and then decide what you want to throw out. So, in some cases as we said by default we will throw out a few of the terms.