Lecture 3: Thermodynamics Part 3

Flash and JavaScript are required for this feature.

Download the video from iTunes U or the Internet Archive.

Description: This is the third of four lectures on Thermodynamics.

Instructor: Mehran Kardar

The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation or view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu.

PROFESSOR: So what we've been trying to do is to develop a description of properties of some system, could be something like a gas, that includes both mechanical as well as thermal properties. So the first thing that we decided to do was to wait until this system has properties that do not change. Further, with the observation time that we are assigning to this system, and then if it is a gas we can say, OK the gas has some pressure and volume.

In general, we said that we can characterize the system through a set of displacements and the conjugate forces which are used when we describe systems that are mechanical. Work on them is done. We can say that the work is Jdx, for example. OK?

Then we decided that this mechanical description was not enough because systems could exchange heat and gradually started to build a more general prescription that included the exchange of heat. We saw that, for example, from the zeroth law, we could define temperature as a function of these quantities. And that we could also, from the first law define energy.

And in particular that the change in energy, which is a function of where you are in equilibrium. So once you say that you have a system in equilibrium you can say what the values of the x's and J's are. You know somehow what the value of temperature is, what the value of energy is. And if you were to make a change in energy by some external means the amount of change would either come from mechanical work that you did on the system, or the heat that you supplied to the system.

Now this expression is the one that you would like to elevate somehow and be able to compute energy as a function of state. Kind of keeping in mind what we would do if there was no heat around. And we could do things mechanically, then mechanically we could in principle build up the energy function by changing displacements lightly and calculating the amount of work by this formula.

And basically we emphasized that you would be able to use a formula such as this if you were to make things sufficiently slowly so that at each stage in the process you can calculate what Ji is, which means that at each stage in the process you should be in some kind of an equilibrium state. OK?

If that was the case, if you didn't have dQ then this would be your energy function and actually once you had the energy function you could, for example, calculate J as a derivative of energy with respect to x. So then you also start thinking about how many independent degrees of freedom do I have. Do I really need all of the set of x's and J's to describe my system in equilibrium. If additionally once I know the e, I can derive all of the J's.

So we have to also come eventually to grips with how many independent degrees of freedom will describe our system. Now the first step towards completing this expression was to find what dQ is. So we needed another law of thermodynamics beyond zeroth law and first law that somehow related heat and temperature to each other. As we expect that somehow this expression will leave you temperature.

And what we used was some version of the second law. That was there how heat would flow from, say, a hot air body to a cold air body. And Clausius's theorem would say that you have only heat flowing in one particular direction. Well, we sort of introduced the idea of engines, which are machines that are used to do work by taking heat from the heart air body to the cold air body. And we could define an efficiency, which is work divided by heat input, which since work is the difference between these two we could write as 1 minus Qc over Qh.

And then we introduced this special class of engines, which were these Carnot engines. And the idea of this class was that you could run them forward and backward. They were kind of reversible. The were kind of a analogue of the frictionless type of processes that you would use to construct mechanical energy. And we found that these engines were the most efficient. And so the efficiency of these engines was marked only by the two temperatures. So we had the functional form potentially of efficiency as a function of the two temperatures involved.

And what we also showed was that the efficiency of any random engine was going to be less than the efficiency of the Carnot engine that is marked by these two temperatures. And by putting some Carnot engines in series, we saw that the good way to write this was something of this form.

I can in principle remove the one from the two sides of this equation and rearrange it a little bit into the form Qh over Th plus minus Qc over Tc because of this inequality writing it as less than or equal to 0. OK?

What does that tell us? As it stands, not much. But then I promised you at the end of last lecture then this is an example of a much more powerful result, which is the Clausius Theorem. So let's start with writing what that theorem is and how it relates to a simple expression. And the theory is that for any cyclic process I can, cyclic, what does it mean? Is that in the set of coordinates in principle that is used to describe the system, I will start with the position that is equilibrium, so I can put that point in this state, but then I make a transformation. And ultimately return to that point. So the cycle is the return to that point.

So I carry out a set of steps. And I haven't indicated the set of steps through a connected continuous curve in this multi-dimensional coordinate space because I don't want to restrict myself to processes that are even in equilibrium. So I may take a gas that I have over there, expand it rapidly, close it rapidly as long as I wait when I come back to the same point that I have reached my equilibrium again. I have done a cyclic process.

Now at each stage of this cyclic process presumably the system takes in a certain amount of heat. So let's say that there is a dQ that goes at this stage of the process. So I use s to indicate, say, stage 0, one, two, three, four all the way coming back. So this is just a numbering process.

The statement of Clausius's theorem is that for any cyclic process if I go out around the cycle, add up these elements of heat that are delivered to this system and I allow the possibility therefore that some of the times these elements dQ will be negative just as I did over here by writing this as minus Qc so that what the dQ is what has gone into whatever this black box is. So Qh went into this black box. Qc went out, which means that minus Qc went in so I arranged it in this fashion.

