 The next example is also somewhat involved. It consists of a, we have an apparatus here which is nothing but a piston cylinder apparatus, but with a membrane or a diaphragm or a partition in between. So, this partition is rigid. So, it does not flex. It is rigid, very thin and it does not store any thermal energy. So, there is no energy change. The energy change in the diaphragm may be neglected. So, it is rigid which means that the volume of the compartment containing nitrogen remains constant throughout. So, the air is initially at 500 kPa, 473 Kelvin and the nitrogen is at a higher pressure volume, initial volumes are given. So, we now compress the air slowly until the final pressure of nitrogen is 1100 kPa. We are asked to calculate the work and heat interaction for the air, its final temperature. So, for nitrogen the molecular weight is 28 and gamma again is 7 films. So, we can calculate Cv for nitrogen and R for nitrogen. So, based on the given information the mass of air may be evaluated from the equation of state to be 0.055 kilogram and the mass of nitrogen to be 0.107 kilogram. And as I already mentioned nitrogen undergoes a constant volume process. So, we can evaluate the final pressure, I am sorry the final temperature since we already know the final pressure. The final pressure is given, volume is known. So, we can easily evaluate the final temperature to be 519 Kelvin. So, if I take system to be air plus nitrogen plus partition, we can evaluate first law like this. Remember the partition does not store any energy, there is no change in energy of the partition. So, delta E is equal to delta U of air plus delta U of nitrogen. So, this is equal to delta U of air plus delta U of nitrogen. Of course, the fact that we are neglecting the energy stored in the partition is not a major disadvantage or a limitation because if properties of the partition are known then we can easily include that in this expression as delta U partition. So, it is not a limitation of the analysis, we are simply saying that for this particular problem the partition is quite thin. So, the energy stored in the partition may be neglected, but that is not a limitation of the analysis itself. So, no heat is supplied, the entire cylinder is insulated. So, we take Q to be 0. So, if you rewrite delta U as MCV delta T, we get this expression. Now, if you substitute the numerical values, we get the work interaction for the for this system to be minus 5479, that is negative. So, an external agent is pushing the piston down compressing the air. Now, work interaction for air itself is just minus 5479.61, all of it is actually work interaction for air because the nitrogen is undergoing a constant volume process. So, the work interaction is 0. Now, if you apply first law to a system that contains the air alone. So, notice that initially we took the system to be air plus nitrogen and we calculated the work interaction for the air. Now, we are going to take the air alone as the system and apply first law. Notice that if you take air alone as a system that is displacement work for the air and there is also heat interaction between these two. No work interaction because this part of the system boundary for air does not deform. No work interaction, but there is a heat interaction between the air and the nitrogen as the air is compressed, it gets heated up and there is heat transfer of heat across the partition. So, the partition is not given to be insulated, only the piston on the cylinder are given to be insulated. So, we apply first law to a system that contains the air alone delta E is equal to delta U and Q is not 0, W is also not 0. So, W is W. So, in fact, strictly speaking, we should have written this as Q minus W air. So, W air has already been calculated. So, the heat interaction for air may be evaluated like this. So, that is minus 365 3.712. So, this is the amount of heat that is transferred to the nitrogen across the partition. Because we could also have obtained this by considering the nitrogen alone as a system. We could have for instance done this. So, for this system work interaction is 0 because no part of the system boundary deforms and there is a heat interaction from the air to the nitrogen across the partition. So, if you apply first law to nitrogen, we would have obtained delta E equal to delta U equal to Q minus W. W is also 0 in this case because volume remains constant. So, we know the initial delta U for the nitrogen is this. So, we can evaluate Q for nitrogen as 365 3.71. So, this is Q for nitrogen is 365 3.71. So, Q for air is then the negative of this, which would be minus 365 3.71 same as what we obtained before. We move on to the next example which looks like this air is contained in an insulated rigid tank of volume 1000 liters. So, we have an insulated rigid tank like this. So, we have the volume is given to be 1000 liters, this is nothing but 1 meter cube and it is also insulated. So, it looks like this valve on the top of the tank. So, we have a valve here on top of the tank. So, that is open and the air is allowed to escape slowly into the atmosphere until the pressure reaches 100 kilopascal at this point the valve is closed. You are asked to calculate the final temperature of the air in the tank and the amount of air that escapes. And you can see here that this process is an unsteady process and what we are going to do is use a system approach to you know to do the calculation. You may recall that we looked at this particular situation during our discussion of system definition. So, we have already defined the system for this and we will use that system to carry out the analysis in this case. So, system appropriate for this was shown before you may recall that system simply. So, this is the system at the beginning of the process and so this is the system at the end of the process. So, this is at the beginning and this is at the end. So, if I apply first law to this system at an intermediate instance, so we apply the differential form of the first law, we get d e equal to d u delta q is 0, there is no heat interaction between the system and the surrounding. But the system boundary deforms, so there is displacement work between p d v. Now, the working substance is air, so I may write d u as m c v d t and this may be rewritten as minus m p v m p d v. So, if you go through the algebra, you can finally show that the process undergone by the air fully resisted adiabatic process undergone by the air is described by this equation T v raise to gamma minus 1 equal to constant. So, final temperature of the air may now be evaluated because the final pressure, the initial pressure both known. So, we get this to be 155 Kelvin. So, the mass of the air that is initially in the tank may be evaluated from the equation of state like this. The mass finally in the tank may be evaluated like this. This is remember, this is same as mass of the system that we consider. So, this was the initial system, now at the end of the process, it occupies the entire vessel. So, mass of air contained in the system may be evaluated like this, so that is 2.235. So, the mass that escapes comes out to be 9.312 kilograms. So, by identifying the system properly at the beginning, we can do the analysis quite easily and it is very straightforward. But the complexity lies in identifying the system. So, we have to look at the process as a whole and then identify an appropriate system. So, you need the critical aspect here is that at the end of the process, the air after the air that has left, if you leave out the air that has left, at the end of the process the remaining air occupies the entire vessel. So, we take that as our system and then say that initially the system looks something like this. In this lecture, we will first look at one example or the final example illustrating application of first law to ideal gases. Then we will move on to examples involving two phase mixtures. So, this is the last example. So, here as you can see, we have an insulated piston cylinder arrangement. There is also a spring which is just above the piston. So, we connect the cylinder to a line in which nitrogen flows at 800 kilopascals, 27 degree Celsius through a valve. The stiffness of the spring is given cross-sectional area of the frictionalless piston is also given. So, now the valve is opened and the nitrogen from the line is allowed to flow inside the cylinder until the pressure inside the cylinder becomes the same as the line pressure at which point the valve is closed. We are asked to determine the final temperature of the nitrogen inside the cylinder and the amount of nitrogen that enters the cylinder. And we will, this is also an unsteady problem and we will solve this problem by defining an appropriate system. So, later on when we discuss control volumes, we will see that these problems can also be analyzed by using the unsteady approach in a control volume. But for now we will use a system to solve this problem. A system that is appropriate for solving this problem looks like this. So, this is the amount of nitrogen that actually enters from the line. So, let us denote this mass as m line. So, initially, so this is shown at some instant. So, initially it contains a certain amount of nitrogen, but the spring does not exert any force on the piston at this stage. So, this is the initial amount of nitrogen in the cylinder. This is the amount of nitrogen that will eventually enter the cylinder. So, we have denoted this as m line and this mass is denoted as m1. The mass in this part of the system we choose to neglect. We think we assume that it is very small. So, we do not worry about the mass that is in the line. I am sorry that is in the pipe that connects the line to the cylinder. So, we have the system in the final position and it looks like this. Notice that it contains the same amount of mass. So, m2, which is in the final position is equal to m1 plus m line and we are asked to calculate m line and the final temperature of the nitrogen in the cylinder. And the cylinder is open to atmosphere at the top. So, this is p atmosphere. Notice that other definitions of the system, other definitions of proper systems are also possible. For instance, we could also define a system which includes the piston in which case the change in energy of the piston will be accounted for in the form of total energy. Whereas in this case, we will account for it in the form of displacement work. So, other definitions are also possible. We can use this one and proceed with the analysis. So, we take molecular weight of nitrogen to be 28. So, we can calculate specific gas constant and the CV. So, the amount of nitrogen that is initially in the cylinder is given as point, I am sorry maybe evaluated as 0.2245 using the information that is given in the problem. Now, if I look at the cylinder at any instant, let us say that we, so at any instant, so if I imagine any intermediate instant the piston is located here. So, the spring is exerting a force on this. So, if I apply a force balance to the piston, we have pressure force from the nitrogen which is being exerted in the upward direction. We have atmospheric pressure which is being exerted in the downward direction and we have spring force which is in the downward direction plus the weight of the piston which also acts in the downward direction. So, if I do a force balance, then we have pressure inside the cylinder at any instant is a sum of the atmospheric pressure plus the pressure due to the weight of the piston which is MP times G divided by cross sectional area of the piston plus the pressure due to the force exerted by the spring. So, the force exerted by the spring is Kx. So, if I divide that by the cross sectional area, I get this value. If I rewrite x in terms of the volume of nitrogen in the cylinder, I can actually write it like this. Notice that this is volume of N2 in the cylinder. So, we are told that when the pressure inside the cylinder reaches the line pressure which is 800 kilopascal, the valve is closed and the process is stopped. So, we can actually substitute for that in this expression and determine the final volume of nitrogen to be 0.2 meter cube. So, basically we substitute the final pressure in this expression and obtain the final volume of nitrogen to be 0.2 meter cube. So, we have already defined all this and at the final state, notice that the mass in the final state we already said is equal to M1 plus M line because that is a system. So, we may apply equation of state to this state and write P2E2 equal to MRT. This is how it looks. If we apply first law to the system, then we have delta E equal to delta U. Notice that our system does not enclose the piston, otherwise the delta E term would have become delta U plus potential energy change of piston. Since we have chosen not to include the piston, the total energy of the system is just internal energy. There is no change in potential energy. There is no change in kinetic energy. So, we may write delta E equal to delta U equal to Q minus W. Since the piston and cylinder are insulated, we take Q to be equal to 0 and delta U maybe split into two pieces delta U for this part of the system plus delta U for this part of the system which is inside the cylinder. So, delta U for this part would be M line times Cv times final minus initial plus this. So, if you look at this, so this is what we have written M1 Cv times T2 minus T1. So, this is the mass that is initially in the cylinder and the change in internal energy of this mass may be written as this. This is the mass that is initially in the line and the change in internal energy of this mass may be written as M line Cv times T2 minus T line and that is equal to the displacement work, no other form of work is present. So, this is just the displacement work that is integral PDV. So, if we evaluate, notice that the displacement work as again may be written as a sum of two terms. One is a displacement work in this part of the system boundary. Remember, this part of the system boundary deforms and finally becomes 0 but that is at constant pressure equal to P line and this part of the system boundary also deforms as the cylinder moves up. So, the displacement work term has two contributions, one is from the line, another one is from the cylinder. So, this is the contribution from the cylinder, this is the contribution from the line. So, final volume of that part of the system which is in the line is equal to 0. So, we can then write it like this and since we know the pressure at any instant in terms of volume, we may actually go through and complete this integration and this is what we finally get, this is W. So, if we substitute this expression for the displacement work back into this, we get the following expression finally. If you do this rearrange the little bit of algebra, so we get this. Now, we have also used equation one from above which is this one here. So, we have used that also and finally, we get an equation that looks like this. So, all the known quantities are on the right hand side. So, if you plug in the values, known values, you get m line to be 1.283 kilogram and from equation one above, we get the final temperature to be 357 Kelvin. So, the important things to remember in this particular problem is the definition of the system. So, we have already seen examples like this when we talked about system and how to define a proper system. So, notice that the definition of the system in this case is crucial. It makes the analysis somewhat simpler because things are very easy to identify delta u for the system. You can easily see is composed of delta u for this part of the system plus delta u for this part of the system. Similarly, displacement work again is composed of two parts, one from here, one from there. This is at constant pressure. So, it is easy to evaluate. This also we were able to evaluate in close form because we were able to write the pressure at any instant in terms of the volume. So, this concludes our examples on application of first law to systems that involve ideal gases. So, we next have or we will next go through a few examples which again require you to do a first law analysis of given problems using systems. But now the working substance is a two phase mixture either water and water vapor or refrigerant and refrigerant liquid refrigerant and refrigerant vapor.