 Welcome back. Now we will consider the second law applied to open systems and we can go over this reasonably fast. And you will for a last time I will be drawing the open system along with those inlet and exit plugs and we will see how we can do the analysis reasonably fast. So let me consider the open system again here. So this is my open system with the inlet and exit plugs. So just as we did for the energy and the mass we can take the entropy of the closed system and the closed system at time t as you know consists of the control volume and the inlet plug. So let me write down the entropy of the closed system at time t. So the entropy of the closed system at time t is nothing but the entropy of the control volume and the entropy of the inlet plug which we know very well what it should be. This is nothing but m dot i delta t multiplied by the entropy at the inlet. So this is what the entropy of the inlet plug would be that is the mass contained in the inlet plug which is m dot i delta t. This is multiplied by s i. And of course one can write m dot i as rho i a i v i. I am not going to write that right now. And in a similar fashion the entropy at time t plus delta t can be written as follows. I should be writing t here. So the entropy of the closed system at time t plus delta t the closed system at time t plus delta t I will repeat again is the control volume and the exit plug now. And the entropy is just the entropy of the control volume and the entropy of the exit plug which can be written down of course as m dot e delta t multiplied by s e that is the specific entropy at the exit. Now this is as far as the entropy of the system goes. What we are now interested in writing the second law for the closed system and you will realize that it involves heat transfer at the system boundaries. So one can imagine a q dot occurring here. So this would lead to a heat transfer of q dot delta t in time delta t. If there were many locations at which the heat transfer was taking place with different q dots and different t's for example this one could be q dot 1 which is occurring wherever there is a temperature t 1. Similarly you could have another q dot here which I can label q dot 2 and it could be occurring somewhere else where the temperature was t 2 during the small time delta t and so on and so forth I would not label them. I could write all of these heat transfers as summation of q dot delta t to get the net heat transfer rate. But what I am interested in the second law is to write it as follows ds is dq by t plus sp where sp is the entropy production and we have discussed this when we were discussing closed system. So we will consider ds when we subtract the entropy of the closed system at time t from the entropy at time t plus delta t. But this expression is now made up of several q dots. So I will write a summation of q dot delta t's upon t. So these are all different q dots and t's depending on where the location is. Of course you can write this is summation over location i where both these would have subscript i. I would not use i here because we are using i for inlet. So just let me write down summation q dot delta t upon t. Similarly, the entropy production would depend on the entropy production rate during the time delta t and hence the total entropy production during the time delta t would be just s dot p times delta t. Now what do we get for ds? We will have to just subtract s at time t from s at time t plus delta t and this should be equal to q dot delta t upon t plus s dot p delta t. So now we know that the entropy of the system at time t plus delta t which is here is nothing but the entropy of the control volume plus the entropy of the exit plug which is nothing but m dot e delta t multiplied by s e. Similarly, the entropy of the closed system at time t was nothing but the entropy of the control volume at time t plus the entropy of the inlet plug which I can just write as m dot i delta t multiplied by s i. Now what one can do is keep the terms with entropy of the control volume at the left sorry here I must write t plus delta t. So I will keep the terms with the entropy of the control volume on the left side take all terms on the right side I will divide by delta t throughout. So there will be no delta t in any of these and then we will take the limit as delta t tends to 0. So we will again get an expression which it is very clear to you which will look very similar to the expression that we got when we were discussing the conservation of mass and the first law. So we will have d scv by dt on the left side let me take it up in the next slide and this is nothing but sigma q dot by t the delta t of course we divided by delta t throughout and took the limit as delta t went to 0 plus m dot i s i minus m dot e s e plus s dot p that is the entropy production rate. So you will notice that it is very similar to what we derived for the mass conservation and the first law we have something very similar from the closed system here as well as here whereas this is the extra term that has come in due to mass coming in and going out and carrying its own entropy in and out. Of course just like we discussed for the closed system you should realize that the entropy production can only be positive because that was the restriction on it. So I must write after this that s dot p is necessarily greater than or equal to 0 it can be 0 but it can never be negative it will always be either a 0 or a positive quantity. So this is our final expression for the second law of open systems. So please have a look at it and notice the similarities and differences of this expression and the previous two expressions that we derived. Thank you.