Welcome back. I hope that all of my readers had a restful weekend, and are having a smooth return to classes. In today’s blog post, I look forward to sharing some of the fundamental concepts of thermodynamics. If we were to define thermodynamics, we could say that it is the study of energy and the ways in which energy can be transferred. Therefore, we will begin our discussion by asking the question: What is energy? We will then define the three categories of thermodynamic systems (control volume, control mass, and isolated systems), and move into discussing the first law of thermodynamics. On first glance, the first law appears to be rather unexciting. It says that the energy that accumulates in a system is equal to the energy that comes in minus the energy that goes out. However, because of its simplicity, this rule is fundamental throughout engineering, from rigid body dynamics, to fluid mechanics, to combustion. The complexity in thermodynamics really arises with the second law. This rule, which involves the mythic quantity of *entropy*, gives a direction to physical processes. The second law explains why a broken glass vase doesn’t spontaneously recombine into its original form. Once we define the first and second laws, we will combine them to derive the celebrated *Tds equations*. These equations relate entropy to internal energy, pressure, temperature, and volume, and they are particularly useful for understanding high-speed fluid flows. Therefore we will end our discussion with some fluid mechanics. By combining the Tds equations with the Euler equation, we will show that vorticity increases entropy in an ideal fluid.

In physics classes, we are taught to use a quantity called energy to solve problems. This energy can come in several forms. If an object is moving, then it has kinetic energy, defined by

KE = ½ m |**u**|^{2},

where m is the object’s mass and **u** is the object’s velocity vector. A stationary object also has energy. One notable type of stationary energy is potential energy, defined as

PE = mgz,

where g is the acceleration due to gravity and z is the object’s vertical distance above some reference altitude. In most physical processes, energy is transformed from one form to another, but the total energy of the entire universe must remain constant. Ultimately, energy is not anything physical. We cannot see energy and we cannot touch energy. At its core, energy is a mathematical construct. It is a quantity that we can compute using known properties of a physical system, and by the wicked trickery of mathematics, the sum of all of the energy of all solids, liquids, gasses, and plasmas in the universe remains constant.

Even though it is a mathematical construct, energy is very useful, and it has given rise to the field of thermodynamics. To begin our journey into thermodynamics, let us define three of the fundamental types of thermodynamic systems. We will define a system to be a *control volume* if it encompasses a fixed volume in space, but mass and energy can cross through the boundary. One example of a control volume is a jet engine. While the volume within the confines of a jet engine remains constant, air moves into and out of it continuously. As this mass of air crosses through the boundary of the jet engine, it brings energy with it. The second category of thermodynamic system is the *control mass*. This is one in which mass cannot cross the boundary, but energy can. An example of a control mass is gas trapped in a piston-cylinder assembly. There is a fixed mass of gas that cannot move past the piston, but energy can leave the system if the gas expands and pushes the piston upwards. The third and rarest category of thermodynamic system is the *isolated system*. This is one in which no mass and no energy can cross the boundary. In reality, these isolated systems are difficult to achieve, but one example is the entire universe itself. All energy and mass transfers that happen in the universe stay in the universe, which makes it an isolated system.

Now that we have defined control volumes, control masses, and isolated systems, we can discuss the first law of thermodynamics. In all of its formulations the first law is a statement of energy conservation, saying that the increase in energy of a system is equal to the difference between the energy put in and the energy taken out. For an isolated system, the first law is rather boring. Since no energy can cross the boundary, the total energy of the system E (which is the sum of kinetic energy KE, potential energy PE, and internal energy U) must be constant. That is to say,

dE = 0,

where dE = d(KE) + d(PE) + dU is a differential change in total energy. For a control mass, the first law is nontrivial, and states that

dE = δQ – δW.

The quantity δQ represents a differential amount of energy added to the system by heat, while δW represents a differential amount of work done by the system. It is key to realize here that heat is an energy transfer mechanism, and not a type of energy. Therefore, I used the phrase “energy transferred by heat” instead of just “heat.” We can also note that we use the symbol “δ” instead of “d” to denote small changes in work or energy transferred by heat. This is because Q and W are *inexact differentials*, meaning that they depend on the path a system takes to get from one state to another. Total energy, on the other hand, does not depend on a system’s path, and therefore changes in E are denoted by “dE.”

For a control volume (CV), the first law is the same, except we also must account for the energy brought in by the mass entering the system and the energy carried away by the mass exiting the system. It is often convenient to write the first law in terms of time derivatives:

(dE/dt)_{CV} = δQ/dt – δW/dt +

+ dm_{in}/dt (h_{in} + u_{in}^{2}/2 + gz_{in}) – dm_{out}/dt (h_{out} + u_{out}^{2}/2 + gz_{out}).

In the equation above, we have defined all of the quantities except h, which is *enthalpy *per unit mass. This enthalpy term is defined as

h = u + pv,

where u is total energy per unit mass and v is volume per unit mass. For now, enthalpy can be thought of as a convenient grouping of terms that captures the internal energy of the mass crossing through the system boundary and the work that pressure does to push that mass through the system boundary. The total enthalpy, H, is similarly defined as

H = U + pV,