You can see that the elements of heat are divided by some temperature. I generalize that expression over here by writing it T of S here. And the statement of Clausius's theorem is that this quantity has the same sign constraint as here where I told you that dQ is heat delivered to system at temperature T sub s.

Now this particular thing requires a certain amount of thinking about. Because I told you that your system is not in equilibrium. So what is this T sub S if you have a system that is not in equilibrium? You can't define its temperature. However, you can imagine that whatever machine was delivering it had sump particular temperature. And so that's the temperature of the device or whatever is delivering this heat to the system.

And you would be justified to say, well, why is that even useful? Because certainly if I were to have exactly the same cycle, but deliver the heat elements through a different process this Ts would be different. So this is really also a function of the method through which I want to carry out this cycle.

So given that it doesn't sound like a particularly useful theorem. It seems very arbitrary. So let's first prove it. The proof is simple. And then see whether it's useful or not. Any questions at this point? OK.

So how do we go proving it? We are going to use these Carnot engines. So what I will imagine is that I have some big vat that is at some, let's say, for purposes of, use a high temperature, a vat of hot water. And I use this vat as the process that provides heat to this entity.

Exactly what do I mean by that? I will use a Carnot engine to take heat. Let's call it Qh, although its sign is not that particularly important. And convert this into the heat element dQs that is delivered here. So since I'm using s, an infinitesimal element here, let me call this dQ. And let's call it dQ0 because I'm picking it up from the temperature of T0.

So I have as a result of this process a certain amount of work. All of this corresponds to the s-th element through this particular cycle. So I divide my cycle to lots of elements. Each element takes in this amount of heat and I use a Carnot engine to deliver that heat and always taking the Carnot engine from the input from T0, but what it delivers is where this randomness in temperature T of S comes about.

Why did I use a Carnot engine? Because I said that sometimes this cycle is going to take in heat. Sometimes it is going to give out heat. So I want to be able to run this both forward and backwards. Yes?

AUDIENCE: Are you delivering the work to the cycle too?

PROFESSOR: No.

AUDIENCE: OK.

PROFESSOR: The work goes whenever it goes.

AUDIENCE: OK.

PROFESSOR: OK? And indeed that's the next step of the argument, which is what happened to the work? OK? So we do this. At the end of this story I am back to where I started.

AUDIENCE: Maybe I'm--

PROFESSOR: Yes?

AUDIENCE: Maybe I missed something basic, but I don't understand why you can't just define the function dQ not of s and ignore the Carnot engine. Just deliver it the key. What was wrong with just the blue arrow?

PROFESSOR: OK. Why can't I just take heat from here to here? Because in principle where I put it is at a different temperature when I eventually go to equilibrium. And then I would run into problems of second law, as to the ability to transfer heat from a hotter to colder engine. So if you like this intermediate stage, allows me ultimately two vary this temperature Ts. What you say is correct as long as the T of S is uniformly T0. It kind of becomes useless. OK?

All right. So we enclose our cycle, the Carnot engine, everything into a box. And we see what this box is doing. So there is the box. The box takes in elements of heat, dQ from the reservoir. And does elements of work, dW at different stages.

Now once the cycle has been completed, the net result is that I have extracted an amount of heat, so this is the net, extracted heat is the integral over the cycle of dQ0 of s. And converted it to work.

Oh, one other step. Once I'm using the Carnot engine, and I think I emphasized this, there is a relationship between heat and temperature. It is this proportionally-- Qh is proportional to h for the Carnot engine. Qc is proportional to Tc. So there is a proportionality between the heat that I take and the heat that I deliver that is related to the temperatures. So dQ0 is in fact T0 dQ that goes into the engine divided by the temperature at which it is delivered to the engine. OK?

Now I know also something about this because the second law of thermodynamics says that no process is possible whose soul result is the conversion of heat to work. I can do the opposite. I can convert work to heat, but that means that the integral here has to be negative. OK?

Now T0 is just a positive constant. So once I divide through by that I have gotten the proof of the statement [INAUDIBLE]. OK? Questions? Yes?

AUDIENCE: So how is this is really going to help with the definition of T of s because get theoretically even your extraction of heat and your doing the work in that black box or the opposite could happen irreversibly, right? So you--

PROFESSOR: Exactly.

AUDIENCE: --still have a problem.

PROFESSOR: Yeah. So as I have written it here I would agree. It looks completely useless. So let's make it useful. How am I going to make it useful? So let's start some set of corollaries to this theorem. For the first thing is we get rid of this definition by considering a reversible transformation. OK?

