Alright, let's dive a little deeper into pressure volume, PV work. So, I want to think about variations in pressure. So, in one of the experiments I showed you previously, we considered a gas doing work on the surroundings by expanding against an external pressure that's lower than the internal pressure. And so the work that was done here was minus the external pressure times the volume change. But what if the external pressure isn't a constant? So in that case, I actually need to integrate my work from an initial pressure to a final pressure. I need to know how is the external pressure varying as the volume is varying. That is, work is going to be minus the integral from the initial volume to the final volume of the external pressure dV. So, that's completely general. What I would need to know is, how is P external varying along some path where the volume is varying? In the case of the constant external pressure, of course it's consistent with the equation we've looked at before. As a constant, it would simply come out in front of the integral. That becomes the integral from V1 i, to Vf of dV. So of course, that's just delta V. That's, completely trivial and it's consistent with the general expression. That's good. But, I want to emphasize that work is the area under a curve defined by P external as a variation, with a variation in volume. So, I've got this one-dimensional integral. And if I think about an isothermal compression at constant pressure. And so, what I'm going to do here is, I'm going to draw. I've got on these graphs. Volume on the x-axis in litres or cubic decimeters, I've got pressure in atmospheres or bar, they're close, they're different by 1%. I guess they say bar, so, pressure in bar for an ideal gas, I would have this curve, right? I've got the pressure is equal to nRT over V. So, pressure is going as 1 over volume. And the work is equal to the shaded area that will be underneath an external pressure curve. So, here's a constant external pressure. I'm going to start at a pressure of 4 bar and I'm going to compress my gas which starts at a lower pressure, which starts at a volume of one liter. I'm going to compress it until it's internal pressure, which is dictated by this ideal gas line is also equal to 4 bar. And the work I do, it looks like that happens when I get to half a liter. The work I do will be 4, because that's the external pressure, times a half, because that's how far I traveled in volume. That's delta V. So 2. 2 liter bar. That's a unit of energy. Now, had I in fact had an external pressure of 8 bar, instead of, 4. And I stop when the internal pressure is equal to 4 bar .How much work did I do? External pressure is 8. I go over a half. I'll have done 4 leader bar worth of work. I did more work. I was pressing harder, even though I stopped at the same point. So, the reversible isothermal compression is something I want to talk about. And I want to make clear that work depends on the path that's taken from V1 to V2. So, you just saw an example where I got two different works for doing exactly the same thing. I compressed a gas from 1 liter to a half a liter. And that gas must have been at the same temperature because it had the same PV curve. Now let's imagine a so-called reversible process. So, here in red is what you saw in the last graph. It is at constant external pressure. And it's the constant external pressure that involves the minimum of work to do the compression. Why is it the minimum? Because it's the pressure I needed to get right to the end. At the end my internal pressure of the gas is equal to the external pressure. Second example I showed in the last slide I had excess pressure, I didn't need that. Okay, but now, imagine instead of just starting with this 4 bar worth of pressure, I actually start down here with about 2 bar of pressure. Right? And I know it's 2, because this is an ideal gap, and so, PV is a constant, right? It's equal to RT. So 2 times 1 must be equal to 4 times a half. So, here I am at 2 bar and imagine I just infinitesimally increase my pressure to 2.0000, as many zeros as you want, 1 bar. So I'll press my piston down a little bit. And then another infinitesimal little bit, infinitesimal little bit. So I'm going to move along this PV curve that characterizes the ideal gas relationship. That defines the reversible path that infinitesimally small increases with infinitesimal movement of the piston. So, remember my general expression. The reversible work, I'll emphasize it's reversible by putting that subscript on work. Minus V1 integral V1 to V2, the pressure and now the external pressure is equal to the gas pressure. That's what it means to be reversible. I'm not in some massive excess. That the gas pressure comes from the ideal gas equation of state. It's nRT divided by V. So let me just plug that in. Now I have minus the integral from V1 to V2, nRT over VdV. So, I'll pull all the constants out front that's minus nRT, integral V1 to V2, dV over V. That's an easy enough integral to solve. It's the logarithm of V. And when I take the definite interval limits, I'll get that the reversible work is minus nRT log, V2 over V1. Notice I am compressing my gas. I'm making it occupy less volume. So V2 is smaller than V1. So, I'll be taking a log of a number less than one, that'll make it negative. This is a positive value, its temperature. This is a positive constant. This is a positive constant. This is negative, so the net will be positive. Two negative multiplied times each other positive. The work is positive, that's what I want. I'm compressing a gas. I'm doing work on the system, so it's all hanging together. What about the opposite, the reversible isothermal expansion. So, in this case, I'm following the same reversible path. I am infinitesimally pushing the piston up as I expand to a final pressure. And let me contrast that, then, with the maximum work I could do against a constant external pressure. So, here would be the constant external pressure that gets me to my end point so, it's 2 bar in this case. So, the most work I could do would be 2 times a half because I'm traveling over a half a volume. The most work I could do would be one liter bar. On the other hand, on the reversible path, where I am slowly decreasing the pressure from this initial level, again I'll get the same integral minus V1 to V2: nRT over VdV. Here's the logarithmic solution. Except that now V2, the final volume is greater than the initial volume. So, if V2 over V1 is a positive number, the log is positive, the whole work is negative, consistent with, the system doing work on the surroundings. And the integral under that curve is obviously bigger. The shaded area is the constant external pressure that we would add this extra work when we follow the reversible path. Alright? So, let's pause for a moment, I'd like you to add some different PV expansions or compressions if you appreciate how they differ in terms of the pressure involved. So, I'd really like to cement home this, difference between a reversible path and a non-reversible path. And I'd also like to emphasize, the reason we've been talking about isothermal processes is because we want to take advantage of this relationship for an ideal gas. But if the temperature is constant, then P times V is a constant. Right? It's, because PV for an ideal gas is equal to nRT. So n and R are constants. If T is a constant, then PV is constant. And so I'd just like to illustrate. Imagine again that we're expanding an ideal gas from half a liter at 4 bar to 1 liter at 2 bars. And one way we might do it, I'll actually draw an experiment here, imagine I've got this mass and it's enough of a mass to press down with 4 bar worth of pressure. And it's sitting on top of a piston and when I take it off, the piston rises and it leaves 2 bar. So, the piston if you like weighs as much as the mass. You've got 2 bar out of the piston, 2 more bar out of the mass. So, the constant external pressure in one step would consist of just lift that first mass off. And so, you immediately have an external pressure of only 2 bar. That's the piston. And you will expand from 1 half to 1 liter. And so you'll have done 2 bar times half a liter, you'll have done 1 liter bar. And if you look up the conversion of liter bar to joules, that's minus 100 joules, minus because we're doing work on the surroundings. So, you did minus 100 joules worth of work. Well, let's imagine instead of a single mass that was pressing down with two bars worth of pressure. I have two masses, which is worth an addition, is worth a bar. And so, the piston plus the 2 masses is still a net of 4. But I'll take them off now in steps. So, I go from 4 to 3. And so, I'll travel along until I hit the curve, which will be because PV must be a constant. It'll be at 0.67 liters because 3 times two thirds is 2. And I'm always along a curve where PV equals 2 in this case. And so I can integrate under that curve. And now I take the other one off. So, now I'm moving from 0.67 out to 1b so, that's 2 thirds times 2, out of 4 thirds. And this was 3 times a third. I guess that all comes up to, 7 thirds, something like that. when you turn that into joules minus 117 joules. So, you got more work out of the system. By doing it more slowly, not just ripping the bar off, the weights off. But taking them off in two steps. So, the reversible path basically imagines, I don't have a weight here, I have a pile of sand. And I'm going to take that sand off one grain at a time. It's going to be a slow experiment, but it's going to be a reversible experiment. So, with each infinitesimal little grain relieving the pressure, the gas is going to expand, expand, expand, expand, expand, doing work, raising that piston. And I will end up with, if you integrate under that curve, if you actually compute the logs. You'll get minus 139 jewels. So, illustrating that work depends on the path. It depends on how you change that external pressure. All right, well that completes our first look at PV work. In the next lecture, I want to consider this from a somewhat more mathematical standpoint and talk about differentials and state functions. However, before we get to that let's take a look at an, another demonstration. And in fact one that will illustrate the kinds of work that gas can do in the presence of temperature differentials for instance, which give rise to pressure and volume changes. Hopefully you'll find that interesting. For this demonstration, we have a simple Stirling engine. The Stirling engine extracts work from pressure volume changes of a gas that occurs because of temperature differentials. In this case, we are going to put the Stirling engine on top of something that has a different temperature than the air in the room. It can either be hotter or colder. Let's start with hotter. I'll place the Sterling engine on this heat pad. Notice that the fly wheel, on the top of the sterling engine, when given a little kick, begins to turn. And having been started, it continues to turn. Thus, the gases doing work to turn the wheel. I'm not going to attempt to describe the action of the Sterling engine in full detail. You can find dozens of pictures and videos on the Internet that go into great detail on all the different types and models of Sterling engines if you're interested. For our purposes, I just want to outline the broad principles. At the beginning of one turn of the flywheel, we have a somewhat loose large piston inside the engine that's displacing the gas in the engine near the bottom. As the heat expands the gas that is there, it pushes both the primary and a small secondary piston up with the latter rotating the flywheel. The flywheel is attached not only to the secondary piston but also to the primary with a variance in position. And during the power cycle, the flywheel's momentum forces the main piston down, driving the remaining hot gas up to the cooler part of the chamber above. In that chamber, it contracts because of the lower temperature, making it easier to move the secondary piston down and pull the main piston up. Now driving the cold gas back into the hot side of the chamber, so that the whole cycle starts again. To get the most efficiency out of the engine, it's important to properly coordinate the motion of the two pistons and the gap between the main piston and the container walls. But such design considerations go beyond what I want to illustrate here. The key point for our purposes, is to illustrate the fashion in, which PV changes deriving from temperature changes can be exploited to do work. Finally, let's switch our Sterling engine so that now the bottom rests on ice. Which is colder than the room air, instead of, the hot pad which was warmer than the room air. Note that the same principle of temperature variation permits us to extract work. But now, the pistons must move in a relationship opposite to that that was operative previously. So, our flywheel is turning in the other direction. Sterling engines do find use in various low power applications. In part, because they are extremely quiet. And obviously, they're wonderfully simple. So, long as a useful temperature variation is available to exploit. [SOUND].