 In chapter 5, we talked a lot about losses and inefficiency. In chapter 6, we can start to associate numbers and quantification with losses and inefficiency, and to do that, we consider a concept called entropy. Entropy can be colloquially defined as the amount of disorder, or the amount of energy that is no longer useful, and the reason it's important is because energy has a quality in addition to a magnitude. Disorganized energy is not as useful to us and therefore is of a lower quality. Organized energy is more useful to us, therefore we call it a higher quality. If I had a room of 35-year-olds, that's 5-year-olds and 30 of them, not a room full of 35-year-old people, that would probably involve a lot of energy, but it's very chaotic. It's disorganized and therefore not useful. If I wanted to try to organize that energy into something useful, I am applying order to disorder, which means that I have to invest energy to make that happen. If I want them all to cooperate to accomplish some task, I have to invest energy to organize them. Same is true of energy. If you had 300 gallons of water, that is 5 degrees Celsius above room temperature, that is a lot of thermal energy compared to the air around it. But it is not particularly useful because a low delta T does not give us much opportunity to do much with it. If I were to focus that thermal energy into a smaller amount of water, that would yield a higher delta T, therefore a higher quality energy. The presence of losses and inefficiencies will increase the amount of disorder of our system and therefore increase the entropy. We define entropy mathematically as a proportion for a differential. So dS is del Q over T and that is only an equal to sign in the case that that process is internally reversible. I will point out that that is a capital S and uppercase S, just like our notational scheme for enthalpy and internal energy. A specific entropy would appear as a lowercase S and for our purposes I will try to denote a capital S by adding serifs to it. If I were to integrate both sides, I end up with delta S on the left and the integral of del Q over T for an internally reversible process on the right. That is true, but is not immediately particularly useful to us. To apply this to a more useful context, let's consider an example. Consider a hypothetical situation where you have a perfectly reversible heat engine that is taking in heat from a thermal reservoir at a temperature of TR and rejecting the waste heat to a piston-cylinder arrangement that is accomplishing some work that we're calling del work of the system. If I were to draw a control volume in such a way that it encompassed both the heat engine and the piston-cylinder arrangement, I could call the works from the heat engine and the piston-cylinder arrangement del W and I could call the heat transfer in del QR. Since that heat engine is perfectly reversible, I can apply this substitution. QH over QL is equal to TH over TL. The QH is going to be del QR, the QL is going to be del Q, the TH is going to be TR and the TL is going to be T. Therefore del QR over del Q is equal to TR over T. If I rearrange that equation, I can write that as del QR is equal to TR times del Q over T. By the way, the reason that we're writing this as a del or delta is because I want these terms to refer to over the course of an entire cycle's operation. So it might be outside, it might be inside. The delta here is indicating that we're talking about the change over the course of that entire cycle. Anyway, since this cycle is operating steadily, I can apply my energy balance and simplify it for a steady-state operation of a closed system because I have no mass crossing my boundary. In that case, DEDT is 0, therefore E dot in is equal to E dot out. And since it's a closed system, E dot in could be Q dot in and work dot in. E dot out could be Q dot out and work dot out. If I rearrange that, I can write work out minus work in, which would be the net work out, is equal to Q in minus Q out, which would be the net heat transfer in. Since this cycle cannot produce net work out, that is combining del W reversible and del W system, those cannot be a network output, otherwise I'm perfectly converting heat transfer into work, which would be a violation of the second law of thermodynamics. Therefore, this process must have a net heat transfer in that is less than or equal to 0. Because the net work out must be less than or equal to 0, and the net work out is equal to the net heat transfer in, that must be less than or equal to 0. And the only opportunity I have for heat transfer to cross my boundary is del QR, which I'm defining in the inward direction. Therefore, del QR itself must be less than or equal to 0. Since I know del QR is equal to TR times del Q over T, that means TR times del Q over T must be less than or equal to 0. TR and T are absolute temperatures, meaning TR cannot be a negative number, so the only way that that multiplication can yield a negative number or less than or equal to 0 is if del Q over T is itself less than or equal to 0. So for any actual sequence of processes, the cyclic integral of del Q over R, excuse me, so for any sequence of processes, the cyclic integral of del Q over T must be less than or equal to 0. So delta S is equal to the integral of del Q over T for an internally reversible process, and that equals is now an inequality for everything else. If we consider another situation, one where we have the easiest cycle possible, two processes. The first process goes from 1 to 2, shown here as a dashed line, and that process could be anything. It could be reversible, it could be irreversible, some process. And then to complete the cycle, we have a process from 2 to 1, shown here as a solid line, which is specifically an internally reversible process. This cycle of two processes must have its cyclic integral of del Q over T less than or equal to 0. And that cyclic integral means the sum of all the integrals across the cycle. So if I had four processes in that cycle, it would be the integral from 1 to 2 plus the integral from 2 to 3 plus the integral from 3 to 4 plus the integral from 4 back to 1. Here, because I only have two processes, it's just the integral from 1 to 2 of del Q over T plus the integral from 2 to 1 of del Q over T. That quantity, that cyclic integral, must be less than or equal to 0. Well, for 2 back to 1, that process is internally reversible, which I know is how we defined our delta S term. Therefore, I can write delta S. That delta S is going to be the end state point 1 minus the beginning state point 2, which means when I plug that in, I have S1 minus S2. Note the serifs, which indicate that this is talking about total entropy, not mass specific entropy. Now I can say the integral from 1 to 2 of del Q over T plus S1 minus S2 must be less than or equal to 0. If I bring S1 minus S2 to the other side of the integral, I'm going to end up with the integral from 1 to 2 of del Q over T is less than or equal to S2 minus S1 because it would appear on the other side as negative S1 minus S2, which is equal to S2 minus S1. Therefore, S2 minus S1 must be greater than or equal to the integral from 1 to 2 of del Q over T. That is a long way of saying that the change in entropy is only going to be the lowest possible value it could be if that process is internally reversible. For everything else, the change in entropy must be greater than that. That allows us to finally write out a statement for the second law of thermodynamics. We've talked about what the second law means, we've talked about what we can deduce from it, but we haven't actually written it out, so let's do that now. The second law of thermodynamics says the entropy of an isolated system does not decrease. So parsing that out, the entropy of an isolated system does not decrease. All of the applications we have made from this statement are more clear than the statement itself. The important aspect of this is entropy increases and from that we know energy will naturally go from state of high quality to low quality and to make it become higher quality again, we have to invest energy in the process. If we jump back to the math, I like to write this as the entropy change of a system plus the entropy change of its surroundings must be greater than or equal to zero. For convenience, I call the result entropy generated. So I can say the entropy change of the system plus the entropy change of the surroundings is equal to a quantity called the entropy generated. If the entropy generated, S gen, is greater than zero, that implies that the process is irreversible because there was some entropy generated as a result of the process. You can't get back to where you started. There were losses. If the entropy generated, S gen is equal to zero, that means that there was no entropy generated. You can get back to where you started. Therefore, it's a reversible process. If the entropy generated is less than zero, that means that you are violating the second law of thermodynamics. Therefore, you have an impossible process. So if you consider a situation where you have a system undergoing a process and the entropy change within that system is negative 2, that does not itself violate any laws. That's fine. You can have an entropy change that is negative. It just means that the entropy change somewhere else, the surroundings, must be greater than that in the opposite direction. So if the entropy change of the system was negative 2, that means that the entropy change of the surroundings must be at least 2. If it was 3, that means that we have an irreversible process and S gen would equal 1. So you take the entropy change of the system, you add it to the entropy change of the surroundings and the result is what we call the entropy generated. Couple of notes on those quantities. For our purposes, the entropy change of the system will come either from looking up S1 and S2 and subtracting them using Delta S equations to approximate them primarily as a result of assuming constant specific heats, using the definition of entropy for an isothermal process where T comes out of the integral at which point you're left with just Q over T or will be solved for by knowing the entropy change of the surroundings and the entropy generated. For the entropy change of the surroundings, we will either determine that as a result of the same isothermal process simplification by treating it as 0 in the case of an adiabatic process. Adiabatic means no heat transfer, therefore we are not affecting the entropy on the other side of our boundary or we will determine it as a result of knowing the entropy change of the system and the entropy generated by the process. Lastly, S gen will either be given or implied, for example, consider this reversible process. Well, if it's reversible, that means the entropy generated must be 0 or it will be solved for by determining delta S of the system and delta S of the surroundings. This option here leads us to our next conversation. What do you do when you don't have tables? Well, we have relationships for entropy that can be described as functions of temperatures using specific heat capacities. These equations can be derived, but I'm skipping over that for the moment. For now, just know for incompressible solids and liquids, the change in entropy that's a specific entropy, a lowercase S, is the integral of the specific heat capacity which is a function of temperature multiplied by 1 over T dT. For ideal gases, the change in specific entropy can be described in two ways. One, as the integral from 1 to 2 of Cv is a function of T times 1 over T dT plus R times the natural log of V2 over V1. Note that in that relationship, R is the specific gas constant for that substance. Or it can be described as the integral from 1 to 2 of Cp is a function of T multiplied by 1 over T dT minus the specific gas constant times the natural log of P2 over P1. Both of these equations describe the same thing. They will produce the same result. The only difference between the two is which one is more convenient. If you have a process where you know the change in pressure, you are probably going to use the bottom equation. If you have a process where you know the change in specific volume, you're probably going to use the top equation. I will also point out while we're here that these equations are called the delta S equations for our purposes but are also described as the T dS that's temperature times the differential of entropy. Equations in other contexts. And I enjoy that because they are awfully tedious in and of themselves. In the special case where delta S is 0, that process will be described as isentropic. If in the bottom two equations delta S was 0, we can rearrange those equations to write specific gas constant times the natural log of either V2 over V1 or P2 over P1 is equal to the integral of either Cv or Cp is a function of temperature times 1 over T dT. At that point, if the specific heat capacity is constant and it comes out of the integral, I can write dT over T integrated as the natural log of T2 over T1 and then I can get rid of the natural logs by raising everything to the inside of an exponent at which point I would have these two equations. These are called the isentropic ideal gas equations. You can only use these equations when all three of the following assumptions are in place. You have an isentropic process of an ideal gas and you've assumed the specific heat capacity of that substance is constant. If any of those are not true, you cannot use these equations. These equations are very useful. Do not rely on them too much. Be very wary of what you need to have assumed before you can use them. I will also point out that as a result of the fact that T2 over T1 can be described both in terms of volume and pressure, we end up with two equations. But I often write them as T2 over T1 is equal to V1 over V2 raised to the k-1 which is equal to P2 over P1 which is raised to the k-1 over k. It appears as one line, but it's actually two equations. I will also point out depending on which properties you have and which properties you're trying to get to, it is often convenient to manipulate the exponent. So you could write V1 over V2 for example as being equal to T2 over T1 raised to the negative k quantity minus one. But I am bad at doing that algebra in my head. I have a tendency to mess it up. So for my own convenience and for yours, here are all the possible permutations. Feel free to grab whichever one is most convenient in that circumstance. This is actually those two equations appearing as a single row and I've thrown in specific volume as a density as well. And then each row represents being solved for a different quantity. So the first row is solved for temperatures without any exponents. The second row is solved for pressures without any exponents. The third row and fourth row are identical because they are solved for volume and density.