So same picture that I was drawing before with multiple coordinates. Start some point and come back. But now I will draw is solid curve in this space, meaning that at each stage of the process I will do it sufficiently slowly so that my system comes to thermal equilibrium and I can identify it as a point in this generalized phase space. OK?

So now I have points in this generalized phase space. To each point I can therefore assign the equilibrium temperature. That I am at that stage of the cycle. OK? So now I can request my Carnot engines to deliver the heat at the temperature of the system to be maintaining the whole system plus the Carnot engines at thermal equilibrium as I switch from one cycle to another cycle. OK?

So now I have a relationship that is pertaining to things that are in equilibrium. As long as I follow the equilibrium temperature of the system and do reversible transformations I have the result that dQ reversible over Ts is less than 0. But the things about-- yes?

AUDIENCE: Could you explain again why the path integral of dQ not over s is smaller than [INAUDIBLE]?

PROFESSOR: OK. Clausius's theorem says that if I took heat from a vat and converted it to useful work I have violated the second law. So the sign of the net amount of heat that I extracted better be negative, right? OK. So you are not going to be able to have a vat and extract energy out of the lake and run your engine. It's not allowed. OK?

Now my path is reversible, which means that I could go this way, or I could go the opposite way. And if I go the opposite way, what was the definition of reversible? I reverse all of a heat exchanges inputs and outputs. OK? Which means that what I was calling previously dQ becomes minus dQ. So the inequality holds for both minus or plus, which means that as long as I do reversible transformations I must have the integral to be equal to 0. OK? Good.

So we constructed in a sense analog of doing frictionless ways of doing work and increasing the energy of the system. We have an idea about reversible ways and their relationship to T, well, one step further I need to go. Which is that I go from some point A to some point B in my coordinate space. OK?

I can do it multiple ways. I can go this way and then come back. Reversibly, I can go this way and come back one way or the other. So every way I have a number of choices. Essentially what it says is that I can go from say A to B, dQ, reversible over T, over some path, and the answer is going to be the same for doing it along a different path.

Because if I went along this path I can close the reversible cycle either by returning that way or by going the other way. So going this way or going that way, the result of the integration along reversible path should be the same. And it should be the same also for any other path that I take between these two points.

So it kind of again reminds us of pushing a particle up a hill. And as long as you are doing things frictionlessly the amount of work that you do in this process does not depend on how you go there. It's just the potential energy difference between the two points. So this entity being independent of the path implies immediately that there is some function like a potential energy that only depends on the two end points and this is how you would decline the entropy. OK?

So what we have essentially said is that if I take an infinitesimal step there's an infinitesimal amount of heat that I can do reversibly, that is related to the change of the state function through let's say dS is dQ reversible over T. Or vice versa, dQ [INAUDIBLE] TdS. OK?

We've done it finally. We can get our expression because we have now the possibility to go from this point to this point reversibly using a reversible transformation. And calculate the change in energy.

Now quite generally the change in energy conservation lay, it's dW plus dQ. If I do this reversible change so that each element I am in equilibrium. I know what J is. The dW is sum over iJidxi. And I have established that as long as I do the reversible transformations dQ is TdS. And so we have this formula. OK?

So I will write that again because really this is the most important relationship that you need to know from thermal dynamics. And we have to put all kinds of colorful things around it so you remember. OK?

Now in particular there is a very common misconception which is that results are relevant to transformations. And you derive this result for a reversible transformation. So this formula is only valid for reversible transformation. No. That's not the case. It is like saying, I calculated the potential energy of pushing something up the hill through a frictionless process. Therefore, the potential energy is only relevant for frictionless transformations. No.

Potential energy exists. It's a function of states. Energy is a function of state. And we have been able to relate energy as a function of state to all the other equilibrium quantities that we have over here. OK? Any questions? OK.

So now we can answer another side question that I raised at the beginning, which is I started with xi and Ji, as describing the system in equilibrium. Then I gradually added T. I added E, now I've added S. How many things do I need to describe the system in equilibrium?

A lot of these are dependent on each other. And in particular saw that mechanically if there was the only thing that was happening in the story, J's could be obtained from the derivatives of energy with respect to x. So J's, in some sense, once you had E were given to you. You didn't have to list all of the J's. You just needed to add E as a function of x's.

But when you have thermal transformations around, that's not enough. This equation says that if there are n ways of doing work on the system, there is one of the doing heat. You have n plus 1 independent degrees of freedom..

So n ways of sum over i, Ji, dxi, one way of SdT, you have n plus one independent variables to describe your system. And once you realize that you have a certain amount of freedom in choosing precisely which n plus one you want to select. So I could select all of the x's and one temperature. I could select all of the J's and one energy. So I have a number of choices. And once I have made my choice I can rearrange things accordingly.

So suppose I had chosen the energy in xi, then I could write dS to be dE over T minus sum over i Ji over T xi. So I just rearrange this expression and solve for dS. So this amounts to my having chosen x's and E's as independent variables and prescribed through this important law s as a function of E and x's.