where U is the internal energy in a given chunk of mass and V is the extensive volume of that chunk of mass. Now that we have defined the first law for all three categories of thermodynamic systems, one question that might come up is why we distinguish between work and energy transferred by heat. Afterall, W and Q are both forms of energy, and we could easily lump them together. Using the first law alone, there is actually no reason why W and Q should be distinguished apart from each other. To understand why we separate W and Q, we must consider the second law of thermodynamics.

The second law deals with a quantity called *entropy*, which quantifies “disorder,” or how spread out energy is. The entropy of an extensive lump of mass is denoted by uppercase S, and the entropy per unit mass of a substance is denoted by lowercase s. For an isolated system, the second law of thermodynamics reads

dS ≥ 0,

which implies that the total entropy of the entire universe is never decreasing. For a control volume, the second law is a little bit more complicated, and says

dS ≥ δQ/T,

where T is the temperature at which energy δQ is transferred into the system by heat. If dS is strictly greater than δQ/T, then the system is said to be undergoing an *irreversible* process, and if dS = δQ/T, then the system is undergoing a *reversible *process. As their names suggest, a reversible process can theoretically occur backwards, while an irreversible process can never occur backward. This is what was meant in the introductory paragraph, when we said that the second law gives physical processes a direction. For a control volume, the second law is a little more complicated still, as it must account for the entropy that incoming mass carries into the system and the entropy that outgoing mass carries out of the system:

(dS/dt)_{CV} + dm_{in}/dt s_{in} – dm_{out}/dt s_{out} ≥ (δQ/dt) / T.

At this point, we can say: hey! Wait a minute! There’s no work involved in the second law of thermodynamics. Loosely speaking, this is because work is an “organized” mechanism of energy transfer, while heat is a “disorganized” mechanism of energy transfer. Therefore, if we want to quantify disorder in a system we must specifically focus on Q, and not W.

Since we have familiarized ourselves with the first and second law, let’s now use them to gather some insight into fluid systems. We will begin with a fairly general assumption that we have a *simple compressible substance*. This is one in which surface and body forces are negligible, and the only non-negligible work comes from pressure. Hence, the work per unit mass, w, can be expressed as

δw = p dv,

where, once again, v is the specific volume. Next, we can assume that the kinetic and potential energy of the substance is negligible, and thus the total energy, e, per unit mass can be approximated by

de = du.

Now, we make the seemingly restrictive assumption that the simple compressible substance is undergoing a reversible process, and so

δq = Tds,

where q is energy transferred by heat per unit mass. At first glance this assumption may seem fairly limiting, but many fluid flows can accurately be approximated by reversible systems, so long as there is no friction or turbulence. According to the first law,

de = δq – δw,

which is equivalent to

du = Tds – pdv.

Upon slight rearrangement and recognition that dh = du + vdp + pdv, we arrive at the two *Tds* *equations*, written succinctly as

Tds = du + pdv = dh – vdp.

The relations above represent the most general form of the Tds equations, but for our purposes, we can replace the general d’s with spatial gradients and focus on the terms on the right-most side. This leaves us with

T ∇s = ∇h – (1/ρ) ∇p,

where ρ = 1/v is the density of our substance. From here, let’s explicitly assume that our substance is an ideal incompressible, inviscid fluid that obeys Euler’s equation

ρ ∂**u**/∂t + ρ (**u** • ∇) **u** = – ∇p.

If our flow is also steady, then all time derivatives vanish and

– (1/ρ) ∇p = (**u** • ∇) **u**.

Upon substituting this expression into the spatial gradient version of the right Tds equation, we obtain

T ∇s = ∇h + (**u** • ∇) **u**.

The convection term (**u** • ∇) **u** is a bit unwieldy, and after using a bit of vector calculus, we can show that

(**u** • ∇) **u** = (∇ x **u**) x **u** + ½ ∇|**u**|^{2}.

Thus,

T ∇s = ∇h + ½ ∇|**u**|^{2} + (∇ x **u**) x **u**.

Let’s now focus on the enthalpy term ∇h and “kinetic energy” term ½ ∇|**u**|^{2}. Since the gradient is a linear operator, we know that

∇h + ½ ∇|**u**|^{2} = ∇(h + ½|**u**|^{2}) = ∇h_{0},

if we define the *stagnation enthalpy* h_{0} to be

* *h_{0} = h + ½|**u**|^{2}.

Intuitively speaking, h_{0} is the enthalpy per unit mass of fluid that is brought from velocity **u** to rest in a reversible process. Practically, h_{0} is a useful quantity because it frequently remains constant in a fluid while h and **u** change. If we combine our definition of stagnation enthalpy with Euler’s equation and the Tds equations, we are ultimately left with *Crocco’s Theorem* for a steady, incompressible, inviscid fluid:

T ∇s = ∇h_{0} + (∇ x **u**) x **u**.

The important term to consider now is (∇ x **u**) x **u** because it involves the curl of the velocity field (otherwise known as the *vorticity*). In practical cases, the left hand side is nonzero if ∇ x **u** is nonzero. This means that the presence of vorticity causes entropy to increase. While this result only applies to ideal steady flows, it can be generalized to explain how turbulence generates entropy, and in fact, is an irreversible process. The subject of this generalization will be left for a future blog post.

For now, we will conclude our brief foray into thermodynamics. My hope is that this discussion has been informative for both intermediate and advanced audiences, and that it has given a hint of the power thermodynamics has. Next time, we will return with some more fluid dynamics theory. For now, please take care.

## Leave a Reply