In this lecture, we're going to attempt to refine our understanding of the second law of thermodynamics. This lecture is a little longer, and a little more complex than what's been before. I think you'll find it worth it. But you might have to really stick with this, and maybe even watch it more than once. Remember, our foundation here at the outset is to try to understand spontaneous processes. And our goal at the outset was to say, our first try at the second law of thermodynamics, that entropy defined as k logarithm W, increases in any spontaneous process. Because the probability is constantly increasing in spontaneous processes. But we know that this statement is now not correct, as we discussed after we looked at absolute entropies in the previous lecture. As examples, spontaneous freezing, for example, of liquid water below zero degrees centigrade. Or spontaneous condensation, for example, of gaseous water below 100 degrees centigrade. Can occur in ways in which delta S is in fact, a negative number, rather than a positive number. In both of those cases what we have omitted from our discussion is the fact that there is energy exchanged between the molecules that we're studying. In those cases water molecules, and the surrounding molecules. In particular, when gas condenses to liquid, it releases energy. It releases that energy into the surroundings. And that will change the entropy of the surrounding molecules. Likewise, when liquid water freezes, it releases energy. Often to whatever, for example the refrigeration unit, that we are using to freeze those molecules. That energy released to the surrounding molecules will change their entropy as well. So we have to take into account the entropy effects, resulting from transfers of energy. We must also consider the energy changes. Now, our statement before, that the entropy drives the processes by increasing probability would be true, provided that there aren't any energy changes. And sometimes, we can actually isolate our system from energy changes. Keeping there from being any energy transfer out of our system, and into surrounding molecules. In those cases perhaps, our previous statement is going to work okay. That the entropy defined here will increase in any spontaneous process. Provided that we are in an isolated system in which there are no en, energy changes. As one specific case of that, we might regard the universe as a system in which there are no energy changes. Because the energy of the universe is constant according to the first law of thermo, thermodynamics. Therefore, since the entropy increases in any isolated system, and the universe is isolated, then S increases constantly for the entire universe. We could then write the second law of thermodynamics is that delta S of the universe, is always greater than 0. For any spontaneous process that actually occurs. That actually turns out to be a general statement, but it's not a very satisfying statement. Because it requires us to calculate the entropy of, essentially, an infinite body, as far as we're concerned. And there's no way that we can calculate that in a simple way. But it turns out there are ways that we can calculate it using thermodynamics. We're going to develop those means in this lecture. To do so, we need to understand the consequences of the heat transfer that we discovered were at the source of our problem a little while ago, when talking about spontaneous condensation, or spontaneous freezing. And we'll do that in a couple of different ways. One is to notice that if we take an object which is hot, say at temperature T2. And put it up against an object which is colder, at say temperature T1. So T2 is greater thaen T1. We know what will happen unless we thermally isolate these two. Energy will transfer from the hotter body, to the cooler body in the form of heat. So q is the heat, which is being transferred. And that transfer will occur spontaneously. Until we wind up with a situation in which we have exactly the same temperature for both of these. And T3 will be somewhere between the temperatures of the two original bodies. The cold body will heat up to T3. The hot body will cool down to T3. And it will happen because heat has transferred across. At this point we will have achieved equilibrium. But that means that heat spontaneously flows from a hot body to a colder body. If entropy is in fact an appropriate measure here, then one of the things we will also notice, is that energy increases when a body is heated to a higher temperature. We observed that when we studied the the, the absolute entropies of materials such as the entropy of oxygen, when we elevated it's temperature. Looking at the data in the previous lecture. Both of these tell us that temperature has something to do with energy, with enthropy changes. That in order to transfer energy from one place to another spontaneously, it must be true that temperature is a factor. It's not just the heat of course transferred. Because the amount of heat transferred from the first body to the second body, is exactly equal. That is, the amount of energy lost by the first body, equals the amount of energy gained by the second body. So it cannot be that spontaneous processes occur just because heat has been transferred. Rather, it must be because of the temperature differences between the two. That gives rise to the following equation. That the change in entropy, when a system is heated, within an amount of energy q. Or loses heat by an amount of energy q. The entropy change, is q divided by the temperature. Notice what that means for the case we described up above. The entropy change for the body on the left, delta S2, is minus q over T2. The entropy change for the body on the right, delta S1, is equal to q over T1. Keeping in mind, q is positive for T1, because it's gaining heat. q is negative for T2, because it's losing heat. And if we compare the change in the entropy for the cooler body. It is greater than the change in entropy with the warmer body. Because T1 is smaller than T2. So 1 over T1 is greater than 1 over T2. That justifies us using this particular equation, that relates the entropy change both to the heat flow, as well as the temperature into which that heat flow occurs. Let's now use this equation to try to understand the spontaneity of the condensation of a process like liquid water. I'm sorry, gaseous water goes to liquid water at 25 degree centigrade. We can go back and look at our tables for entropy. And we can pull out that the entropy of gaseous water at 25 degree centigrade, is 188 joules per mole kelvin. And the entropy for liquid water, at that same temperature, is 69.9 joules per mole kelvin. Just by taking the difference between these two, in other words taking the entropy of the liquid and subtracting the entropy of the gas, we wind up with an entropy change which is negative 118 joules per mole kelvin. Don't like those units, I'll fix that later. Clearly, the the entropy change is negative here because we've gone from gas to liquid. In the process though, of course, we've also released some energy. To understand why we're releasing energy, think about the reverse process. To transfer liquid into gas, we clearly have to elevate the energy of the molecules, to overcome the intermolecular attractions. So, liquid going to gas absorbs energy. Therefore, gas going to liquid releases energy. The amount of energy released is 44 joules per mole kelvin. If that's the case, then we can use those data to calculate what the entropy change is for the surroundings. Based upon the fact that the entropy change of the, or the energy change is 44. The entropy change for the surroundings is negative delta H over T. Let's stop for a second and remember why it is negative. The surroundings are absorbing an amount of energy 44 kilo joules per mole. The change in energy of the surroundings is the negative of the energy change of the system. Therefore the energy change of the surroundings is positive 44 kilo joules per mole divided by 298 kelvin, gives us an entropy change for the surroundings of 147 joules per mole kelvin. Notice that is a larger positive change, than the negative change of the entropy of the individual liquid molecules. In fact, if we take the difference between the two, and calculate the entropy of the universe. The entropy of the universe is the difference between those two numbers, and it is greater than zero. Consistent with our previous idea about the entropy of the universe always increasing. The entropy of the universe increases during the spontaneous process, provided that we take into account both, the entropy change of the system, as we have done here. And the entropy change of the surroundings as we have done here. Adding those two together, delta S of the universe is delta S of the system. In this case the water molecules, and the surroundings, everything else. And we've observed experimentally, that for the spontaneous process of water condensing to, I'm sorry a gaseous water condensing into liquid water at 25 degrees centigrade. The entropy of the universe does in fact, increase. We can slightly rearrange this equation by replacing delta S of the surroundings, with negative delta H over T of the system. Remember, a little while ago we wrote that delta S of the surroundings. We could write that as delta H of the surroundings, divided by the temperature. And delta H of the surroundings is minus delta H of the system. Since the energy that leaves the system goes into the surroundings. That means back over here, we can replace delta S of the surroundings with negative delta H of the system over T. That gives us a new equation. Which we could describe as the second law of thermodynamics. And in particular, one of the things that we could then do is, rearrange this equation somewhat. Let's take this same equation. Delta, or inequality, I should've said. Delta S of the system, minus delta H of the system, divided by T being greater than 0. And we'll multiply both sides of this equation by minus T. When we do that, we wind up with delta H of the system minus T delta S of the system is a number less than zero. Remember, if we multiply an inequality by minus 1 it reverses the sign of the inequality, that gives rise to this equation. And now we notice that we don't really need to any longer put that system subscript on there because clearly we're no longer going to be trying to calculate the properties of the surroundings. The means we now have a new statement of the second law of thermodynamics here that describes a spontaneous process taking into account. Both the energy changes and their effects on the surroundings as well as the entropy changes in the individual system. We can apply this to the particular case of the condensation of water as follows. Here is the delta S of the process calculated before. Here is the delta H of the process calculated before. If we plug those numbers into the equation from the previous slide. We wind up with a negative number exactly consistent with our second law of thermodynamics. We thus just, we have thus managed to generalize our statement of law, second law of thermodynamics, so that we no longer have to restrict ourselves to an isolated system. There's one last sort of tantalizing bit about this that's going to lead to the next concept development study and it's this. What if delta H minus T delta S were to be zero, what would happen in that circumstance? To ask that question, let's instead ask the question, at what point are these materials actually in equilibrium with one another rather than having a spontaneous process take place with all of the materials at one atmosphere pressure? Well, we know that the boiling point of water is 100 degrees centigrade or 373 degrees kelvin. For one atmosphere of pressure. If that's the case, then rather than calculate the delta H minus T delta S at 298, where we know that the condensation is spontaneous, what if we calculated at 373. 100 degrees centigrade. It turns out if we take these numbers here, just take these values, plug them into this expression, you get zero. That suggests that delta H minus T delta S is not less than 0, nor is it greater than 0. Meaning that the forward process is no more likely than the reverse process to be spontaneous. Meaning that the forward and reverse processes must be in equilibrium with each other. That means, that we have generated a condition, not just for spontaneity, when we see a negative number, but for equilibrium when we see that zero. That's going to lead us to the definition of something we'll call free energy, and we'll use free energy to help us understand the conditions under which delta H minus T delta S is equal to 0 and the conditions therefore, under which we are at equilibrium.