What about everything else? Well, everything else you can calculate by derivatives. So 1 over T would be dS by dE at constant x. While Ji over T would be minus dS by dxi at constant E and xJ that is not equal to i. OK? Fine. So that's sort of kind of extract the mathematical content that we can get out of the second law through this Clausius's theorem.

There is one important corollary that has to do be irreversible transformations. After all, in setting up the Clausius's theorem I did not say anything about the necessity of being in equilibrium in order to achieve the inequality. Reversibility allowed me to get it as an equality. So what can I do? I can take any complicated space. I can pick a point A and in principle, make an irreversible transformation to some point B. And maybe in that process I will get some heat inputted through the system dQ. And what I would have is that the integral going from A to B, dQ divided by T along the path that I have described here which is irreversible.

But I can't say anything about it at this point. Clausius's theorem has to do with cycles. So I can, in principle connect back from B to A reversibly. So I go integral from B to A, dQ reversible over T. And having completed the cycle I know for this cycle that this is negative.

If I were to take this to the other side of the equation it becomes essentially the difference of the entropies, or here it's also the difference of entropies. But I prefer it to be on the other side. And then to make these two points very close to each other, in which case, I can write that dQ is less than or equal to TdS. This is the change in entropy in going from A to B. OK?

Again, there's some question here as to what this T is. So let's get rid of that uncertainty by looking at processes that are adiabatic. So I make sure that there is no heat exchange in going from A to B. What do I conclude then? Is that for these processes the change in entropy has to be positive. OK? Because T's are generally positive quantities. OK? So a consequence of Clausius's theorem is that entropy can only increase in any transformation. Its change in entropy would be 0 for these adiabatic transformations if you have reversible processes.

So this is actually another one of those statements that you have to think a little bit to see whether it has any use or not. Because we all say that entropy has to increase, but is that what we have proven here? Not quite. Because what we've proven is that if you have a system that is isolated, so there is a system that is isolated because I want dQ to be 0. And I want entropy to increase. OK?

So let's say we start with some initial condition and we wait and go to some final condition of whatever is inside the box. I should be able to calculate entropy before and after in order to see that this change is positive. OK? But we say entropy is a function of state. And what have I done here to change this state? I cannot calculate entropy if the system is not in equilibrium. If the system is in equilibrium it presumably does not change as a function of time.

So what is this expression relevant to? The expression is relevant to when you have some kind of a constraint that you remove. So imagine that let's say there is a gas in this room and some kind of piston that is initially clamped to some position. Then I can calculate the entropy of what's on the left side, what's on the right hand side, and that would be my initial entropy.

I remove the clamp. I remove the constraint so this can slide back and forth. And eventually it comes to another position. So then I can again calculate the final entropy from the sum of what's on the left side and what's on the right hand side. And I can see that entropy is increased.

So basically this statement really is useful when there is some internal constraint that you can remove. And as you remove the internal constraint, the entropy increases. So I guess that image that we all have is that if I give you two pictures of a room, one with books nicely arranged on a shelf and one with books randomly distributed you would have no problem to time order them. And actually presumably there was some constraint from the shelf that was removed and then these things fell down. So that's the kind of process for which this statement of the second law is appropriate. Any questions? OK.

So that statement is something about approach to equilibrium. But as I said that there was some initial configuration with some constraint and as a function of removing that constraint the system would go from one sort of equilibrium, constrained equilibrium to an unconstrained equilibrium and this increase of entropy tells us in which direction it would go. You can time order the various processes.

Now sometimes this adiabatic way of doing things is not the best way. And so depending on what it is that you are looking at, rather than looking at entropy you will be looking at different functions. And so the next step is to construct different types of functions that are useful for telling us something about equilibrium.

Now I'll start doing that by some function with which you are very familiar. And has practically nothing to do with entropy and temperature. So we are going to look at mechanical equilibrium. OK. And so the kind of prototype of this, since we've been thinking in terms of springs or wires, is let's imagine that I have a wire that has some natural lent. And it is sitting there happily in equilibrium. And then I attach, let's say a mast to it and because of that I'm pulling it with a force that I will indicate by J.

So J, if you are in gravity, would be mass of this times J. OK? Now if you were doing things in vacuum, what would happen to your x, which is the distortion that you would have from the equilibrium as a function of time? What would happen is presumably the thing would start to oscillate and you would get something like this.

But certainly not equilibrium, but in real world there is always friction that is operating. And so if there is a lot of friction what is going to happen is that your x will come to some final value. So again, this is a constraint, which I allowed this to move. And because of that constraint I went from the initial equilibrium that corresponded to x equals to 0 to some final equilibrium.

