This month’s column builds upon the basic building blocks from last month, namely that despite the seemingly simple presentation that most textbooks afford to the idea of entropy there is an enormous amount of subtly and nuance in an idea that is well over a hundred years old. As discussed in that earlier post, Robert Swendsen argues in his 2011 article How physicists disagree on the meaning of entropy (American Journal of Physics 79, 342), the primary area where things seem to break down is that different people presuppose an implicit set of assumptions not necessarily shared by anyone else. To quote Swendsen
When people discuss the foundations of statistical mechanics, the justification of thermodynamics, or the meaning of entropy, they tend to assume that the basic principles they hold are shared by others. These principles often go unspoken, because they are regarded as obvious. It has occurred to me that it might be good to restart the discussion of these issues by stating basic assumptions clearly and explicitly, no matter how obvious they might seem.
The one area that has triggered this realization was his recent work on (and subsequent debate over) the Gibbs paradox.
The Gibbs Paradox, named after Josiah Willard Gibbs, is the derivation from classical statistical mechanics which leads to an entropy expression for the ideal gas that is not extensive. The expectation that entropy is extensive amounts to saying that one expects to see that the entropy of a system doubles when the system itself doubles in size (keeping all other things equal). Since the ideal gas is the standard textbook example of a nontrivial collection of matter perfectly designed for understanding thermodynamics finding a result that flies in the face of this expectation casts doubt on the underpinnings of statistical physics. The usual way that this doubt is remedied is to patch up the classical analysis by appealing to quantum mechanics and the indistinguishability of particles. The concept of indistinguishability among the particles is, of course, lies at the heart of the Fermi-Dirac and the Bose-Einstein statistics for fermions and boson, respectively. The idea basically being that there are no ways of labeling, of painting, of hanging a number on individual particles and, therefore, that our basic ignorance must be included in the way we use in statistical mechanics.
Specifically, the classical analysis of an ideal gas made of distinguishable particles (using what Swendsen calls the traditional definition of entropy) leads to the following expression for the entropy (‘CD’ = classical, distinguishable)
\[ S_{CD} = k N \left[ \ln V + \frac{3}{2} \ln \frac{E}{N} + X \right] \; , \]
where $$X$$ is some constant. The objection is that expression is not extensive due to the $$\ln V$$ term in brackets. For example, scaling the system by some overall factor $$\alpha$$ ($$N \rightarrow \alpha N$$, $$E \rightarrow \alpha E$$, and $$V \rightarrow \alpha V$$ gives an entropy of
\[ S_{CD,\alpha} = k \alpha N \left[ \ln ( \alpha V) + \frac{3}{2} \ln \frac{E}{N} + X \right] \; , \]
which simplifies to
\[ S_{CD,\alpha} = \alpha S_{CD} + k N \alpha \ln \alpha \; . \]
On the surface, the lack of extensivity might not seem alarming but consider the following composite system comprised of two tanks of an identical gas placed side-by-side. Each collection has the same density and average energy per particle and each has the same volume. Further suppose that there is a sliding panel at the interface between the tanks. By removing the partition, the tank size now doubles (i.e. $$\alpha = 2$$) and the entropy change is
\[S_{CD,new} – S_{CD,old} = 2 S_{CD} + 2\ln 2 k N – 2 S_{CD} = 2 \ln 2 k N \; . \]
At this point, Gibbs notes that something is quite wrong. The removal of the partition is a reversible process (since the gas is thermodynamically the same on both sides the presence or absence of the partition shouldn’t make a difference), meaning that the entropy should not increase at all.
The remedy found in most textbooks (e.g. Fundamentals of Statistical and Thermal Physics by Reif from which the following quoted expressions come) starts by arguing that when we remove the partition and allow the gas molecules in one tank to mix with those in another we are implicitly assuming them “individually distinguishable, as though interchanging the positions of two like molecules would lead to a physically distinct state of the gas.” The argument concludes by directing us to correct for the overcounting that “taking classical mechanics too seriously” has foisted upon us. The correction for over-counting involves dividing a term earlier in the derivation (the partition function) by $$N!$$, which corrects the entropy (now adapted to indistinguishable particles hence the change from ‘D’ to ‘I’) to read
\[ S_{CI} = k N \left[ \ln \frac{V}{N} + \frac{3}{2} \ln \frac{E}{N} + X’ \right] \; , \]
which is obviously extensive with the equally obvious implication that the problem is solved and nothing more needed to be done.
Here the story seems to have staled for some long period of time (decades), most likely due to the belief that quantum mechanics was the correct viewpoint (or at least more correct) for the world at large. It seems to have been only fairly recent that a revived interest in putting classical statistical mechanics on firmer footing arose. The result of this new effort has been the rediscovery of an old definition of entropy that Swendsen, who has been championing this viewpoint for nearly two decade, argues leads to more sensible results than a simple reflexive appeal to quantum mechanics. And his most compelling argument to support this revived viewpoint is a substance that is likely to surprise: simple homogenized milk. However, that story, in all its glory, will have to wait until next month’s column.
The subject matter over the last few months has touched upon thermodynamics in a variety of guises. For example, the concept of enthalpy and isentropic flow has played a key role in compressible fluid flow. In the posts discussing the Maxwell relations, the thermodynamics square and the classic relationships between second order partial derivatives were the main tools used to eliminate pesky terms involving the entropy in favor of quantities easier to measure in the lab.
It seems that it is now prudent to put down a few notions about entropy itself. No other physical quantity, with the possible exception of energy, is as ubiquitously used as entropy and none is as poorly understood as entropy. Indeed, in his 2011 article entitled How physicists disagree on the meaning of entropy, Robert Swendsen starts with the quotation from von Neuman “nobody understands entropy”. Chemists use entropy to determine the direction of chemical reactions, physicists use it when looking at matter in motion (e.g. compressible gas within a cylinder), electrical engineers use it when characterizing information loss on channel, the amount software can compress an depends on its entropy, and so on.
Entropy seems to be a Swiss army knife concept with lots of different built-in gadgets that can be pulled out and used on a moment’s notice. It’s no wonder that such multi-faceted idea is not only poorly understood but also gives rise to radically contradictory notions. For example, Swendsen starts his article with the following list of 18 properties that he has seen or heard attributed to entropy:
The theory of probability has nothing to do with statistical mechanics.
The theory of probability is the basis of statistical mechanics.
The entropy of an ideal classical gas of distinguishable particles is not extensive.
The entropy of an ideal classical gas of distinguishable particles is extensive.
The properties of macroscopic classical systems with distinguishable and indistinguishable particles are different.
The properties of macroscopic classical systems with distinguishable and indistinguishable particles are the same.
The entropy of a classical ideal gas of distinguishable particles is not additive.
The entropy of a classical ideal gas of distinguishable particles is additive.
Boltzmann defined the entropy of a classical system by the logarithm of a volume in phase space.
Boltzmann did not define the entropy by the logarithm of a volume in phase space.
The symbol W in the equation S=k log W, which is inscribed on Boltzmann’s tombstone, refers to a volume in phase space.
The symbol W in the equation S=k log W, which is inscribed on Boltzmann’s tombstone, refers to the German word “Wahrscheinlichkeit” (probability).
The entropy should be defined in terms of the properties of an isolated system
The entropy should be defined in terms of the properties of a composite system.
Thermodynamics is only valid in the “thermodynamic limit,” that is, in the limit of infinite system size.
Thermodynamics is valid for finite systems.
Extensivity is essential to thermodynamics.
Extensivity is not essential to thermodynamics.
This list, which is really a list of 9 pairs of contradictory statements about entropy, goes out of its way to show just how many diverging ideas scientists have about entropy. And since it is trendy to have one’s own pet idea(s) about this fundamental concept, it seems about time, that I get my own and that it is the aim of this blog and the ones that follow. As a warm up to a deeper dive, I decided to return to the basic ideas introduced in Halliday and Resnick physics.
The most intriguing aspect of the textbook discussion of entropy is that it is a state variable, that is to say, its value depends only on what the system is doing at any given time and not how the system got there. This is a key concept because it means that we are relieved in trying to find the particular path through which the system evolved.
What is particularly remarkable about this discovery is that it came about in the 19th century. This was the time in which the idea of smooth distributions of matter held the day. When the primary concept was that of a field, continuous in every way. A time well before the concept of discrete, microscopic states emerged from an understanding of the quantum mechanics of atoms, molecules, and other substances.
The thermodynamic relationship for entropy reads
\[ S_f – S_i = \int_{i}^{f} \frac{dQ}{T} \; , \]
where any path connecting the initial state (denoted by $$i$$) with the final state (denoted by $$f$$) will do. Nowhere in this definition can one find any clear signpost to indicate lumpy matter or the concept of the discrete. In addition, nothing in this definition even hints at a particular substance or class of them; nor is a particular phase of matter required. A breathtaking sweep of generality is hidden behind a few simple glyphs on a page.
As an example of the universality of the fundamental statement consider a familiar household system, say a glass of milk. If we do something prosaic like warm it by 10 degrees Celsius we arrive at the same entropy change as we would have if we had boiled the milk off into a vapor, melted the glass down, reconstituted the latter and recondensed the former. No matter what bizarre journey we subject a material to, the resulting change in entropy will simply depend on the initial and final configurations and not on the details connecting one to the other.
The usual playground for first thinking about entropy is the ideal gas and the usual example given the student is the computation of the entropy change of the free expansion of a gas. The context of this discussion usually follows upon the heels of an introduction to the kinetic theory of gases – a theory that presupposes the existence of atoms. The free expansion of gas is, perhaps, the most radical of all irreversible processes. There is no orderly flow, the very concept of a continuum fails to apply; every atom goes its own way and no macroscopic evolution of thermodynamic state can even be imagined.
And yet, almost blithely, textbooks argue the ease at which the entropy change in such a process can calculated. The argument goes as follows. From the kinetic theory of gases, one can show that during a free expansion, the internal energy does not change. The reason for this is that the gas does no work (that is what ‘free’ really means) and the process happens fast enough that no heat is transferred in or out. Since the change in internal energy is given by
\[ \Delta U = n C_V \Delta T \; \]
any ideal gas process that doesn’t change the internal energy also leaves the temperature unchanged. The matching thermodynamic process, where reversibility and equilibrium are maintained at all times is the isothermal expansion.
The first law
\[ dU = dQ – dW \; \]
can be specialized to any reversible ideal gas process, to yield
\[ n C_V dT = dQ – p dV = dQ – \frac{n R T}{V} dV \; .\]
Solving for $$dQ/T$$ gives
\[ \frac{dQ}{T} = n R \frac{dV}{V} + n C_V \frac{dT}{T} \; .\]
Integrating both sides from the initial to final state gives
\[ S_f – S_I = \int_i^{f} \frac{dQ}{T} = n R \ln \left( \frac{V_f}{V_i} \right) + n C_V \ln \left( \frac{T_f}{T_i} \right) \; .\]
This simplifies for an isothermal process to be
\[ S_f – S_i = n R \ln \left( \frac{V_f}{V_i} \right) \; .\]
So, the change in entropy for a free expansion must be exactly equal to the expression above even though, as the free expansion occurs, there is a complete absence of anything resemble a volume. This is a subtle result that gets only more subtle when one reflects on the fact that statistical mechanics wasn’t available when the concept of entropy first appeared.
It is for this reason that the next several blogs will be looking at entropy.
Last month’s column introduced the notion of the thermodynamic square as a mnemonic for organizing certain second-order partial derivatives amongst the various thermodynamic potentials: the internal energy $$U$$, the Gibbs and Helmholtz free energies $$G$$ and $$F$$, and the enthalpy $$H$$. As previously alluded to, physicist primarily use these relations (called the Maxwell Relations) to eliminate the terms difficult or impossible to measure experimentally in favor of parameters that are easily measured in the lab.
A practical example of the application of the Maxwell relations is the simplification of the ‘first’ and ‘second $$T dS$$ equations’ as listed in Exercise 7.3-1 on page 189 of Herbert B. Callen’s book Thermodynamics and an Introduction to Thermostatistics, 2nd edition. The relevant physical properties in these equations are (Sec. 3.9 of Callen):
the number of particles $$N$$,
the differential heat $$dQ = T dS$$,
the heat capacity at constant volume $$c_V = \frac{T}{N} \left( \frac{\partial S }{\partial T} \right)_V= \frac{1}{N} \left(\frac{\partial Q }{\partial T}\right)_{V}$$,
the heat capacity at constant pressure $$c_P = \frac{T}{N} \left( \frac{\partial S }{\partial T} \right)_P = \frac{1}{N}\left(\frac{\partial Q}{\partial T}\right)_{P}$$,
the coefficient of thermal expansion $$\alpha = \frac{1}{V} \left(\frac{\partial V}{\partial T}\right)_P $$, and
\[ T dS = N c_V dT + \frac{T \alpha}{\kappa_T} dV \; .\]
From the form of this equation, assume that the quantity in question is the entropy as a function of the temperature and volume $$S = S(T,V)$$. Taking the first differential gives
Multiplying each side by $$T$$ gets us to the final form of the first $$T dS$$ equation
\[ T dS = N c_V dT + \left(\frac{T \alpha}{\kappa_T} \right) dV \; .\]
Second $$TdS$$ Relation
The second relation is
\[ T dS = N c_P dT – T V \alpha dP \; . \]
From the form of this equation, assume that the quantity in question is the entropy as a function of the temperature and pressure $$S = S(T,P)$$. As in the first $$T dS$$ relation, taking the first differential gives
Multiplying the second term by $$V/V$$ and simplifying gives
\[ dS = \frac{N c_P}{T} dT – V \alpha dP \; ,\]
which becomes the desired relation when multiplying both sides by $$T$$
\[ T dS = N c_P dT – T V \alpha dP \; .\]
To summarize, these two relations show how to express the heat $$T dS$$, expressed in terms of the entropy (which cannot be measured) in terms of parameters, such as temperature, pressure, and heat capacity, that are easily measured in the lab. All that is needed is the machinery of partial derivatives. This observation is the reason that so many textbooks on Thermodynamics have specific sections devoted to these approaches.
Last month’s installment presented a clean derivation of the classic relations between partial derivatives and showed a simple example of how they work in the concrete. As nice as that presentation is, the real power of these relations is only realized when dealing with systems with a large number of variables in play and in which various manipulations are required to extract meaning from the systems involved. The prototypical example is classical thermodynamics.
The fundamental concept in thermodynamics is the existence of a thermodynamic potential, which is a scalar function that encodes the state of the thermodynamic system in terms of the measurable quantities that describe the system, such as volume or temperature. Changes in the values, these independent physical variables (sometimes called the natural variables), relate directly to the potential of the corresponding partial derivatives.
The textbook example of this type of relation is defined in the first law of thermodynamics, which asserts that there exists a function, called the internal energy $$U$$, that is a function of the entropy $$S$$, the volume $$V$$, and the number of particles $$N$$ making up the physical system being modeled (assuming a single type of substance; generalizations to multiple species is straightforward but cumbersome). Changes in the internal energy $$U$$ can be calculated by
\[ dU = T dS – P dV + \mu dN \; ,\]
where the temperature, pressure and chemical potential are defined as
Without dwelling on the theory, suffice it to stay that laboratory conditions vary and there are many circumstances where it is preferable to work with a different set of independent variables. For example, heating water on a stove top in an uncovered pan is better understood in terms of fixed pressure rather than fixed volume.
Thermodynamics supplies an approach for dealing with these cases using the Legendre transformation. In the stove-top experiment mentioned above, the appropriate potential is called the enthalpy, defined as
\[ H = U + PV \; . \]
Taking the first differential gives
\[ dH = dU + P dV + V dP \\ = T dS – P dV + \mu dN + P dV + V dP \\ = T dS + V dP + \mu dN \; , \]
which demonstrates that $$H = H(S,V,N)$$.
Assuming that the order of differentiation can be exchanged, there are several relationships that exist (called Maxwell relations) between various partial derivatives. For example:
Obviously, there is a lot of notational overhead in the above relation. For the sake of this analysis, we will make two simplifications to improve the clarity. First, we will assume a single species with a fixed number of moles. This assumption removes the need to carry $$N$$ and $$\mu$$. Second, we will forego keeping track of the other variables being held constant. Since we will be tacitly tracking which thermodynamic potential is being used, there is little chance of confusion.
The primary purpose the Maxwell relations serve is to eliminate terms involving the entropy in favor of physical parameters that can be experimentally measured, such as temperature, volume, or pressure.
A useful mnemonic exists for looking up the various relations without scanning through a table. It’s called the thermodynamic square, and it’s constructed as below
The 4 most important thermodynamic potentials, the Helmholtz free energy $$F = U – TS$$, the Gibbs free energy $$G = U + PV – TS$$, the enthalpy $$H = U + PV$$, and the internal energy $$U$$, are arranged along the edges starting up at the top and going clockwise. The thermodynamic variables – the temperature $$T$$, the pressure $$P$$, the entropy $$S$$, and the volume $$V$$ – are arranged at the corners, starting just after $$F$$ and also going clockwise. The Maxwell relations relate a partial derivative expressed in terms of three consecutive corners (shaded blue below) to the partial derivative expressed in terms another three consecutive corners (shaded yellow). The arrows lying along the diagonal set the sign of the partial derivative based on which variable is in the numerator: those with the arrowhead positive and those without negative.
These rules are far easier to understand with the mixed partial derivatives of $$U$$ discussed above.
The blue shaded region reads counterclockwise while the yellow region reads clockwise. These orientations follow from the overlap they share on the left-hand side of the square (the one labeled $$U$$). The signs are determined by the arrows. Since the $$T$$ corner is the numerator and it has an arrowhead, the partial derivative is positive. Likewise, since the $$P$$ corner is the numerator and it lacks an arrowhead, the partial derivative is negative.
Once the basic operations using the square are understood, it is easier to present a single square with the common side being both shaded in blue and yellow, resulting in green. An example for the Maxwell relations coming from the Helmholtz free energy $$F$$ being
With these tools, we can get to the meatier topics, namely using a combination of the classical rules for partial derivatives and the Maxwell relations, as presented in the thermodynamic square, to eliminate the entropy in favor of physically measurable quantities. But this will be the topic for next month’s post.
Partial derivatives are an important mathematical tool in a number of physics disciplines, most notably field theories (e.g. electricity & magnetism and general relativity) and in thermodynamics.
However, working with partial derivatives are always a bit tricky and teaching students about them is usually fraught with difficulties. So it was to my pleasant surprise that I found a really nice discussion of how to derive the various ‘classic’ rules cleanly presented in Classical and Statistical Thermodynamics by Ashley H. Carter.
My presentation here is strongly influenced and closely follows her presentation in Appendix A, although I’ve added on a bit in the theoretical flow and I’ve also provided explicit examples in terms of the standard paraboloid found in freshman calculus.
Assume a function of 3 variables can be expressed as $$f(x,y,z) = 0$$. This equation can be viewed as a constrain equation linking the values of the variables such that two variables are independent. That means that we can (at least locally) solve for:
$$x(y,z) = 0$$
$$y(x,z) = 0$$
$$z(x,y) = 0$$
Focus on the first and second forms (other pairings will follow a simple relabeling of the variables). The corresponding differentials are
Let’s take a look at these relationships in action. Consider the implicit definition of the paraboloid
\[ x^2 + y^2 – z = 0 \; . \]
As mentioned earlier, this equation can be considered as a constraint equation that selects out a value for any one of the three variables given the other two. In other words, we can imagine a look up table where we select a value of $$x$$ and $$y$$, we rummage through the table to find a row with both values and then we scan to the right to find the allowed value of $$z$$ that makes it satisfy the implicit equation.
How do you construct this table; not at a finite set of points but functionally so that it works at any point? It is natural and easy to determine $$z$$ given $$x$$ and $$y$$ by simply rewriting the implicit equation as
\[ z(x,y) = x^2 + y^2 \; .\]
However, it isn’t as easy to express $$x$$ or $$y$$ as functions of the remaining two variables because of the two possible signs that result from taking the square root. We need to have four functional relationships
depending on the particular combination of whether $$x$$ is positive or negative and whether $$y$$ is also positive or negative. In the language of differential geometry, we have a 5 charts in our atlas.
We are now in position to try the various relations derived above. For example, let’s examine the reciprocal relation in the first quadrant of the $$x$$-$$y$$ plane. We need to use $$x_p$$ as our local chart.
where there is no need for the $$z$$-chart to distinguish between positive and negative values of $$x$$. As expected the derivatives are reciprocals of each other.
Next, let’s test the fraction rule. For fun, this time let’s test it in the 2nd quadrant in the $$x$$-$$y$$ plane ($$x < 0$$ and $$y > 0$$). Calculating the partial derivatives on the left-hand side yields
Finally, for the cyclic rule, let’s go into the 4th quadrant in the $$x$$-$$y$$ plane ($$x>0$$ and $$y<0$$). Taking each partial derivative in turns yields
In this final post on compressible fluid flow, we will take a look at an application of the machinery developed over the previous three posts to the converging-diverging nozzle, often called a rocket nozzle or a de Laval nozzle. The setup in straightforward even though it is probably unfamiliar. We imagine a reservoir containing a gas at a high pressure and, not often, high temperature that serves to supply the flow through the nozzle. By convention, the thermodynamic state variables in the reservoir are given a ‘0’ subscript and are called the stagnant conditions as there is no flow within the reservoir itself. This reservoir feeds into a converging section of a nozzle in which the cross-sectional area decreases steadily until a minimum occurs at what is called the throat of the nozzle. After the throat, the cross-sectional area increases again until the nozzle ends at the exit. The nozzle and reservoir are placed into a larger pressure vessel (sometimes called the receiver) where the pressure outside of the exit, called by convention the back pressure, $P_b$.
Initially the two pressures are equal and there is no flow from the reservoir through the nozzle. As the back pressure is dropped, flow develops from the reservoir. de Laval’s innovation was to realize that if the flow can be brought to sonic conditions (i.e., Mach number $M=1$) at the throat then the diverging section would further speed up the flow to supersonic speeds (see the discussion at the end of the second post of this series).
The goal of this post is to discuss the flow profiles along the length of the nozzle, from inlet at the reservoir, to exit into the pressure vessel, as a function of the ratio $P_b/P_0$ and to give a flavor of how the previous equations are used to quantitatively. Despite the relative simplicity of the system (reservoir, nozzle, and pressure vessel) a rich set of flow patterns result. Qualitatively, these fall into two broad classes with several variations within them.
In the first class (shown in blue traces in the figure below), the flow is everywhere isentropic from the reservoir. through the nozzle, and into the pressure vessel. Included in this class is the flat trace where $P_b/P_0 = 1$ where no flow results. As $P_b/P_0$ is lowered, flow commences with the speed of the flow increasing as it approaches the throat from the converging section and then subsequently slowing down in the diverging section. The maximum speed in the nozzle (which for this class is always at the throat) continues to increase until as $P_b/P_0$ is lowered until a critical value of the back pressure, $P_{b_s}$ when the flow is sonic (i.e., $M=1$) in the throat but still subsonic everywhere else in the nozzle (including the diverging section).
At this point, lowering the $P_b/P_0$ ratio further develops the second class of flow (shown in red traces in the figure below) where some portion of the flow in the diverging section is supersonic. A shock develops somewhere downstream of the throat in order to decelerate the flow back to subsonic conditions so that it can match boundary conditions with the environment in the pressure vessel. The only remaining question is precisely where the shock is found. Five possible options are available: 1) the shock is found in the nozzle between the throat and the exit, 2) the shock falls at the exit, 3) the shock is beyond the nozzle but the exit pressure $P_e < P_b$, 4) the shock is beyond the nozzle and $P_e = P_b$, and 5) the shock is beyond the nozzle but $P_e > P_b$. Options 3), 4), and 5) are called over-expanded, perfectly-expanded, and under-expanded flows, respectively (see discussion of The Converging-Diverging Nozzle applet).
In the third post of this series, we derived expressions relating the pressure, density, and temperature anywhere in an isentropic portion of the flow to the stagnation properties in the reservoir. The relations derived were:
that specified what the ratio of the local area, $A$, to the area of the throat, $A^*$, must be to achieve a target value of Mach number $M$. A typical problem where these equations are useful comes from Fluid Mechanics Demystified by Merle Potter and reads
Air flows through a converging-diverging nozzle attached to a reservoir maintained at 400 kPa absolute and 20$^{\circ}$C to a receiver. If the throat and exit diameters are 10 and 24 cm, respectively, what is the receiver pressure that will just result in supersonic flow throughout the diverging portion of the nozzle.
The solution starts with recognizing that if the flow in the diverging portion of the nozzle is to be supersonic then choked conditions occurs at the throat and, as a result, the throat area coincides with the critical area $A_{throat} = A^*$. The area ratio of the exit to the throat is then $\frac{A}{A^*} = \left( \frac{24}{10} \right)^2=5.76$. Next we have to invert the AMR to find the value of $M$ that corresponds to this ratio. A bisection, specifically adapted to the two possible dynamical behaviors: subsonic and supersonic, was written in python. The resulting value was $M=3.3244$ was then plugged into the $P_0/P$ relation and the reciprocal taken to arrive at the exit pressure being $P_{exit} = 6746.659 \, Pa$, corresponding to an exit pressure only about $1.6%$ as large as the stagnant pressure.
The possibility of a shock in the possible flows requires us to add three new relations to our collection. Our starting point for deriving the so-called jump conditions across the shock are the three basic fluid equations for mass, momentum, and energy, derived in the first post, but simplified by the tacit assumption that the shock is negligibly thick so that the cross-sectional area is the same on both sides of the shock, giving:
respectively. Note that the subscripts `u’ and `d’ stand for upstream and downstream, respectively.
As before, our thermodynamics will assume the fluid to be an ideal gas with the equation of state given by $P/\rho = R T$. The general form of enthalpy $h = e + P/\rho$ takes the simple form $h = (\gamma/\gamma-1) P/\rho$. The state variables relate to their values at different parts of the flow via
The speed of sound in the gas, which is temperature dependent, takes on the forms
\[ c = \sqrt{\gamma R T } = \sqrt{\frac{\gamma P}{\rho}} = \sqrt{(\gamma-1) h} \; , \]
each useful in context.
Finally, the energy equation, which had been relegated to a by-stander role in incompressible fluid flow, offers two very useful relations. The first, which will be termed the stagnant enthalpy expression (SEE), expresses the stagnant enthalpy in terms of the local sound speed via $(\gamma -1) h = c^2$ giving
One caution when using these relations. The reservoir is operational defined as the location where the flow is isentropically brought to a stop. Since a shock produces a great deal of entropy for any fluid element crossing from one side to another, the downstream thermodynamic conditions for a reservoir will be different from the actual reservoir attached to the nozzle and care must be taken not to confuse the notional one with the actual physical one.
To derive the normal shock relations, we follow these notes.
Begin by dividing the momentum equation by the mass continuity equation to get
Next, employ a neat trick by writing the numerator on the left-hand side as ${h_0}^2 (\gamma-1)^2 = h_{0u} (\gamma-1) h_{0d} (\gamma – 1) $. Use the SEE to express each of these expressions in terms of the local sound speed and Mach number. Doing so yields
Solving for $M_d$ is relatively painless with the substitutions $L = (\gamma-1)/2$ and $Q = (\gamma +1)/2$. These auxiliary variables keep the clutter down and the observation that $L^2 – Q^2 = -\gamma$ simplifies things enormously so that we arrive at
Earlier in the derivation of the Mach jump relations we found that $1/V_u V_d = (\gamma+1)/2 h_0(\gamma-1)$. Substituting these expressions back into the density equation yields
Using the already obtained expression for the density ratio (and noting to flip it based on which density is in the numerator) followed with some simplifications gives
We are now in a position to solve another typical problem associated with converging-diverging nozzle design, again taken from Merle Potter, that reads
Air flows from a reservoir through a nozzle into a receiver. The reservoir is maintained at $400 kPa$ absolute and $20{}^\circ C$. The nozzle has a 10-cm-diameter throat and a 20-cm-diameter exit. What is the back pressure that locates the shock wave at the exit?
Since the shock is at the exit, we can assume that the upstream side of the shock is supersonic at the area of the exit. So, the value of $A/A* = 4$. Using the inverse AMR function, the upstream Mach number is $M_u = 2.940$. Then using the standard isentropic relations the pressure ratio is $P_u/P_0 = 0.0298$ resulting in an upstream pressure of $P_u = 11,914.79 Pa$. Finally, the Mach shock jump relationship yields $P_d/P_u = 9.919$ for a downstream pressure, which is equal to the receiver pressure, of $P_d = 118179.93 Pa$.
Of course, this analysis just barely scratches the surface but these basic relations demonstrate the interplay between three basic laws of fluid mechanics: continuity, momentum, and energy and how they contribute to the practical construction of a converging-diverging nozzle. And, so, I guess this is rocket science.
In this installment we derive a central result in compressible fluid flow showing the inner working of the converging-diverging nozzle. The key relations are the jump conditions are the mass conservation equation
As a reminder, the enthalpy is defined in terms of the specific internal energy $e$ by $h = e + P/\rho$. Correspondingly, the first law of thermodynamics (as usually expressed in terms of the specific internal energy)
\[ de = T ds + \frac{P}{\rho^2} d\rho \]
becomes
\[ dh = T ds + \frac{dP}{\rho} \; .\]
The final set of equations come from the specific fluid that is flowing. For simplicity, we will deal with compressible gas flow and will take the gas to be ideal. The equation of state for an ideal gas is
\[ \frac{P}{\rho} = RT \]
with the usual relations between the heat capacity at constant pressure $c_P$ and the heat capacity at constant volume $c_V$ of
\[ c_P – c_V = R \; \]
and
\[ c_P/c_V = \gamma \; , \]
where $\gamma$ is a constant usually taken to have the value of 1.4 for ordinary air.
For an ideal gas, the specific enthalpy (like the specific energy) is strictly a function of temperature given by
\[ dh = c_P dT \; , \]
where we will often assume that $c_P$ is constant over a wide range of conditions; an assumption that allows us to integrate to $h = c_P T$ immediately. In other words, we assume the gas is a calorically perfect ideal gas – this is actually a reasonably good assumption given that $c_P$ for nitrogen varies only about 1.5
The speed of sound in the ideal gas is also only a function of temperature given by
\[ c = \sqrt{ \gamma R T } \; .\]
The final assumption is that the flow is isentropic, which is a good assumption since the flow happens quickly so that a negligible amount of heat flows into the system. Under this assumption, the equation of state can be substituted into the first law to yield
\[ c_P dT = \frac{dP}{\rho} \; .\]
The next step is to eliminating the density by way of the ideal gas law to get an equation in terms of pressure and temperature
\[ c_P dT = \frac{dP}{P/RT} \; . \]
Re-arranging gives a simple set of differential equations
The value of this latter equation is that it allows the elimination of temperature (simply equation both forms of $T_1/T_2$ and the emergence of the polytropic equation
relating pressure and density for an isentropic flow.
With these assumptions and corresponding relations in hand, we now use them to relate the conditions from the inlet of the gas from a reservoir (e.g. a fuel tank) to the outlet of the nozzle. The rocket engine will be the prototype for this situation. We need to be able to relate the thermodynamics at each point in the flow to the thermodynamics in the reservoir. Since the gas in the reservoir is not moving with respect to the nozzle we introduce the concept of stagnation, in which the flow is envisioned to have come to a stop and the only energy present being stored as internal energy. The third jump condition relating enthalpy and bulk flow velocity at different points will be important.
Since there is a qualitative change between subsonic and supersonic flow (see last post’s discussion of how the area is related to Mach number), we will need to stitch together the two flows (stagnant-to-sonic with sonic-to-supersonic) at the critical point where $M = 1$. Variables associated with this point are called critical and are decorated with a star (e.g. $A^*, P^*$ and so on). In addition, we will decorate all variables associated with the reservoir where the flow is stagnant with a 0 subscript (e.g. $A_0, P_0$ and so on).
Let’s start on the subsonic side by relating the thermodynamics in the tank to the corresponding variables in the flow as it moves in the converging portion of the nozzle. Since the flow is stagnant in the tank, we find that the stagnation enthalpy $h_0$ relates to the flow anywhere else in the nozzle by
\[ h_0 = h_1 + \frac{V_1^2}{2} \; . \]
Since the gas is calorically perfect, the enthalpy can be eliminated in favor of the temperatures to arrive at
\[ c_P T_0 = c_P T_1 + \frac{V_1^2}{2} \; .\]
Dividing by $c_P T_1$ and using the fact that $T_1 = {c_1}^2/\gamma R$ gives
In this last relation, the ratio of the flow velocity to the speed of sound is the Mach number. Dropping the ‘1’ subscript and using the relations between $c_P$, $c_V$, and $R$, we arrive at what we will call the stagnation temperature relation
Return to the mass flow equation and, first eliminate the density using the equation of state and multiply by $c/c$, then express the sound speed in terms of the temperature to get
\[ {\dot m} = \rho A V = \frac{P}{R T} A \frac{V}{c} c = P A M \frac{c}{RT} = P A M \sqrt{ \frac{\gamma}{R T} } \; .\]
Next, solve the stagnation pressure equation for $P$
\[ P = P_0 \left( \frac{T_0}{T} \right)^{\frac{\gamma}{1 – \gamma}} \]
and then substitute into the mass flow equation
\[ {\dot m} = P_0 \left( \frac{T_0}{T} \right)^{\frac{\gamma}{1 – \gamma}} A M \sqrt{ \frac{\gamma}{R T}} \left( \frac{T_0}{T_0} \right)^{1/2} \\ = P_0 \sqrt{\frac{\gamma}{R T_0}} \left(\frac{T_0}{T}\right)^{\frac{\gamma}{1-\gamma}+\frac{1}{2}} A M \; .\]
Simplifying and using the stagnation temperature equation gives
\[ {\dot m} = P_0 \sqrt{\frac{\gamma}{RT_0}} A M \left[ 1 + \frac{\gamma-1}{2} M^2 \right]^{\frac{\gamma+1}{2(1-\gamma)}} \; .\]
This combination is constant no matter where in the flow it is evaluated. Equate the expression evaluated at the critical point to the expression anywhere else in the flow to get
Eliminating the terms common to both sides and rearranging we can express the cross-sectional area at any point in the nozzle to the point where the flow goes critical as
This is the well-known relation that forms the basis for designing and analyzing the nozzle flow. It will be the basis for our final post on compressible flow next month.
This month’s column, the second in a series of three on compressible flow, derives the key relationships for understanding steady, isentropic flow in a converging-diverging nozzle. The starting point of these derivations are the three isentropic jump conditions derived in the last post:
along with the first law of thermodynamics (cast in intensive variables by dividing both sides of $dE = TdS – P dV$ by mass $m = \rho V$)
\[ de = T ds + \frac{P}{\rho^2} d \rho \; ,\]
and the equation of state for an ideal gas (also in intensive variables)
\[ \frac{P}{\rho} = R T \; . \]
The $T ds$ term can be dropped since isentropic flow means that the specific entropy remains constant. Note that the specific internal energy and specific enthalpy ($h = e + P/\rho$) are simply functions of temperature given by $de = c_{{\mathcal V}} dT$ and $dh = c_P dT$, respectively, where $c_{{\mathcal V}}$ and $c_P$ are the heat capacities at constant volume and constant pressure and are taken to be constants. Other thermodynamic relations will be taken as given since proof will take us too far afield.
There are three ingredients in understanding the steady, isentropic flow through a converging-diverging nozzle (also known as a de Laval nozzle): 1) calculating the Mach number, 2) relating the cross-sectional area of the nozzle ($A$) to the Mach number, and 3) relating the thermodynamics variables of temperature ($T$), the pressure ($P$) and the density ($\rho$) to the Mach number. This post will deal with items 1 and 2 with item 3 being covered in the next post.
This post and the next are a synthesis and clarification of the ideas and materials found in Chapter 9 of Merle Potter’s Fluid Mechanics Demystified and the 5-part series of YouTube lectures on compressible fluid flow from the University of Florida (part 1, part 2, part 3, part 4, and part 5)
Calculating the Mach Number
The central parameter in the theory is the Mach number, which is innocently defined as the ratio of the flow speed to the speed of sound. What makes this definition so deceptively simple looking is we are used to thinking that the speed of sound is constant since the temperature range that we normally encounter is such that the variations in the speed of sound is negligible. However, interesting compressible fluid flows often have very large variations in temperature over short durations or small distances and so Mach number varies depending on the location of the flow within the nozzle.
To calculate the speed of sound, which we will denote as $c$, we take the first differential of the continuity and momentum equations and since we are interested in the local speed over a column of fluid with constant cross section we can ignore variations in the area (imagine being outside). The resulting equations are:
\[ d \rho c + \rho d c = 0 \; \]
and
\[ d\rho c^2 + 2 c \rho dc + dP = 0 \; . \]
Solving the first equation for $\rho dc = – c d \rho$, substituting this result into the second, and solving for $c^2$ gives
Substituting this result back into the first equation and taking the square root gives
\[ c = \sqrt{ \frac{\gamma P }{\rho} } = \sqrt{\gamma R T} \; , \]
where the ideal gas law was used in the last step.
The Mach number is the ratio of the flow speed to the speed of sound and is given by
\[ M = \frac{V}{c} \; . \]
Relating Cross-Sectional Area and the Mach Number
Most of us have had the experience with running water where we restrict the cross-sectional area of the outlet and watch the fluid flow increase (a thumb over the end of a garden hose being the usual scenario). The reason for this speed increase is that the pressure difference between the inlet and the outlet sets up a given mass flow rate. When the area drops, the flow speed has to increase to maintain that flow rate.
This approach works for flows in most everyday experiences but fails for compressible flow, explaining why a simple converging nozzle is insufficient to force a fluid into supersonic flow.
To see why this is we will derive a relationship between the cross-sectional area and the Mach number.
Start by taking the first differential of the third jump condition
\[ d \left( h + \frac{V^2}{2} \right) = dh + V dV = 0 \; .\]
Next, eliminate the differential of the enthalpy using the first law ($dh = dP/\rho$) to get
\[ \frac{dP}{\rho} + V dV = 0 \; .\]
Multiply the first term by $d\rho/d\rho$ to get
\[ \frac{dP d\rho}{\rho d\rho} + VdV = 0 \; .\]
Recognizing that $c^2 = dP/d\rho$ and dividing both sides by $V^2$ gives
When $M > 1$ the flow slows down (speeds up) when the area decreases (increases) When $M < 1$ the flow speeds up (slows down) when the area decreases (increases) When $M = 1$ the flow remains at the same speed even as the area changes
These observations explain why a simple converging nozzle can’t force the flow to supersonic speeds. Once the pressure difference between the inlet and outlet is large enough that the flow speed equals the speed of sound ($M=1$), the flow is choked and can get no faster. Practitioners usually speak of this situation is that choked flow can’t communicate a further pressure drop at the outlet upstream so that the flow can respond.
It is also worth pointing out something that is easy to overlook in the above manipulation. While the steps may seem haphazard and uninspired there is a method to the madness. There is a hierarchy of thermodynamic relations that are combined: the first law of thermodynamics is a universal law; the third jump condition represents energy conservation for a general fluid flow; and the equation of state for an ideal gas is a specific law for a very special kind of fluid. The first law links a fluid’s energy conservation with the speed of sound for an ideal fluid, linking flow velocity to Mach number and the compressibility of the fluid (as represented by $d\rho$). The final step uses another universal law – mass continuity – to arrive at a relationship between a fractional change in the flow speed to a fractional change in volume (as represented by $dA$).
Next post puts these pieces together with a set of relations between the fluid’s thermodynamic variables and the Mach number to explain the function of a converging-diverging nozzle and how it can push fluid flows past the speed of sound.
This month’s column briefly examines compressible fluid flow. This journey will be a short excursion into a rather complicated discipline with only two aims. The first is to give a flavor of how and why the energy equation, which has been essentially unused in previous analyses, plays a role and how additional thermodynamic information (spatial and temporal variations in density and temperature) comes into play. The second is to setup all the equations needed to understand the basic physics associated with that object that ushered in the space age: the rocket nozzle, which will be the subject of next month’s entry.
Following the usual introductory approaches (e.g. Eric R. Pardyjak’s online notes and Chapter 9 of Merle C. Potter’s Fluid Mechanics Demystified), we will look at only simplified geometries, such as the converging nozzle shown here
with a flow from left-to-right as indicated.
This analysis assumes that all of the flow variables are constant over each cross-section but can differ from cross-section to cross-section. The first condition means that the flow is effectively inviscid, since the boundary layer is ignorable for the vast majority of the flow, and it is steady. All of these simplifying assumptions result in algebraic flow equations that come from the integral forms of the fluid equations rather than the differential equations. In addition, we will ignore body forces (i.e. gravity) and only allow pressure-driven flows.
The conservation (i.e. Eulerian) form of the equations is slightly easier to work with and these will be our starting point for the various simplifications that we impose (although with one extra wrinkle in the case of energy). All of the derivations will involve some vector quantity (say the velocity $${\vec V}$$) being integrated over a surface after being projected onto the local surface normal. This process results in an average value of the normal component of the vector over the entire face. This quantity will be denoted simply as a scalar (e.g. $$V_1$$) with appropriate labeling indicating which segment of the bounding surface.
Since the flow is steady, the first term vanishes. If we imagine the surface as shown in the nozzle above, then only the flow through the endcaps ($${\mathcal S}_1$$ and $${\mathcal S}_2$$) is non-zero and
where $${\mathbf T}$$ is the Cauchy stress tensor. Following the same approach as above, and recalling that the body forces are zero (i.e. $${\mathbf T} = – P {\mathbf I}$$), the Cauchy momentum equation takes the form:
where we’ve used $${\hat n}_1 = – {\hat n}_2$$. Two things are worth noting about this equation. First, the direction of the flow must be along (either parallel or anti-parallel) to the end-caps, nicely in keeping with the assumption that the flow varies only from cross-section to cross-section and not within a cross-section. Second, the continuity equation can be used to eliminate many of the terms in favor of the constant mass flow rate $${\dot m}$$. Keeping all this in mind brings us to the scalar equation
Up to this point, we’ve not had to occasion to use the energy equation for the simple fact that in incompressible flows without explicit heat flows and generation, the internal energy of each fluid element remains constant; only the kinetic energy changed. Indeed, the energy equation for such a flow follows immediately by taking the dot product of the Cauchy momentum equation with the velocity. In these simple cases, the density is a given and only pressure and velocity are unknown. The four equations of continuity and 3 components of the Cauchy momentum equation sufficed to solve for the four unknowns.
Once we allow the flow to be compressible, the density becomes an unknown and the also the internal energy enters into the picture. The energy equation provides one more equation. The final equation comes from a thermodynamic equation of state. For this latter equation, we will assume the ideal gas law. Often, it is more convenient to switch from internal energy to temperature by using the ideal gas relation
\[ e = c_v T \]
and
Fourier’s law relating heat flow to temperature via
\[ {\vec q} = – k \nabla T \; .\]
There is an additional thermodynamic consideration (the one wrinkle mentioned at the beginning of this post). It is the introduction of the enthalpy $$h = e + P/\rho$$ that combines the internal energy with the pressure work. Its introduction is really a matter of convenience rather than an important insight but, as the majority of the discipline’s practioners uses it, it would be a mistake to omit.
To see how the energy equation admits its inclusion, start with the energy equation in its full glory
By the above assumptions, the volumetric heating and the heat flow are zero, the body forces are zero, the stress tensor simply accounts for the pressure, and the flow is steady. Under these conditions, the equation reduces to
This month’s column finishes up the study of elementary viscous flow and presents the final two examples, both dealing with shear-induced flow. This type of flow (called Couette flow) typically results from the no-slip condition in which a moving boundary drags the fluid that touches it into motion. That layer of the fluid then drags the fluid layer next to it and so on.
For both of these examples, we are going to ignore body forces and external pressure differences and focus on the boundary motion alone. These assumptions eliminate several terms from the incompressible Navier-Stokes equations leaving us with
augmented with the usual incompressibility assumption $$\nabla \cdot {\vec V} = 0 $$.
Cylindrical Couette Flow
In this example, we imagine a fluid trapped between two cylindrical shells, an inner and an outer shell, of radii $$R_{inner} \equiv R_{1}$$ and $$R_{outer} \equiv R_{2}$$, respectively.
For sake of generality, both shells will be allowed to rotate about the vertical axis (out of the page) with angular velocities $$\Omega_{inner} \equiv \Omega_{1}$$ and $$\Omega_{outer} \equiv \Omega_{2}$$. We seek to describe the velocity profile of the fluid in steady motion. With the radii and angular velocities assumed to be known there will be a fairly simple relationship between the velocity profile and the kinematic viscosity $$\nu$$. A viscometer uses this experimental setup to measure kinematic viscosity by tracking the torque required to keep the inner shell moving at a constant rate (the out shell is usually fixed).
The Navier-Stokes equations are best presented in cylindrical coordinates since these coordinates match the geometry involved. The added benefit is that expressing the derivatives in cylindrical coordinates is instructive in its own right.
The key point to focus on is that in cylindrical coordinates, the basis vectors in directions perpendicular to the $$z$$-axis change as a function of azimuthal angle $$\theta$$. The radial unit vector changes as
Note that the incompressibility condition is automatically satisfied by the form of the velocity field.
From the last equation the pressure cannot be a function of $$z$$ and since everything else in the second equation is only a function of $$r$$ so must $$\partial_{\theta} P = f(r)$$. Integrating gives
\[ P(r) = f(r) \theta + g(r) \; , \]
the form of which requires $$f(r) = 0$$ otherwise the pressure would be a multi-valued function. The second equation now becomes
which are easily obtained by applying the boundary conditions to the general relation $$V_{\theta} = r \Omega$$.
Once $$V_{\theta}$$ is known, the first equation gives the radial pressure gradient due to the rotation.
Linear Couette Flow
In this last example, we will solve the time varying Couette flow setup up between two plates separated by a distance $$w$$ and extending far in the $$x$$- and $$z$$-directions so that we can ignore the edge effects and model the flow as two-dimensional.
We imagine that the fluid is at rest prior to $$t=0$$ at which time the upper plate is set into motion with velocity $${\vec V} = U {\hat e}_x$$. There is a well-known steady solution in which the velocity linearly varies from zero on the lower plate to $$U$$ on the upper plate but it is interesting to see how the transient flow settles into this steady state.
By our earlier, assumptions, the flow is of the form (automatically satisfying the incompressibility condition)
\[ {\vec V} = V_x(t,y) {\hat e}_x \; , \]
which has to satisfy the following form of the Navier-Stokes equations
\[ \textrm{IC:} \;\;\;\;\;\;\;\; V_x(0,y) = 0 \;\;\;\;\; 0 \leq y \leq w \; , \]
respectively.
The solution strategy is to employ separation of variables. To that end, following Acheson, write the velocity as a sum of the steady solution and a time-varying piece where the latter has homogeneous boundary conditions
\[ V_x(t,y) = \frac{U}{w} y + {\tilde V}_x(t,y) = \frac{U}{w} y + f(t)g(y) \; . \]
After performing the separation of variables, we arrive at
\[ \frac{1}{\nu} \frac{1}{f} \partial_{t} f = – s_{n}^2 = \frac{1}{g} \partial_{y}^2 g \; , \]
where $$s_n$$ is a separation constant.
The spatial equation, $$g^{\prime\prime} + s_{n}^2 g = 0$$ has general solutions $$g(y) = A \sin (s_n y) + B \cos (s_n y) $$. Applying the boundary conditions requires $$B=0$$ and $$s_n = n \pi / w \;\; n = 1, 2, 3, \ldots$$. The time equation is easily integrated to $$f(t) = \exp( -s_n\nu t )$$. The general solution is
\[ V_x(t,y) = \frac{U}{w} y + \sum_{n=1}^{\infty} A_n \exp \left( – \frac{ n^2 \pi^2}{w^2} \nu t \right) \sin \left( \frac{n \pi}{w} y \right) \; . \]
The initial conditions are satisfied by picking the $$A_n$$ appropriately. The key to doing this is to exploit the orthogonality
\[ \int_0^w \sin \left( \frac{m \pi}{w} y \right) \sin \left( \frac{n \pi}{w} y \right) = \frac{w}{2} \delta_{mn} \; \]
to get
\[ A_m = -\frac{2}{w} \int_0^w \frac{Uy}{w} \sin \left( \frac{m \pi}{w} y \right) dy = \frac{ 2 U (-1)^n }{n \pi} \; . \]
The following plot shows this solution for $$w = 5mm$$ and $$\nu = 0.8926 mm^2/s$$.
Note the majority of the velocity is confined near the top plate at short times (this is essentially the boundary layer) but how quickly the solution tends to the steady state.
As a way of seeing this boundary layer as a feature of the transient behavior consider what happens if the top plate moves in an oscillatory fashion with velocity $$U \cos (\omega t) $$. Assuming that the fluid velocity has the form $$ V_x(t,y) = f(y) e^{i \omega t} $$, the Navier-Stokes equations yield
\[ f” – i \omega/\nu f = 0 \; .\]
Following the usual strategy $$f = exp(\lambda y)$$ gives values
\[ V_x(t,y) = U e^{-ky} e^{i (\omega t – k y) } \; ,\]
where $$k = \sqrt{\omega/2 \nu}$$. As the following animation shows, the velocity at the upper plate follows the motion of the plate but the main action is confined to a thin layer. Essentially, the motion is always transient and the influence of the fluid motion near the moving plate isn’t able to diffuse into the bulk of the fluid.