Hey, guys. So by now, we've talked a lot about the first law of thermodynamics. In the next couple of videos, we'll start to talk about the second law of thermo. And what we'll see is that it's not so much an equation as it is a bunch of statements, and these statements have to do with these things called heat engines. So before we get there, in this video, I want to introduce to you what a heat engine is, and hopefully, I'll give you a really good analogy for sort of understanding these things. I'll also show you some of the equations and diagrams that you'll need. So let's go ahead and check it out here.

Basically, a heat engine is kind of a machine or a device or something like that, and what it does is it converts heat energy into useful work. Now the analogy that I always love to use is that it's just like the engine that's in your car. A car engine is a perfect example of a heat engine, so I always want you to think about it whenever we talk about these things or just in case you forget. Now without getting into the specifics, basically what your car works is it takes some gasoline, some fuel source, and your car ignites that gas. It creates a ton of heat and thermal energy. And basically what your engine does is it takes that heat energy, and then it uses it and converts it into useful work by turning the wheels of your car, and that's what makes you go forward in your car. So it converts heat into useful work. And it doesn't do this perfectly, so what ends up happening is that some comes out the back end as exhaust. So this is just the exhaust heat that comes out the back of your car, alright? So that's really how any heat engine works. It takes in heat and then converts it into useful work, and then it spits out whatever it doesn't use. Alright?

So instead of having a bunch of different diagrams for a bunch of different types of machines, physicists a long time ago developed what's called an energy flow diagram. You're going to see these things a lot in your books and classes, And basically, what this thing is is it represents the heat transfers that are happening in any kind of heat engine regardless of whether it's a boat or a plane or a car, whatever. Alright? So there's a couple of important things you need to know about them. The first one is that this energy flow diagram has what's called a hot reservoir. Now what does that mean? Reservoir, it's kind of like a weird word, but it's basically just a source of heat energy that's going into the engine. In my car engine analogy, the source of the heat energy was the burning gasoline that we ignited, right? So the hot reservoir is just the gasoline that you're igniting. That's what the engine uses in order to produce work. So the second thing you need to know is the work is the usable energy that's produced by the engine that's turning the wheels of the car in our analogy, right? So your car takes the gas, sets it on fire, and then uses that to spin the wheels of your car and move you forward. Alright. Now lastly, we have what's called a cold reservoir, and that's kind of like the opposite of a hot reservoir. It's basically where all the wasted heat energy goes once it's expelled out from the engine. And in my example here, that was basically just the exhaust pipe. That's where the rest of the not used heat energy goes. Alright, so that's the basics of how a heat engine works conceptually. Let's take a look at some of the equations that you'll need.

Now remember we talked about the first law of thermodynamics, which was this equation here: ΔE=q-w. We also did in a previous video, took a look at cyclic processes, and cyclic processes had a special condition that the change in internal energy, ΔE=0. So directly from this equation, if ΔE=0, then that means that q=w. So what we saw is that for cycles, the w for the cycle equaled the q. The work done in the cycle equals the heat added during a cycle. Now heat engines are always going to be cyclic. Now this process here of burning gasoline and this and that doesn't just happen one time. It happens over and over and over and over again as long as you can feed your engine more gas, right? So heat engines always happen in cyclic processes that repeat over and over again. And we also have that heat is flowing in and out over a cycle. So basically, just directly from this equation, the work that's done by the engine is equal to the heat that gets added over the cycle. Now what happens is, again, we have 2 heats. We have one that's going in, one that's going out. So what is this qȈnet here? It's actually both of them. It's actually the heat that's going in, that's qȉh, and it's positive because it's getting added to your system. And then this qȉc is leaving your system, so it gets a negative sign. So that's basically the equation that you're gonna see. One way you can kind of think about this is that the work that's done is equal to whatever heat that goes in minus whatever heat that goes out. But I just highlighted this one because this is the one that you're most likely going to see in your problems. So that's really all there is to it, guys. Let's go ahead and take a look at our example here. So we have a heat engine that's taking in 500 joules of heat. It's doing 300 joules of work. We want to calculate how much waste heat is expelled from the engine. So which variable is that? Well, if we want to solve for some kind of a heat, that's going to be a 'Q'. We're solving for how much waste heat is expelled, so I'm going to label this as qȉwaste. Alright. So before we actually get into any equations, let's sort of draw out in our energy flow diagram what's going on here. So remember, we have a hot reservoir, we have a cold reservoir, but we're told in this problem is that 500 joules of heat is being taken into the heat engine. So which variable is that? Well, remember, your heat engine takes in heat from the hot reservoir. So that just means that this qȉh or qȉin is equal to the 500 joules. Now what your heat engine's doing is it's taking some of that heat energy and it's doing 300 joules of work. So that's pretty straightforward. Remember the work is always just gonna come out of your heat engine like this. So your w here is just gonna be the 300 joules. So if we're asked to find out the heat, the waste heat, it's basically the one heat that we don't have in this deck in this diagram here, which is the heat that gets expelled out to the cold reservoir. So this is qȉc or in other words, qȉout. And that's basically what this waste heat represents. Alright? So the trick to these kinds of problems here is kind of translating which variable they're asking you to solve. So qȉwaste is equal to qȉc. In other words, it's equal to qȉout. I mean, any of these, they all mean the same thing.