And you say, well, if I want to calculate that final equilibrium, what I need to do is to remove all of the kinetic energy so that the thing does not move anymore, which means that I have to minimize the potential energy. I'll give it the symbol H for reasons to become apparent shortly. And that is the sum of the energy that I have in the spring. Let's imagine that it is a hook end spring. We would have a formula such as this, plus the potential energy that I have in my mass, which is related to how far I go up and down. And say an appropriate description is minus Jx. OK? So this is the net potential energy of the spring plus whatever is supplying the mass that is applying in the external force.

And so in this case, what you have is that minimizing H with respect to the constraint x will give you that the x equilibrium is J over K. OK? So basically it comes down to J over K. And that the value of this function, potential energy function in equilibrium substituting this over here is minus J squared over K. 2K. OK?

So in many processes that involve thermodynamics we are going to do essentially the same thing. And we are going to call this net potential central energy, in fact, an enthalpy. OK? And the generalized version of what I wrote down for you is the following, in the process that I described which was related to the increase in entropy we were dealing with a system that was isolated. dQ was 0 and there was no work because the coordinates were not changing. dW was 0.

Whereas here, I am looking at a process where there is a certain amount of work because this external J that I am putting is doing work on the spring. It is adding energy to the spring. And the thing is that because of the friction it doesn't continue to oscillate. So some of the energy that I would have put in the system, if I really were using the formula Jidxi is lost somehow. We can see those oscillations have gone away.

Now I'm always doing this process at constant J. Right? So if I prescribe for you some path of x as a function of T, Jdx is the same thing as d of Jx because J does not change. x changes. OK?

I'm going to also imagine processes where mechanical equilibrium, but with no heat so that dQ is 0. If I were to add these two together, then I will get an inequality involving dE, which is less than or equal to d of Jixi, which I can write as the change in e minus Jixi has to be negative.

So appropriate to processes, which are conducted so that there is mechanical work at constant force, is this function that is usually called H for enthalpy. And what we find is that the dH is going to be negative. And again, if you think about it this is precisely this enthalpy is none other than the potential energy that is in the mechanical degrees of freedom. And there's always loss in the universe. And so the direction naturally is for this potential energy to decrease.

One thing to note is that dH is dE. Thinking of it not now as a process going on at constant J, but as a change in a function of state because we said that once I prescribe where I am in the coordinate space I know what, say e is. I know what J is. I can certainly construct a function, which is e minus Jx. It's another function of state. And I can ask what happens if I make a change from one point in space to another point. Along the path that potentially allows variations in J dE I know, is Jidxi. And then, actually I'm using summation conversion. So let's remove that, plus TdS and here it becomes minus Jidxi minus xidJi.

Jidxi is cancelled. And we that if I construct the function H as e minus Jx, the natural variations of it are TdS, just like dE but rather than Jdx I have minus xdJ. OK? So H is naturally expressed as a function of variables that are s and the Ji's. And remember that we said we are doing things at constant J. So it's nice that it happens that way. And in particular if I do partial derivatives I find that my xi is minus dH by dJi at constant s.

So that in the same way before I said that if you have the energy function dE by dx will give J, if you have the H functions, dH by dJ would give you x. Let's check. Here we had an H function. If I do a dH by dJ with a minus sign, what do I get? I will get J over K. What was my equilibrium x? It was J over K. OK?

Now both of these functions that we have encountered so far were expressing the system energy or enthalpy have as their argument entropy. Now if I give you a box you will have a hard time potentially figuring out what entropy is, but varying temperature is something that we do all the time. So it would be great if we could start expressing things not in terms of entropy, in terms of anything else. Well, what's the natural thing if not entropy? Here we went from x to the conjugate variable J. I can make a transformation that goes from s to the conjugate variable, which is temperature.

And that would be relevant, therefore, when I'm thinking about isothermal processes. And so what I'm going to do is to reverse the role of the two elements of energy that I had previously for mechanical processes. So what we had there was that dQ was 0, but I want dQ to be non-0. What we had there was that dW was non-0.

So let's figure out processes where dW is 0, but dQ, the same way that previously we were doing dW at constant J, let's do dQ not equals to 0 at constant T. And constant T is where the isothermal expression comes into play. OK?

So if dW is 0, I have a natural inequality that involves dQ. I just erased it, I think. Yeah. It's not here. dQ is less than or equal to TdS. And if T is a constant throughout the process, I can write this as d of TS. Add these two together to get that dE less than or equal to d of TS, or taking it to the other side, I can define a function which is the Helmholtz free energy. F, which is E minus TS.

And what we have is that the natural direction of flow for free energy when we remove some kind of a constraint at constant temperature is that we will tend to minimize the free energy. And then again doing the manipulation of dF is dE minus d of TS in general will have minus TdS minus SdT. The TdS part of the E will vanish and what I will have is Jidxi minus SdT.

