Lecture 5 Second Law and Entropy Maximization
[SQUEAKING] [RUSTLING] [CLICKING] RAFAEL JARAMILLO: So we've gone through the first law, and we've gone through heat engines, which means it's time for the second law. So we're ready for the second law. All right, and this is what I call a plane for act. So I'm going to present this by way of Clausius's theorem. You'll see what that is in a minute. Then, we'll move on to reversible processes and entropy, and reversible and irreversible processes, and finally entropy maximization. So we talked about entropy in the first lecture with the baby book. And I think everybody does have this feeling of entropy as being mixed up and it's disorder, and that's true. That's true. And so one could state the second law of thermodynamics as something like the entropy-- the disorder in the universe is always increasing. Rather like the statement that the energy of the universe is always constant, that's not obviously useful for us as scientists and engineers. The entropy of the universe is always increasing. So today, we're going to take a different approach to the second model, which is very classical and deductive. And by the end of today, you will have seen the second law and entropy in this classical and deductive way. You will have also gotten this sense for it-- this more hands-on sense for entropy as being disordered and mixed up-- and, hopefully, have a better understanding there for having seen it in different ways. So I call this a play in for x. I'm playing for x-- Clausius, reversible, irreversible, and entropy maximization. All right, one, Clausius's theorem. So this is Clausius's theorem. So this should look familiar because we arrived at this at the end of the Carnot cycle. I didn't call it Clausius's theorem. And I told you that there was going to be something funky about this dQ over T quantity, and it's important. So that's more or less why we did the Carnot cycle to motivate this. This is a cyclic process, any cyclic process. It doesn't have to be a Carnot engine to be anything at all-- any cyclic process where the state variables return to starting point, which is just rephrasing what it means to be a cyclic process. And so this is super general right now. We have any system with initial temperature, initial volume, pressure, and it's a collection of stuff. And you're going through any process at all that brings you back to the starting point. I think my new pen-- by the way, I bought a bunch of different Sharpies, fat, thin, ultra thin, fine, ultra fine. Sharpie markers, they have Sharpie brand markers now. I was trying them all. Anyway, so that was Clausius's theorem. So we're going to use it now. Two, reversible processes and entropy. Sorry, give me a minute. Can I ask you guys a question? It's less than or equal to 0. Does anyone remember under what conditions it's equal to 0? We saw a case when it was equal to 0. AUDIENCE: And we took like, forever. Like, it was always in equilibrium for every step. RAFAEL JARAMILLO: Always in equilibrium, right. That's exactly right. There's another word for that, which means a reversible process. But you're absolutely right, always in equilibrium every step. Reversible process, you get the equal sign. The less than, if you remember, was the heat engine that was less efficient than ideal. Now, we're going to hypothesize that there exists for which every step is reversible. And we're going to consider a cyclic process along two reversible paths, R1 and R2. And this is what I mean. We have some state A. We have some state B. And there are two ways to get from A to B, and both of these paths are reversible. All right, so let's think about the different ways we can do this. We can start at A, and we can go to B. And then, we can go back to A. So I'm going to call this minus R2 because they're going the opposite way of path R2. So this is a clockwise-- a clockwise cycle, R going clockwise. So let's calculate this thing. VQ over T equals AB dQ over T along path R1 plus BA dQ over T along path minus R2. I'll rewrite the first term. I mean I'll just copy the first term. And by virtue of the fact that path R2 is reversible, I can simply say it's the reverse of going from A to B along path R2. So going backwards along path, R2 is just the opposite of going forwards along path R2. And by Clausius's theorem, we know this is less than or equal to 0. Now, we're going to consider going the other way. We're going to start at A, and we're going to go along path R2 and back along minus path R1. So this is counterclockwise. Let's do the same calculation. dQ over T equals from A to B dQ over T along R2 plus B to A dQ over T along path minus R1. And just as before, this is going to be the negative of taking path R1. And by Clausius's theorem, this is also less than or equal to 0. So these are by Clausius. Clausius is a fellow with an S at the end of his name, so that apostrophe is trying to be at the end after the S, but anyway, Clausius's theorem, I should say. So by Clausius's theorem, we have that both of these are less than or equal to 0. One way we went clockwise. The other way we went counterclockwise. But both were cyclic processes. We started at A. We returned to A. We started at A, and we returned to A. We want to compare clockwise and counterclockwise circuits. Compare clockwise and counterclockwise circuits-- both of these things have to be less than or equal to 0. So what do you observe about these terms? AUDIENCE: It's like you just take the negative of. RAFAEL JARAMILLO: They're just a negative of each other, right. They're negative of each other. All right, so if something has to be less than equal to 0-- y is less than or equal to 0, and also minus y is less than or equal to 0. Then what can you say about y? AUDIENCE: It's 0. RAFAEL JARAMILLO: Yeah, then y equals 0. That's the only way you can satisfy that. So that's what's going on here. So that means that term equals 0. So let's write that down. From A to B dQ over T along reversible path 1 minus from A to B dQ over T along reversible path 2 equals 0. That means from A to B dQ over T for reversal path 1 equals from A to B dQ over T along a reversible path 2, just rearranging. What do we call a quantity whose change doesn't depend on the path you take? From A to B, we have two paths here-- path reversible 1 and path reversible 2. And this quantity integrated along that process doesn't depend on which process we took, R1 or R2. What sort of a function do we call that? AUDIENCE: Path independent. RAFAEL JARAMILLO: Path independent. And for thermo, we have a specific fancy name for path independent. AUDIENCE: State functions. RAFAEL JARAMILLO: State functions, right, exactly. That's great. So we're going to-- and this is historically how this came about, by the way. This is based on a lot of data. Don't worry that you're not as smart as people used to be in the past and somehow this isn't obvious to you. This conclusion, which I'm about to just hand you 19 minutes into the hour, is based on centuries of data and people finally hypothesizing the existence-- maybe not centuries of data, maybe like 50 to 75 years of data-- entropy S as a new state function. Why? Because it seems to be something which has an exact differential. In a reversible process-- any reversible process, not any specific reversible process, but any reversible process-- dQ over T was equal to the exact differential of entropy. What that means here is that this is entropy of B minus entropy of A, or delta entropy. So there you have it. This is a very deductive way of postulating that entropy exists, and it's a state function. We found an integral of an integrand that doesn't depend on the path. That's it. From that, you say I'm going to postulate that there exists entropy. Its total differential is this for a reversible process, which means I can calculate its change between states along any path-- along any reversible path. Let's keep moving. Next, three, reversible and irreversible processes, reversible and irreversible processes. All right, so we've hypothesized that there are reversible processes. Now, let's hypothesize that there exists processes that are irreversible, irreversible. And we're going to set up another one of these funny thought experiments. Consider states A and B, connected by both reversible and-- reversible and irreversible processes. So here's state A. Here's state B. And here, I'll draw a nice smooth line. Let's say this is a very slow process. Call that reversible. And I'm going to draw a wiggly line. This is a very fast process. You're not very careful. You carry it out in a rush. I'll call that irreversible. So we have two states connected by a reversible process and an irreversible process. So now, let's go back to Clausius. Let's calculate dQ over T. This equals from A to B dQ over T along the irreversible process plus from B to A dQ over T along the reversible process. Now, why do I do it that way? I wanted to go from A to B and back again. Can I go this way? Can I go counterclockwise? AUDIENCE: No, because the one on top is not reversible. RAFAEL JARAMILLO: Yeah, exactly. AUDIENCE: Can't go backwards. RAFAEL JARAMILLO: This is-- I told you can't run this backwards. I said it was irreversible. So you have to believe me because I'm in charge here. So you can't run this backwards. So if you're going to get from B to A, it can't be that way. It's got to be that way. It's got to be that way. That's right. So there we are. All right, so that's the way, and Clausius's theorem says that. We're running the reversal process backwards to complete the cycle. Now, we're going to use this thing-- which we used before-- minus the reversible process equals minus the forward process. And we postulated this is the change of a state function. It's the integral of the exact integrand, the exact differential of the state function as we go from A to B. All right, so we're going to use these. We're going to combine, and we get the following. dQ over T is less than or equal to entropy-- wait, I'm sorry. It shouldn't be the cyclic interval. From A to B dQ over T is less than or equal-- slow down, right. Third time's going to be the charm here. From A to B dQ over T is less than or equal to the difference entropy of B minus entropy of A, which is delta entropy. This is it. This is combining the previous three slides. We're using Clausius's theorem. We have the less than or equal from that. And it's equality for a reversible process. You get the equality. For irreversible process, you get the less than. All right, we're still just kind of playing with math. It doesn't feel like we're there yet. You're just-- I'm just showing you some things. We'll get there. All right, so here's there. This is where we're getting-- entropy maximization in an isolated system. And this is where the cosmologists get off, and they say, oh yeah, I told you this was about the universe. But again, it's really not. So an isolated system-- any process from A to B dQ over T is less than or equal to the entropy of B minus the entropy of A. And already, we've come a really long way just to be able to write that down. So I want you to recognize that. Now, we're going to isolate the system-- isolate the system so that dQ equals 0. All I'm really doing here is thermally insulating it. I'm isolating the system. I'm putting some thermal insulation around it. I'm making sure that no heat can flow across the boundary. That's what I'm doing here. And so if dQ equals 0, what is this integral? AUDIENCE: It's just 0. RAFAEL JARAMILLO: 0, right. So I'm going to take that integral to be 0 and rearrange the equation. And I get this very simple and, as we'll see, very profound inequality. Entropy never decreases for any process in an isolated system. That's what we just found. This inequality orders the states in time. This is the emergence of the error of time for thermodynamics. We don't know anything about this system. We don't a thing about it. We don't know what A and B are. We don't know what it's made of. We don't know if this is the universe or your beaker in your lab. We don't know anything about it. But we do know that no process can decrease its entropy. Because if a process goes from A to B, then the entropy of B has to be at least as large as the entropy of A. That's wacky This is actually a form of the second law. So there's about two dozen statements on the second law. There's a website devoted to them. It's kind of funny, kind of a goofy website. But this is one way you'll see it written. This is one way you'll see it written. So, all right, so anyway, that's crazy. That's crazy. What was the equality for? When did S of B equal S of A? What kind of a process? AUDIENCE: Reversible. RAFAEL JARAMILLO: Reversible, right. So for a reversible process, reversible SA equals SB. Irreversible-- irreversible was the inequality, the less than. S of A is less than S of B. So reversible process is one for which things are always in equilibrium, and they equal. And the entropy remains the same. Any irreversible process will increase the entropy of this system. So now, we get to write another form of the second law. Let's call the combined statement combined statement of first and second laws. All right, combined statement-- first, we write the first law. The change of energy of a system equals the heat received plus the work done on it plus the change through addition or loss of mass. So this is first the law. And I like to call this bookkeeping. First law is not the energy of the universe is constant. It's the energy of any system changes only through additions and subtractions of energy that we can keep track of, so first law bookkeeping-- work done on a system. DW equals minus P dB. And heat received by system for a reversible process, dQ equals T dS. This comes from two slides ago. We had dS equals dQ over T for reversible heating. So I'm just rearranging. So I'm going to combine these. I take the first law of bookkeeping. I substitute the mechanical expression for work. I substitute this expression for heat for a reversible process, and I get the following. TU equals T dS minus P dV plus mu dN. And now, this is for a reversible process. Now, we have this-- all state functions, which sometimes is useful for calculating. So this is going to be one of the foundational, most important expressions-- equations-- that we use in 020. AUDIENCE: I have a question about the energy itself. If it's not a reversible process, then we couldn't use T dS for TQ, right? RAFAEL JARAMILLO: If it's not a reversible process, TQ is not going to be equal to this. AUDIENCE: So then how would the internal energy-- how would, like U, for example, still be a state function if it's dependent on DQ? RAFAEL JARAMILLO: So this expression-- this expression is true always. This is in general through this top expression. I think it's easier to understand because it's almost like your bank account-- what goes in, what goes out. If you track them, you'll know the difference it's a state function. This down here is not always true, and it's the less obvious. This is only true for a reversible process. For an irreversible process, you're going to get the wrong expression here if you plug this in. We'll actually-- AUDIENCE: I think-- RAFAEL JARAMILLO: --that an irreversible-- sorry to interrupt you. What we'll see for an irreversible process, that dQ is always less than T dS. But at this level right now-- OK, so I want to now ask you if that made sense or I should continue? AUDIENCE: OK, I think my question was, like since we learned that state variables could only depend on other state variables, like, it seems like dU is dependent on dQ, which it's not. RAFAEL JARAMILLO: Right, thank you. That is confusing. There's a couple of ways of thinking about that. First of all, entropy is funny. It just is. Second of all, this is not true in general. It's only true for a reversible process. And reversible processes don't exist. They're figures of our-- figments of our imagination. They're the limits of things go arbitrarily slowly. So in that sense, it's funny. Another way to think about this, if you remember from, I think, single var-- single or multi-- is that T here, or more specifically, 1 over T here, is a concept of integration. For those of you for whom that doesn't ring a bell, just forget it. But this is an integration constant. So you can go back to your calculus textbooks and review what that is, but anyway-- so I'm not going to convince you here because it's just profoundly weird at its core. But I hope I can make you a little bit more comfortable with using it as we go forward. This is very much connected to the entropy flow across boundaries, which is sort of a-- it takes a couple of weeks for us to get comfortable with that concept. For a reversible process, entropy flows across boundaries in the form of heat. For an irreversible process, an irreversible process receives less entropy across its boundaries and generates entropy inside of itself to make up for that difference. We'll get there. We'll get there. All right, one thing I want to point out before we move on-- and I have to kind of slip this in around the margins because this is not a calculus class. Calculus is a prereq. But I want to remind you that this is a differentiable form. And we use a lot of differential forms in this class. This is differentiable form of the general type dY equals A dX XYZ. DX plus B d-- trying not to use Y-- dM equals A dX plus B dY plus C dZ plus so forth. We're going to use a lot of these in this class. This is a total differential. This is also a total differential-- dX, dY, dZ. And these A, B, and C are coefficients. I'm going to go slowly through this. I'm not teaching you this because it is a prereq. But I want to go slowly through this because the sooner you recognize this general form in thermal, the more successful you'll be. There are so many shortcuts to useful answers in thermo when you start recognizing this sort of pattern. So, for example, A the coefficient is also the partial derivative dM dX for fixed Y and Z and likewise for the other coefficients. We'll come back to this over and over, but it cannot be stressed enough. But it's a prereq, so I can move on. Let's finish out what I want to do here. Let's talk about equilibrium. Equilibrium is-- this is going to be a very holistic introduction to equilibrium. It's a state of rest, a state of rest. What's that going to mean for us? The state functions aren't changing. It's also a state of balance. Molecular scale changes or fluctuations average to 0. And you can think back to the baby book where there's particles in the box, and they're all zooming around. So you know that things are happening on the molecular level. But at equilibrium, any observable thing anything you can measure on a length scale larger than the length scale of molecules is not changing. So we want equilibrium to be like this. At t equals 0, we prepare a system-- prepare a system and its boundary conditions. And then, we're going to wait for a very long time, as long as necessary. And as t goes to infinity, equilibrium, when all macroscopic changes are finished. You know, Wikipedia has a really good entry. If you look for the Wiki entry-- the definition of thermal equilibrium in Wiki-- I kind of like it. It's got different words all meaning the same thing. All right, so now, one last board and then we'll wrap up. And let me just say this lecture is the most-- to say it's philosophical is a little bit too highfalutin-- but I would say it's the most abstract of this entire semester. So in case you're thinking, what on Earth is going on here? When are we going to talk about materials? I just want to share that with you. So here's the question. We're waiting. What happens while we wait? We've prepared the system at t equals 0, and then we're waiting. What's happening? Answer-- all spontaneous processes, they will happen eventually. So spontaneous means what? Something that will happen on its own. So it will happen while you wait. It's in the meaning of the word. Something spontaneous will happen while you wait. So while you wait, all spontaneous processes will happen. That means that equilibrium is a state in which all possible spontaneous processes have already happened, By the meaning of the word, they already happened. For an isolated system, we know that any process means the entropy unchanged or increases it. This is a ratchet. It can kick up one way. It can never go back the other way. It follows then that equilibrium is a state of max entropy. So let me just state that again. For an isolated system, equilibrium state of maximum entropy, given the boundary conditions. So this is also the second law. All right, so that's where I want to leave it for the day. We have plenty of time for discussion and questions. I see I've missed some things in the chat, beautiful words from Wiki. So someone's enjoying Wikipedia. Now, all right, so what we've done is we've arrived at something which maybe we would have guessed at after the baby book. Equilibrium is a state of maximum mixed upness or maximum disorder. Except that we haven't yet introduced entropy as any measure of disorder. Entropy is this funny thing that has to do with heat flow. And the way that we got this concept of equilibrium is through this concept of spontaneity being used up, there being no more spontaneous things possible. But we got to the same place. So where we are now is we have the first two laws of thermodynamics at a very conceptual level. There's a third law that we don't really need in 020. It's definitely less important than the first two, so we're going to skip that one. And we've done some heat engine stuff. But where we need to go now is figure out how to use these principles for situations that we care about. Because it's kind of hard to isolate a system. It's easy if you're a cosmologist, and you say my system is isolated. I don't have to worry about that. But if you're a material scientist or an engineer, you often have systems which are held at constant temperature or constant pressure, not systems which are isolated. So we need to do next is go from this principle of the second law to a restatement, a principle of the second law that's useful for conditions of constant pressure and constant temperature. And spoiler alert, this is the state of max entropy. What we will find is that for systems at fixed pressure and temperature, a state of minimum Gibbs-free energy is the equilibrium state. So that's where we're heading. And then, for the rest of the term, it'll be Gibbs, Gibbs, and more Gibbs because that's the material scientist's thermodynamic potential of choice.
Comments
Post a Comment