 The next example that we are going to look at involves a mixing chamber. So, basically this is the same as what we saw earlier, but now we have some heat loss also that takes place. So, let us see what is given. So, water at 200 kPa, 30 degree Celsius enters the mixing chamber. So, let us label this as state 1. And so, the mass flow rate is also given as 5 kg per second. So, this is 5 kg per second. It is mixed with steam at 200 kPa, same pressure and 200 degrees Celsius. So, let us label this as state 2 and the mixture comes out as a, so it is mixed with steam at 200 degree Celsius. Heat loss to the surrounding air at 27 degree Celsius occurs at the rate of 10 kilowatt. So, Q dot is given to be 10 kilowatts. If the mixture is required to leave at 200 kPa and 80 degree Celsius. So, if we label this as state 3, this is at 200 kPa, 80 degree Celsius. So, basically the water is heated from 30 degree Celsius to 80 degree Celsius. We are asked to calculate the required mass flow rate of steam and the rate of entropy generation during the mixing process. So, we can easily ascertain that the water which is coming in at state 1 and the water which leaves at state 3 are both compressed liquid states. So, based on our model for compressed liquid, we can evaluate the specific enthalpy of compressed liquid at state 1 and specific entropy of compressed liquid at state 1 like this. Similarly, we may also evaluate the specific enthalpy of compressed liquid at state 3 and specific entropy at state 3 to be like this. Now, this is actually state 2 as we can see from here 200 kPa, 200 degree Celsius is a superheated state. So, we may retrieve specific enthalpy and specific entropy corresponding to state 2 like this. Now, we apply steady flow energy equation to the mixing chamber because it is operating at steady state. We apply steady flow energy equation, WX dot is 0, no external work interaction. So, if you substitute the numerical values, we get M2 dot to be 0.4166 kg per second. So, that is the mass flow rate of steam that is required to make sure that the water leaves at 80 degree Celsius. Now, once again we apply the steady flow entropy balance equation. So, we said DSCV DTE equal to 0 and so we end up with this Q dot surrounding. Remember, heat is lost to the surrounding. So, this is plus 10 for the surroundings. So, let us see. So, heat is lost to the ambient at the rate of 10 kilowatt. So, that means the ambient receives heat. So, that is plus side for the ambient. So, 10 divided by 273 plus 27, we have to input values for temperature in kelvins. So, if you do that, then we get sigma dot to be 537.51 watt per Kelvin. So, this is the rate at which entropy is generated in the universe as a result of the mixing process. Notice that there are two irreversibilities in this process. One is the internal irreversibility associated with mixing. So, there is entropy generation due to that. The second one is the external irreversibility due to heat transfer across a finite temperature difference. So, the two together contribute to an increase in the entropy of the universe. All the examples that we have seen so far have been steady flow situations. So, we were able to get rid of the DSCV DTE term. So, if you go back to the equation that we derived. So, from here, we derived this equation. We had set all, I mean we had set DSCV DTE equal to 0 for all the examples so far because they were steady flow situations. What we are going to do now is look at a couple of examples involving unsteady flow situations. In the case of unsteady flow situation, in addition to this, we also need to invoke the mass conservation equation which basically would say that the rate of change of mass in the control volume is equal to Mi dot minus Me dot. So, the rate at which mass enters the control volume minus the rate at which mass leaves the control volume. So, this equation has to be supplemented with this in the case of unsteady problem. So, let us take a look at these examples. So, here we have a vessel air is contained in an insulated rigid tank of volume 1000 liters and the air is initially at 1 ampere 300 Kelvin. A valve on the top of the tank is now opened and the air is allowed to escape slowly into the atmosphere until the pressure in the vessel reaches 100 kilopascal at which point the valve is closed. The temperature of the air inside the tank is maintained constant during this process by an electrical resistor placed inside the tank. Determine the entropy generated during this process. Determine the entropy generated during this process. KE and PE changes may be neglected. So, the control volume that we have chosen for this problem looks like this. So, it is basically very simple and closes the vessel plus the resistor. So, what crosses the boundary of the control volume in this case is electrical work. So, it is relatively straightforward. We have seen a slightly different version of this example during our discussion of unsteady flow analysis in the previous course. So, for the control volume shown here, the unsteady entropy balance equation looks like this. Mi dot is equal to 0, but this term has to be retained now because there is a change in the entropy within the control volume during the process. Now, the unsteady mass balance equation which we just wrote down simplifies after setting M dot i equal to 0 to be something like this. So, if we combine these two, then we end up with an expression like this. So, we can actually, well, before we do that let us see. So, what we have done here is notice that we have replaced SCE with SCV. After noting that the entropy of this stream that leaves. So, SCE is the entropy of the stream as it leaves the control volume. So, this is the same as the entropy of the fluid within the control volume. So, we have replaced SE with SCV. Now, we may now use product rule to expand this and then simplify this. So, we end up with an expression that looks like this. Notice that Q dot is actually 0 in this case because it is only electrical work that crosses the system boundary and the vessel itself is insulated. So, there is no heat interaction between the control volume and the surroundings. So, we can use ideal gas equation of state to replace M dot CV with this. And what we have done here is we have done the following. We have used the TDS relationship. So, TDS equal to DH minus VDP and DH is 0 since the temperature is constant. Remember DH is equal to CP dt and since the temperature is constant, we can set DH equal to 0. So, TDS comes out to be equal to VDP. So, we may eventually write DH equal to minus V over T times DP which may further be simplified like this. So, we can integrate this equation now. So, we multiply both sides by dt and if you integrate this equation, we then get the following sigma equal to 3 kilojoule per Kelvin. So, this is the amount of entropy that is generated in the universe as a result of this process. Notice that in this case, there is no external irreversibility because the vessel is insulated. The entropy generation is entirely due to internal irreversibility which comes from ohmic heating within the control volume. Electrical work crosses the boundary. However, there is ohmic heating within the control volume. So, this is an internal irreversibility and the entropy generation is because of this internal irreversibility. The next example that they are going to look at is also an unsteady flow situation. Also involves an unsteady flow situation. So, let us take a look. A rigid vessel of volume 600 liter contains 8 kg of water at 20 bar. So, we have a vessel like this 600 liters. So, it initially contains water 8 kg of water at 20 bar. Liquid is now allowed to escape slowly from the bottom of the vessel. So, liquid is now allowed to escape from here. Heat is transferred from a reservoir at 250 degree Celsius to the vessel so as to maintain the pressure constant. So, we are transferring heat to this vessel from a reservoir at 250 degree Celsius. The process is stopped when no more liquid remains in the vessel, determine the mass that escapes, heat transferred and the entropy generated. So, the volume of the vessel is known, the mass of water is also known in the beginning. So, we may evaluate the specific volume at the initial state from which we can calculate the initial dryness fraction and other properties that are required namely specific internal energy and specific entropy may also be evaluated. In the final state, there is no liquid in the vessel. So, the vessel is completely filled with saturated vapor. So, at the final state V2 is equal to Vg, U2 is equal to Ug. So, we can calculate the mass of saturated vapor that remains finally in the vessel that comes out to be 6.024 kilogram. So, we started off with 8 kilograms and we are left with 6.024. So, the mass that escapes is equal to 1.976 kilograms. So, the control volume as you can imagine in this case is the entire vessel. So, this is the control volume. So, we proceed in the same manner as before. So, the unsteady energy equation, you may recall that the unsteady energy equation reads something like this ducv dt equal to q dot minus wx dot plus mi dot times hi minus me dot times he after neglecting ke and pe changes. So, in the present case, wx dot is 0 there is no work transfer nothing enters the control volume. So, mi dot is also equal to 0. So, the unsteady flow energy equation simplifies to something like this for this problem. Since saturated liquid alone is allowed to escape he which is the enthalpy of the stream as it exits the control volume may be written as hf which is the specific enthalpy of the saturated liquid. And we may also write the total internal energy in the control volume to be mass in the control volume times the specific internal energy. So, with these simplifications the unsteady energy equation looks like this. We may now integrate this from the beginning of the process to the end of the process which gives us something like this. If you substitute the numerical values we get hq to be 45.22 kilojoule. So, this is the amount of heat that is supplied during the process from the reservoir at 250 degree Celsius. So, since we know the dryness fraction at the initial state we may easily evaluate the specific entropy at the initial state and the specific entropy at the final state is simply equal to sg. So, that can also be easily evaluated. So, we proceed in the same manner as before and again I have replaced s e with s f to denote the fact that saturated liquid alone leaves the control volume. And if you multiply both sides by dt and then integrate this is a perfect differential. So, it may be integrated like this and since s f is constant this may also be integrated like this. Now, here we add q dot. So, integral q dot surrounding. So, basically we add q dot. So, so if you integrate this from 1 to 2 this is the total heat that is supplied during the process. So, we have replaced it with q surroundings. Notice that surroundings are supplying heat. So, which means that q is negative for the surroundings and the surroundings are at the reservoir is at a temperature of 250 degree Celsius. So, that is how much heat is supplied from the reservoir at 250 degree Celsius. So, if you plug in all these values we get sigma to be 6.3621 joule per Kelvin. So, here we can say that you know there is external irreversibility primarily due to heat transfer across a finite temperature difference that is a that is that is an important source of entropy generation during this process. The other source of entropy generation has to do with the unsteady nature of the flow itself. So, we had a certain amount of total entropy in the control volume to begin with and some mass leaves. So, there is a certain amount of entropy that is transferred to the universe and so there is an increase in entropy of the universe as a result of these two effects. As I said in my introduction, what we are looking at here is a limited number of examples to illustrate the most important concepts. In the textbook that I mentioned has more examples and you can consult the textbook and then try to work out the problems worked out there. So, hopefully those will be of use to you. There are more examples in the book.