So now we can see that finally for the free energy, the Helmholtz free energy, and natural variable rather than being entropy is the temperature and all set of displacements. And then if you ask, well, what happened to the entropy? You say, well, I can get the entropy as minus dF by dT at constant x.

If I take this picture of the gas that I had put at the beginning, which was just erased, picture of a piston that can slide. And I think of that as a box that I bring into this room, well, then if you'll quickly adjust to the temperature of the room, as well as the pressure of the room. So this is going to be a general transformation in which both heat and the work are exchanged. If is at external temperature and pressure that is fixed. So it's a transformation that is isothermal and constant J. In pressure you would call it [INAUDIBLE]. OK? And then quite generally you would say extending what we had before, in this case dQ is, again, less than TdS because of Clausius.

dW is less than Jdx because you always lose something to friction. You always lose something to friction. You add the two things together, and you get that dE is less than or equal to TdS, plus Jidxi. For the transformations that we are considering that are at constant t and J I can take these expressions to mean the same thing as d of ts plus Jixi, which means that more generally, I can define a function which is the Gibbs free energy, G, which is the energy minus ts. This part is the Helmholtz free energy, minus Jixi.

And that if I regard this as a function of state, which certainly will be minimized under conditions of constant J and T for some constraint that is removed. Quite generally as a state function depending on all of these variables, it's variations would be able to be expressed as minus SdT minus Jidxi. ie, our G is naturally a function of temperature and the set of displacements.

OK. I don't think music was appropriate at this point. I would have put it earlier, but such is life. OK. Now there is something that I kind of did not pay sufficient-- yes?

AUDIENCE: Sorry. Didn't you get it backwards between the J's and the x's?

PROFESSOR: I did. I did. I wrote it wrong here. So maybe that's what the music was for. OK. Is it fine? Anything else? OK. The thing that I wasn't sufficiently careful with was the list of things that goes into mechanical work.

And one additional care that what needs to have, which is that suppose I were to tell you, let's say, the pressure and temperature as my two variables, and I guess this is what I would have here if I go and look at pressure as my force. Then have I told you everything that I need to know about the system?

So I have a box, let's say, in this room that is at the pressure of this room and at the temperature of this room. Have I completely specified the box? What have I left?

AUDIENCE: The size. [INAUDIBLE].

PROFESSOR: How big is it, yes. So what I have left, previously maybe I had volume, but I sort of discarded the volume in terms of the pressure. So what I'd really need is to have the number of particles. I have to specify something. Maybe the mass, something that has still is going to distinguish these boxes in terms of their size.

Now it is most useful to think in terms of the number of particles. So I give you a box and I can say that within this box I have so many molecules of oxygen and nitrogen, or whatever is the composition, but then we sort of start to get into the realm of chemistry and the fact that the different chemical components can start to react with each other, maybe even if you have a box that is one component, some of the molecules are going to get absorbed on the surface.

So precisely what the number is is potentially something that is a variable. And in order to specify exactly what the energy content of a system is you have to specify how many particles and the energy carried by those particles. So the list of things that appears here, especially when you think in terms of chemical systems, has an additional element that is typically called chemical work.

And so let's separate mechanical work from the chemical work. So mechanical work was sum over iJidxi where these were real displacements and we can actually write an expression that is very similar here where the displacements are the number of particles of different species, allowing potentially there going to other species through chemical reactions provided we multiply these by some appropriate chemical potential.

So these mu's are a chemical potential. So for the reason that I stated before that if I were to just-- this ambiguity that I had about the size of the box tells me that I should have at least one thing left in my system describing the variables that is proportional to the size of the system.

So typically what you do when you construct a Gibbs free energy is that you subtract the mechanical work, but you don't subtract the chemical work. So the ends will remain and can tell you how big your system is. OK?

Now there is a conjugate way I can certainly do the other way. So here I constructed something in which mechanical work was removed, but chemical work remained. I could do it the other way around. I can define a function that is obtained by subtracting from the energy the chemical work, but leaving the mechanical component aside. So this function dG, OK, I should go one step before.

So once we separate out the contributions of Jidxi into mechanical and chemical components, I would write dE as TdS plus sum over iJidxi, plus sum over alpha mu alpha dN alpha. OK? I just explicitly separating out those two sources of work.

Now when I constructed G, which subtracts from e, the mu, but not the J, what happens? I will get a minus TdS. This will remain unchanged. This will get transformed to N alpha, d mu alpha. Just hold on a second. So this entity that is called the grand potential actually completes the list of these functions of state that I wanted to tell you is naturally a function of T, the chemical potentials as well as the displacement.

For example, if it's a gas the displacements will include the volume which tell you how much material you have. Yes?

AUDIENCE: In that case, do you need to subtract an additional TS from E and [INAUDIBLE]?

PROFESSOR: Very good. These are all examples of the energies so that you define them as a function of temperature rather than entropy. The only things that really remain, the one function that you sort of keep as a function of entropy is energy itself. Enthalpy, too. Yes, it has its uses. Yes?

AUDIENCE: So I have many questions about [INAUDIBLE].

PROFESSOR: OK.

AUDIENCE: [INAUDIBLE]. Right now I wanted to ask you say that so a particle is added to the system, a particle of some species. And this is going to change the energy of the system. So my question is while this particle can bring energy in several ways, like kinetic energy, or maybe it's this chemical bound that's been broken--

PROFESSOR: Yes.

AUDIENCE: between energy from there.

PROFESSOR: Absolutely.

AUDIENCE: Or also it's rest energy from special [INAUDIBLE].

PROFESSOR: Yes.

AUDIENCE: So which ones are we counting? Which ones are we not counting?

PROFESSOR: OK. So what you see is that when we do all of these calculations we definitely need to include when we are talking about a gas, the kinetic energy component. The change in the covalent bond energy definitely has to be there if I take an oxygen molecule and separate it to two oxygen atoms. There is that change in the energy that has to be included corresponding kinetic energies.

Typically the rest mass is not included. And so if I were to include that it will be a shift of chemical potential by an amount that is mc squared. Why do people not bother? Because typically what we will be trying to look at is the change when something happens. And you have to bring those particles presumably from somewhere.

So as long as you bring in particles from somewhere then there's the difference between the rest mass that you had outside and rest mass that you have here, that's 0. It's really all of the other things that contribute to useful quantities that you would be involved with like temperature, pressure. The rest mass is irrelevant.

Now I can't rule out that you will come up it some process that is going on in [INAUDIBLE] for whatever where the rest mass is an important contribution. So it may, to some extent, depend on the circumstance that you are looking at. But if you are asking truly what should I include in the chemical potential, it will include the rest mass.

AUDIENCE: So for example in-- I don't know, in cosmology they often talk of the chemical potential of the different species, like elementary particles in the cosmos.

PROFESSOR: Right.

AUDIENCE: They say that the chemical potential of photons is 0.

PROFESSOR: Yes.

AUDIENCE: So here they have fixed some kind convention?

PROFESSOR: No. You see there is a difference between photons and other particles such as electrons or whatever, which is that you have value in number or some other number conservation that is applicable. So any process that you have will not change the number of [INAUDIBLE].

Whereas there are processes in which there is something that is heated and will give you whatever number of photons that you wish. So there is a distinction between things that are conserved and things that are not conserved. So We will get to that maybe later on as to why it is appropriate to set chemical potential to 0 for non-conserved things. OK?

Yeah, but it's certainly something that we have immediately a feel for what the pressure is for what the temperature is, so we have our senses seem to sort of tell you the reality of temperature and pressure, but maybe not so much the chemical potential. So I tried to see whether we have a sense that actually is sensitive to chemical potential and we do to some extent.

As you drink something and you say it's too salty, or whatever, so somehow you are measuring the chemical potential of sort. So if you like that, that would be your sensual equivalent of chemical potential. OK? Yes?

AUDIENCE: Is there a potential where you have both chemical and mechanical work? [INAUDIBLE].

PROFESSOR: OK. So that will run into the problem of if I do that, then my parameter is going to be T, J, and mu. And then I can ask you, how much do I have? Because all of these quantities are intensive. Right? So it could be a box this is one cubic centimeters or miles long. So I am not allowed to do that.

And there is a mathematical reason for that that I was going to come to shortly. Other questions? OK. So We are going to take an interlude. Actually, the last question is quite relevant to what we are going to do next, which is that we have these functions defined, many coordinates, and one of the things that thermodynamics allows you to do is to relate measurements of one set of quantities, another set of quantities. And it does so through developing mathematical relationships that you can have between these different functions of state.

So the next segment has to do with mathematical results, which I will subdivide into two sets of statements. One set of statement follow from the discussion that we have had so far, which has to do with extensivity. What do I mean? Let's take a look at our most fundamental expression, which is dE is TdS plus sum over iJdxi, plus sum over alpha mu alpha dN alpha.

Now you recognize that certainly as the amount of material gets increased, the number of particles increases. The typical sizes and displacements get bigger. The energy content gets bigger. The entropy content is related to the heat content and so that gets bigger. So these differential forms that I have on this expression, they're all proportional to the size of the system.

What does that mean? It means that e, the way that I have it here has as its natural variables S, x, N. And extensivity means that if I were to make my system twice as large, so that all of these quantities would get multiplied by a factor of two, the energy content would get multiplied by a factor of two. OK?

Now it is important to state that this is not a requirement. OK? This is a statement about most things that we encounter around us, but once you go, let's say, to the cosmos, and you have a star, the gravitational energy of the star is not proportional to its volume. It goes the size to some fractional power.

So that is an example of a system because of the way gravity works as a long range force, that is not extensive system. Typically this would work as long as you have interactions among your elements that are sufficiently short-ranged so that you don't get non-extensivity. If that's the case then I can take a derivative of this expression with respect to lambda, evaluated at lambda equals 2, 1.

If I take a derivative with respect to lambda here I will have dE by dS, times S. I mean, the argument here is lambda S. I am taking a derivative with respect to the first argument. So I bring out a factor of S. dE by dS at constant x and N. And then the next term is xi dE with respect to all the different xi's at constant S and N.

Next one is going to be N alpha, dE by dN alpha at constant x and S. And there's only one lambda on this side, which is going to give me E of Sx. OK? Now if I look at my initial expression I can immediately see that dE by dS at constant x and N is none other than T. So this is the same thing as T. dE by dxi at constant s and n is none other than Ji. dE by dN alpha at constant x and Js is none other than mu alpha. So once I set the argument to be 1, so that all of these things are evaluated at lambda equals to 1, I have the result that e is equal to TS plus Jixi, plus mu alpha N alpha.

So in some sense all I did was I took the more fundamental expression and removed all of the d's. So some places, this is called the fundamental relation, but I don't like that because it is only valued for systems that are extensive, whereas the initial formula is valued irrespective of that. OK?

Now once I have this what I can do is I can think of this as a relationship among different functions of state. Take a derivative and write it as dE is d of TS. D of TS is TdS plus SdT, plus d of Jixi, which gives me Jidxi plus xidJi, plus d of mu alpha. And alpha will give me mu alpha dn alpha, plus N alpha d mu alpha. OK? This is just a rewriting of this expression in differential form.

But I know that dE is the same thing as TdS plus Jdx plus mu n alpha. So immediately what it tells me is that the intensive variables T, J, and mu our constrained to satisfy this relation, which is called a Gibbs-Duhem relation. OK?

So this is, if you like, the mathematical reason for my answer before. That I cannot choose this set of variables to describe my system because this set of variables are not independent. If I vary two of them the variation of the other one is fixed. And I said I need N plus 1 independent degrees of freedom. If I choose all of the intensive ones I'm really using one additional relationship that relates them, makes them dependent. And of course this also goes to the fact that I won't know what the size of the system is, both of them reflections of extensivity.

Just as an example, let's see. Chemical potential along isotherm. So for a gas, what would I have? I would write SdT minus Vdp. That is my contribution from the work here remembering that hydrostatic work at the wrong side. And then I have N d mu equals to 0.

I said how do these vary along an isotherm? Isotherm means that I have to set dT equals to 0. If I'm along an isotherm then I have that d mu is rearranging things a little bit. Mu over NdP. So this is the formula that I will have to use.

Now let's specialize to the case of an ideal gas. So I'm going to use here an ideal gas. For the case of the ideal gas we had the relationship that PV was NKT. So v over n is the same thing as kT over p. Remember that we are dealing with an isotherm, so T is constant. dp over pi can integrate, and therefore conclude that mu at a constant along an isotherm, as a function of the other two intensive variables T and P, is some reference that comes from a constant of integration. And then I have KT, integral of dP over P is log of P divided by sum. Actually, I already put the constant. OK?

Very briefly to be expanded upon next lecture, the other set of mathematical relations go under the name of Maxwell relations. And they follow from the following observation. If I have a function of more than one variable, let's say, f of x and y, two variables, then the natural way to write this consistent with what we had before is that df is df by dx partial at constant ydx, plus dfy, the y at constant x dy.

But one thing that we know from calculus is that these are first derivatives, and there are a bunch of second derivatives. In particular, the second derivative d2 f, dx, dy is independent of the order of taking the derivatives. Which means that if I take a derivative of this object with respect to y, I will get the same thing if I were to take a derivative of the second object with respect to x.

So in particular if I go back to my fundamental equation, dE, let's forget about the chemical potential because time is running short, Jidxi plus TdS. I identify T and Ji as the first derivatives. That is, Ji is the first derivative of e with respect to xi at constant S. T is the first derivative of E, with respect to S at constant x.

Then if I were to take a second derivative to construct d2E with respect to x and T, and S, I could do it two ways. I already have a derivative with respect to x that gave me Ji, so I take another derivative of J with respect to S, now at constant x.

Or I can take a derivative here, which is dT by dxi at constant S. And depending on which one of the many functions of state that we introduced, E, F, G, H, you can certainly make corresponding second derivative inequalities. And the key to sort of understanding all of them is this equality of second derivatives.

So what I will start next time around is to just give you a set of things on the left hand side, the analog of this. So for example, I could choose dS by dxi at constant T and show that just by looking at the form of this how we will be able to construct what this thing is related through a Maxwell construction. OK? Thank you.