Heat and Gravitation. I. The Action Principle

This first article of a series formulates the thermodynamics of ideal gases in a constant gravitational field in terms of an action principle that is closely integrated with thermodynamics. The theory, in its simplest form, does not deviate from standard practice, but it lays the foundations for a more systematic approach to the various extensions, such as the incorporation of radiation, the consideration of mixtures and the integration with General Relativity. We study the interaction between an ideal gas and the photon gas, and propose a new approach to this problem. We study the propagation of sound in a vertical, isothermal column and are led to suggest that the theory is incomplete, and to ask whether the true equilibrium state of an ideal gas may turn out be adiabatic, in which case the role of solar radiation is merely to compensate for the loss of energy by radiation into the cosmos. An experiment with a centrifuge is proposed, to determine the influence of gravitation on the equilibrium distribution with a very high degree of precision.


I. Introduction
The premise of this paper is a conviction that the internal consistency of any physical theory is improved, if not assured, by a formulation that is based on a dynamical action principle. The consistency of a set of equations is a delicate matter. When a modification has to be made somewhere, to include an additional effect or another degree of freedom, then adjustments may have to be made elsewhere, for consistency, but the need to do so is not always evident. * A fully developed action principle treats all dynamical variables on an equal footing and without constraints. Such a theory is said to be "off shell", something that has been crucial in the development of relativistic field theories. When a change or a generalization is contemplated it is done by modifying the lagrangian; changes in the equations of motion are generated automatically and are believed to be mutually consistent. Another advantage is that the equations of motion constitute a complete set of equations that defines the theory; once the lagrangian is fixed, one need not worry about the possibility that some important relation has been overlooked, as is the case in applications of standard thermodynamics.
Action principles have been used for some problems in hydro-thermodynamics, but as far as we know the injunction to avoid all constraints has not been respected. Thus, in hydrodynamics the temperature is related to the other variables by what amounts to a constraint. The formalism has the aspect of a partial projection of a complete dynamical theory on the space of solutions.
This paper is a study of atmospheres consisting of an ideal gas, characterized by the ideal gas law and the expression for the internal energy. A well known hydrodynamic action principle is developed to include the temperature among the independent dynamical variables. The theory is closely integrated with thermodynamics and includes the specification of the Gibbs surfaces of equilibrium configurations among th equations of motion. The hamiltonian is identified with the thermodynamic function F + ST , where F (V, T ) is the free energy, S is the entropy and V is the volume. Variation of the lagrangian with respect to T and V leads to the thermodynamic relations ∂F ∂T V + S = 0, ∂F ∂V T + p = 0.
In the case of an ideal gas, this equation takes the form of the polytropic relation VT n = constant. On shell; that is, by virtue of the first of these relations, the hamiltonian density reduces to the familiar formula for the internal energy, U = nRT .
It is important to ask to what extent the observed polytropic relations are to be attributed to intrinsic properties of the gas, or to radiation. Although the question is somewhat academic, since it does not directly affect the main applications, it is natural to ask what are the natural configurations of an isolated atmosphere, one that is not exposed to radiation. Our understanding of atmospheres will be incomplete without an answer to this question.
The statement that any two thermodynamic systems, each in a state of equilibrium with a well defined temperature, and in thermal equilibrium with each other, must have the same temperature, is a central tenet of thermodynamics. A natural generalization is that the temperature, in an extended but closed system in a state of equilibrium, must be uniform, and there is near universal agreement that this remains true in the presence of gravitational fields. This is important for the understanding of terrestrial and stellar atmospheres, where the gravitational forces create a non-uniform density distribution.
It must be stressed that an actual, terrestrial or stellar, atmosphere is not isolated and is not a thermodynamic state of equilibrium. It is, at best, a stationary configuration in which the effects of incoming and outgoing radiation are balanced in what is called radiative equilibrium. When such atmospheres are described by a mathematical model, then this quiescent state is mapped to the equilibrium of the mathematical model. What is puzzling, is that the mathematical model, intended to describe an isolated gas, with the gravitational field included in standard fashion, turns out to be a model (in fact, the standard model) of an actual atmosphere that is far from being isolated. This mystery has an easy, but unpopular resolution: If one could concede that the true equilibrium state may be isentropic instead of isothermal, then the role of incoming radiation (in the case of the earthly atmosphere), or internal generation of energy (in the case of stars) would be simply to make up for the loss of energy radiated into the cosmos. So far, we have not found an attractive alternative.

Outline
Hydrodynamics is a theory of continuous distributions of matter, described in the simplest case by two fields or distributions: a density field and a velocity field, both defined over IR 3 or a portion thereof. The role of temperature is often constrained, as it is taken to be determined by the density and the pressure. Classical thermodynamics, on the other hand, is the study of states of equilibrium, with uniform density and temperature, and relations between such states. In this context, extremum principles first formulated by Gibbs (1878) play an important role; see for example Callen (1960), but the extension of thermodynamics to systems in which the dynamical variables are fields on IR 3 is not immediate and in fact variational principles are seldom invoked in studies of such systems. Investigations that deal with flow of matter or with temperatures that vary in time and space are found under the heading of heat transfer, fluctuations, thermodynamics of irreversible processes and radiation hydrodynamics. See for example Stanyukovich (1960), Castor (2004), Müller (2007).
In this introductory section we study a simple system from the point of view of hydrodynamics, on the basis of a well known action principle that incorporates the continuity equation and Bernoulli's equation. The temperature is not an independent variable but is assumed to be given by the ideal gas law. We stress the role of mass (Section I.5). The potential is chosen appropriately for an atmosphere that is either isothermal or polytropic. In applications to the earthly atmospheres, and to stellar structure as well, the polytropic model is universally preferred. * Section I.6 is a short introduction to polytropic atmospheres. It is remarkable that this theory already predicts the observed temperature lapse rate for our atmosphere. The only parameters are the known values of the adiabatic index and the effective atomic weight of the gas. There is no parameter that can be interpreted as a measure of the influence of radiation and no indication within the theory that the (radiative) equilibrium becomes isothermal in the limit when the radiation is turned off. We offer a brief review of the history of the polytropic atmosphere (Section I.7).
In Section II we take the action principle off shell, to include the temperature as an independent field variable (Sections II.2-5). Variation of the lagrangian with respect to the temperature is related to a standard, thermodynamical relation, ∂F/∂T = −S. The potential is refined to give the correct expression for the internal energy on shell; the off shell hamiltonian appears to be new.
In Section II.6 we include interactions with the photon gas, by adding the Stefan-Boltzmann energy to the hamiltonian. The radiation pressure appears as an addition to the thermodynamic pressure. The effect is to increase the effective polytropic index (towards the upper limmit of 3) at high temperatures. No approximation of the kind p gas /p total = constant, used by Eddington, is needed.
When this approach is compared to modern hydro-thermodynamics, restricted to adiabatic processes, we find that, so long as the radiation pressure is small in comparison with the gas pressure, all the basic equations are identical. But the incorporation of additional features is much more straightforward within the variational formulation.
Section II.7 examines the intimate integration of this action principle with thermodynamics. It is shown that the action principle, restricted to stationary configurations, is in full accord with the extremal conditions formulated by Gibbs, for energy and for entropy. When the (localized) internal energy is interpreted as a hamiltonian one recovers all the equations of motion derived from the action principle. It is pointed out that Gibbs' axiom of extreme entropy, which is not a result of the dynamical action principle, when applied to an isoloated continuous system, demands uniform entropy density rather than uniform temperature.
There is an extensive literature on the propagation of shock waves in a polytropic atmosphere but, as far as we know, none that deals with the vertical propagation of a disturbance (sound waves or shock waves) in an isothermal gas in a gravitational field. We study this problem in Section II.8. The result is unexpected and provokes further examination of the standard theory; we argue that it is incomplete. The injunction that equilibria (and some other configurations!) must be isothermal does not seem to be a special case of a more general doctrine; there is a striking lack of continuity.
The equilibrium state of any ideal gas with a finite adiabatic index is essentially polytropic. Here it is important to make precise what we mean by equilibrium. We use the term in the context of a mathematical model; it refers to a solution of the equations of motion with the property that the flow vanishes and all the fields are time independent. Polytropic models of earthly and stellar atmospheres are very widely used, and the stationary configurations of such atmospheres are equilibria in this sense, though they are not states of true, thermodynamic equilibrium. Since the density is not uniform, neither is the temperature. An issue that we wish to discuss is the precise role that is played by radiation. We should hope to develop an understanding of what would happen if the intensity of radiation were continuously reduced to zero. The possibility that the limit might turn out to be other than isothermal is not easy to accept, for it goes against one of the basic tenets of thermodynamics: Clausius' statement of the second law (Section II.9). The question is not entirely academic, but it has no direct bearing on the validity of our approach, for we apply it to the standard, polytropic atmospheres, and to problems where gravitation does not intervene.
It is important to incorporate the isothermal equilibrium into a dynamical framework; that is, to modify or extend the standard theory of polytropic atmospheres, to include a parameter or variable to represent the intensity of radiation and that would allow the effect of radiation to be reduced to zero, resulting in an isothermal equilibrium in the limit. In the event that experiment should validate the isothermal atmosphere the need to construct such a theory would become urgent. (Section II.9) There seems to be a dearth of experimental data. We study an ideal gas in a centrifuge and invoke the equivalence principle to relate this situation to atmospheres. Experiments are proposed. (Section II.10).
Some further speculations are in the Appendix.
Applications to astrophysics. The simplest form of the action principle studied here is the non relativistic approximation to a fully relativistic theory that, with the addition of the Einstein-Hilbert action for the metric, has been applied to the dynamics of certain stars (Fronsdal 2007(Fronsdal , 2008. The results are close to those of the traditional approach except for certain features that make the present approach more attractive to us, such as the preservation of the nonrelativistic equation of continuity. The present study was undertaken as preparation for an attempt to take into account the radiation field. In this paper the radiation energy (Stefan-Boltzmann energy) is included in the lagrangian; this automatically generates the radiative correction to the pressure (Section II.6); in a future paper we plan to lift it to a relativistic version and return to the study of stellar dynamics.

I.1. Hydrodynamics
Basic hydrodynamics deals with a density field ρ and a velocity field v over IR 3 , subject to two fundamental equations, the equation of continuity, (1.1) and the hydrodynamical equation (Bernoulli 1738) This involves another field, the scalar field p, interpreted as the local pressure. The theory requires an additional equation relating p to ρ. It is always assumed that this relation is local, giving p(x) in terms of the density (and the temperature) at the same point x, and instantaneous.

I.2. Irrotational flow
Since there is enough to do without taking on difficult problems of turbulence, we shall assume, here and throughout, that the velocity field can be represented as the gradient of a scalar field, v = −grad Φ. (1.3) In this case the hydrodynamical condition (1.2) is reduced to To complete this system one still needs a relation between the fields p and ρ.
Assume that there is a local functional V [ρ] such that (1.5) In this case grad p = ρ ∂V ∂ρ (1.6) and the equation (1.4) becomes, if ρ = 0, The potential V [ρ] is defined by p modulo a linear term, so that the appearance of an arbitrary constant is natural. It will serve as a Lagrange multiplier. The introduction of a velocity potential guarantees the existence of a first integral of the motion, a conserved energy functional that will play an important role in the theory.
It will turn out that V , with the inclusion of a term linear in ρ that remains undetermined at this stage, is related to the internal energy density.

I.3. Variational formulation
Having restricted our scope, to account for irrotational flows only, we have reduced the fundamental equations of simple hydrodynamics to the following two equations, together with the defining equations v = −grad Φ, p := ρV ′ − V. (1.9) It is well known that these equations are the Euler-Lagrange equations associated with the action (Fetter and Walecka 1980) (1.11) The value of this last circumstance lies in the fact that the variational principle is a better starting point for generalizations, including the incorporation of symmetries, of special relativity, and the inclusion of electromagnetic and gravitational interactions. It also gives us a valid concept of a total energy functional.

I.4. On shell relations
The action (1.10) contains only the fields Φ and ρ. The Euler-Lagrange equations define a complete dynamical framework, but only after specification of the functional V [ρ]. The pressure was defined by Eq.(1.9), p := ρV ′ − V , and one easily verifies that, by virtue of the equations of motion, p = L (on shell).
This fact has been noted, and has led to the suggestion that the action principle amount to minimization of p with respect to variations of p defined by thermodynamics (Taub 1954), (Bardeen 1970), (Schutz 1970). But an off shell action is needed. The lagrangian density is not a thermodynamic function, since it depends on the time derivatives of the variables. After adopting the action (1.10) it remains to relate the choice of the potential V to the thermodynamical properties of the fluid. We shall find that the properties that define an ideal gas lead to a unique expression for V . It is useful to reflect on the meaning of Eq.(1.6) as well. In a more general situation, in which the potential V depends on the temperature, we would have, instead of (1.6), the identity (1.11) The expression (1.5) for the pressure would be valid "on shell" if the action principle includes variations of the temperature as an independent variable, giving the on shell condition ∂V /∂T = 0. There is a unique thermodynamical function that is a prime candidate for being identified with the potential V . It is the function f (V, T ) + sT of three independent variables, where f and s are the free energy density and the entropy density. The integration with thermodynamics is explored in Section II.7.

I.5. The mass
To speak of a definite, isolated physical system we must fix some attributes, and among such defining properties we include the mass. We insist on this as it shall turn out to be crucial to the stability of stellar atmospheres (Fronsdal 2008). The density ρ will be taken to have the interpretation of mass density, and the total mass is the constant of the motion M = d 3 x ρ.
Such integrals, with no limits indicated, are over the domain Σ of definition of ρ, the total extension of our system in IR 3 . Since the total mass is a constant of the motion it is natural to fix it in advance and to vary the action subject to the constraint Σ d 3 x ρ(x) = M . The parameter λ takes on the role of a Lagrange multiplier and the action takes the form The conservation of mass has important implications for boundary conditions.

I.6. Equation of state and equation of change
An ideal gas at equilibrium, with constant temperature, obeys the gas law p/ρ = RT. (1.12) Pressure and density are in cgs units and where µ is the molecular weight. The gas law is assumed to hold, locally at each point of the gas. Effective values of µ are Atomic hydrogen : µ = 1, Air : µ = 29, Sun : µ = 2.
Equation (1.12) is the only equation that will be referred to as an 'equation of state'. Other relations, to be discussed next, are 'equations of change', this term taken from Emden's "Zustandsänderung", for their meaning is of an entirely different sort. Most important is the polytropic relation (1.13) This relation defines a polytropic path or polytrope in the p, V diagram (V = 1/ρ). A polytropic atmosphere is one in which, as one moves through the gas, the variables ρ and p change so as to remain always on the same polytrope. Eq.(1.13) is a statement about the system, not about the gas per se. The validity of (1.13) for an actual atmosphere cannot be inferred from the early laboratory experiments.
The index of the polytrope is the positive number n ′ defined by Important special cases are Numbers γ, n are defined by The number n is the adiabatic index of the gas. According to statistal mechanics 2n is the number of degrees of freedom of each molecule in the gas. That atmospheres tend to be polytropic is an empirical fact.
The case that γ ′ = γ is of a special significance. A polytrope with γ ′ = γ is a path of constant specific entropy; changes along such polytropes are reversible and adiabatic; these polytropes and no others are adiabats.
Fix the constants A, γ ′ in (1.13) and consider an associated stationary, polytropic atmosphere. If both (1.12) and (1.13) hold we have (Poisson 1835) (1.14) In any displacement along a polytrope from a point with pressure p and temperature T , we shall have dρ/ρ = (1/γ ′ )dp/p, so that an increase in pressure leads to an increase in density that is greater for a smaller value of γ ′ . If a parcel of gas in this atmosphere is pushed down to a region of higher pressure, by a reversible process, then it will adjust to the ambient pressure. If γ > γ ′ , then it will acquire a density that is lower than the environment; it will then rise back up; this atmosphere is stable. But if γ ′ > γ then the parcel will be denser than the environment and it will sink further; this atmosphere is unstable to convection. Thus we have: A stable, polytropic atmosphere must have γ ′ < γ, n ′ > n.
In hydrodynamics, the isothermal atmosphere can be given a lagrangian treatment by taking V = RT ρ ln ρ. (1.15) We suppose that the gas is confined to the section z 0 < z < z 0 + h of a vertical cylinder with base area A and expect the density to fall off at higher altitudes. A plausible action density, for a perfect gas at constant temperature T in a constant gravitational field φ = gz, g constant, is (1.16) We may consider this an isolated system with fixed mass and fixed extension. At equilibriumΦ = 0, v = 0,ρ = 0 and the equation of motion is There is no difficulty in taking the limit h → ∞. The volume becomes infinite but it can be replaced as a variable by the parameter z 0 . This atmosphere is stable. The isothermal atmosphere is usually abandoned in favor of the polytropic atmosphere.
A polytropic gas can be described by the lagrangian (1.10), with Variation with respect to ρ gives The temperature does not appear explicitly but is taken to be determined by the gas law, p = RρT . Among the many applications the following are perhaps the most important. In the case of sound propagation the gas is initially awakened from equilibrial turpor and then left in an isolated, frenzied state of oscillating density and pressure, with the temperature keeping pace in obedience to the gas law (Laplace 1825, Pierce 2008. All three of the relations (1.14) are believed to hold, with γ ′ = γ. The oscillations are usually too rapid for the heat to disseminate and equalize the temperature, so that the neglect of heat transfer is justified. It should be emphasized, however, that these rapid variations of the temperature with time are not predicted by the theory; Laplace's postulate that (δρ/δρ)/(δṪ /δT ) = n ′ is bold, independent assumption. In applications to atmospheres one often postulates the polytropic equation of change (1.13) and obtains the temperature from the gas law. Understanding the resultant temperature gradient in terms of convection, or as the effect of the heating of the air by solar radiation, or both, is one of the main issues on which we have hoped to gain some understanding.
At mechanical equilibrium v = 0,ρ = 0 and λ − gz =âγρ 1/n , hence Since the density must be positive one does not fix the volume but assumes that the atmosphere ends at the point z 1 = λ/g. Then This fixes h and thus z 1 and λ. If the atmosphere is an ideal gas then the temperature varies with altitude according to Because the lagrangian does not contain T as a dynamical variable it is possible to impose this condition by hand.
One would not apply this theory down to the absolute zero of temperature, but even without going to extremes it seems risky to predict the temperature of the atmosphere without having made any explicit assumptions about the absorption or generation of heat that is required to sustain it. Yet this has been the basis for the phenomenology of stellar structure, as well as the earth's atmosphere, from the beginning (Lane 1870, Ritter 1878.
The success of the polytropic model is amazing, but the theory is incomplete since it does not account for heat flow, nor convection, both of which are needed to complete the picture.
For air, with molecular+ weight 29, R = 2.87 × 10 6 ergs/gK and n = 2.5. At sea level, g = 980cm/sec 2 , the density is ρ = 1.2×10 −3 g/cm 3 , the pressure p = 1.013×10 6 dyn/cm 2 . Thus p/ρ = .844 × 10 9 cm 2 /sec 2 , T = T 0 = 294K, z 1 = 3.014 × 10 6 cm ≈ 30km, and the dry lapse rate at low altitudes is −T ′ = 294/z 1 = 9.75K/km. The opacity that is implied by this is mainly due to the presence of CO 2 in the atmosphere. Humidity increases the opacity and decreases the lapse rate by as much as a factor of 2. (A temperature difference of 70 degrees over 12 000 m was observed on a recent flight over Europe.) The specific internal energy of this hydrodynamical model is np/ρ = nRT , as it should be for an ideal gas.

I.7. Historical notes on polytropic atmosphere
Observations of reversible transformations of near-ideal gases, carried out during the 19th century, can be summarized in what is sometimes called the laws of Poisson, In the original context all the variables are constant and uniform. The exponents as well as the coefficients of proportionality are the same for all states that are related by reversible transformations. Statistical mechanics explained this result and confirmed the experimental value γ ′ = γ = C P /C V . As far as can be ascertained, the presence of terrestrial gravitation and ambient radiation had no effect on these experiments. In a first extrapolation the same relations were taken to hold locally in dynamic situations, as in the case of sound propagation. The gas is not in thermal equilibrium and the variation of the temperature from point to point, and with time, is obtained from the gas law. This extension of an important thermodynamical relation to the case of a nonuniform system is taken for granted.
For the atmosphere of the earth it was at first proposed that the temperature would be uniform. However, the existence of a temperature gradient was soon accepted as an incontrovertible experimental fact. The first recorded recognition of this, together with an attempt at explaining the same, may be that of Sidi Carnot, in the paper in which he created the science of thermodynamics (Carnot 1824). Carnot quotes Laplace: "N'estce pas au refroidissement de l'air par la dilatation qu'il faut attribuer le froid des régions superieures de l'atmosphere? Les raisons données jusqu'ici pour expliquer ce froid sont tout a fait insuffisantes; on dit que l'air des régions elevées, recevant peu de chaleur reflechie par la terre, et rayonnant lui meme vers les espaces celestes, devait perdre de calorique, et que c'etait lá la cause de son refroidissement; ... " This may be the first time that the influence of radiation is invoked. The temperature gradient is attributed to the greenhouse effect, and Laplace was an early skeptic, for he continues "...mais cette explication ce trouve detruite si l'on remarque qu'aégale hauteur le froid regne aussi bien et meme avec plus d'intensité sur les plaines elevées que sur les sommets des montagnes ou que dans les parties d'atmosphereéloignees du sol." It is not clear that the two explanations are at odds with each other; Laplace apparently postulates that the atmospheres over lands at different elevations are related by adiabatic transformations, but without explaining why.
By rejecting the role of radiation as the cause of the temperature gradient, Laplace seems to suggest that the same would be observed in an atmosphere subject to gravitation but totally isolated from radiation, neither exposed to the radiation coming from the sun nor radiating outwards. As was strongly emphasized in later phases of this debate, this would contradict the belief that the thermal equilibrium of any isolated system, gravitation and other external forces notwithstanding, is characterized by a uniform temperature.
In 1862 W. Thomson, in the paper "On the convective equilibrium of the temperature in the atmosphere", defines convective equilibrium with these words "When all parts of a fluid are freely interchanged and not sensibly influenced by radiation and conduction, the temperature is said to be in a state of convective equilibrium." He then goes on to say that an atmosphere that is in convective equilibrium is a polytrope, and we think that he means an adiabat, because of the words "freely interchanged", although the value of the polytropic index is taken from experiment and not from statistical mechanics. At first sight the clause "and not sensibly influenced by radiation" would seem to imply that his remarks apply to an isolated atmosphere, indicating that a temperature gradient would persist in the absence of radiation, but this conclusion would be premature, as we shall see.
Later, Lord Kelvin had doubts about what he called the Boltzmann-Maxwell doctrine and especially its application to the isolated atmosphere. See his Baltimore lectures, onwards (Kelvin 1904). * In 1870 H.J. Lane made the bold assumption that the laws of Poisson may be satisfied in the Sun. The terrestrial atmosphere (or part of it) had already been found to be well represented by the same relations. Referring to Lane's paper Thomson, now Lord Kelvin, explains how convective equilibrium comes about (Thomson 1907). He argues that the atmosphere is not, cannot be, at rest, and this time radiation plays an essential role. The upper layers loose heat by radiation and the lower temperature leads to an increase in density. This produces a downward current that mixes with a compensating upward drift of warmer air. This continuing mixing takes place on a time scale that is too short for adjacent currents to exchange a significant amount of heat by conduction or radiation, especially since the variations of temperature are very small. It is evident that Thomson offers his explanation of the temperature gradient to account for its absence in an isolated atmosphere, for he says that, "an ideal atmosphere, perfectly isolated from absorption as well as emission of radiation, will, after enough time has passed, reach a state of uniform temperature, irrespective of the presence of the gravitational field". Thomson accepts the mechanism of Laplace and Carnot, as it is at work in the real atmosphere, but he goes further. He believes that the lower temperature aloft is intimately tied to the existence of radiation, implying that it is driven by net outwards radiation. (The effect of solar radiation on the terrestrial atmosphere is not explicitly mentioned.) It is difficult to judge whether or not Thomson is in disagreement with Laplace, but the precision of his statements represents a marked improvement over his predecessors and his earlier work.
The principal developers of the field, Ritter (1878Ritter ( -1883 and Emden (1907), seem to accept the idea of convective equilibrium. It may be pointed out, however, that this mechanism is in no way expressed by the equations that these and other authors use to predict the behaviour of real atmospheres. The concept of convective equilibrium is introduced to one purpose only: to avoid contradiction with firmly established belief in the isothermal equilibrium of isolated systems. It receives no quantitative theoretical treatment.
Nor was it accepted by everybody. A famous incidence involves Loschmidt (1876), who believed that an isolated atmosphere, at equilibrium in a gravitational field, would have a temperature gradient. But arguments presented by Maxwell and Boltzmann (1896) led Loschmidt to withdraw his objections, which is hardly surprising given the authority of these two. Nevertheless, it may be pointed out that no attempt was made, to our * "The time integral of the kinetic energy of any atom will be equal to the time integral of the kinetic energy of any other atom. This truism is simply and solely all that the Boltzmann-Maxwell doctrine asserts for a vertical column of a homogeneous monatomic gas." knowledge, to settle the question experimentally, until recently (Graeff 2008).
An alternative to convective equilibrium was proposed by Schwarzschild (1906) and critically examined by Emden. To understand how it works we turn to Emden's book of 1907, beginning on page 320. Here he invokes a concept that is conspicuously absent from all his calculations on polytropic spheres in the rest of the book: heat flow. He posits that the atmosphere is not completely transparent, and that heat flow is an inevitable consequence of the existence of a temperature gradient. The most important observation is that heat flow is possible in stationary configurations (Ṫ = 0) provided that the temperature gradient is constant. We take this to be an implicit reference to the heat equation, the first such reference in the book(!). The heat flux due to conduction and radiation is usually thought to be expressed as where the tensor C includes the thermal conductivity as well as the effective coefficient of heat transfer by radiation. The divergence of the flux is the time rate of change of the temperature due to conduction and radiation. In a stationary, terrestrial atmosphere, with no local energy creation, this must vanish. Emden's atmospheres are polytropes, with temperature gradients that are constant. It appears that he takes C to be uniform. That is surprising, and interesting, for he suggests that the entire edifice implicitly demands that this condition, of a constant heat flow, must be satisfied.
We note that the direction of flow is from hot to cold, outwards. In applications to planetary atmospheres, with no local energy generation, this calls for an explanation, since the ultimate source of energy is above. Here we have to return to the oldest explanation of the existence of a temperature gradient, dismissed by Laplace (op. cit.): the greenhouse effect. The atmosphere is highly transparent to the (high frequency) radiation from the Sun but opaque to the thermal radiation to which it is converted by the ground. The atmosphere is thus heated from below! If the atmosphere is stable in the sense discussed above, when γ ′ ≤ C P /C V , then it is not necessary to assume that any convection takes place. In this case one speaks of (stable) 'radiative equilibrium'. Convective equilibrium may step in when the stationary atmosphere is unstable, but it is no longer used to explain the existence of a temperature gradient.
A difficulty is present in all accounts of stellar structure up to 1920. The energy observed to be emitted by the Sun, attributed to contraction of the mass and the concomitant release of internal energy, was far too small to account for the age of the sun as indicated by the geological record. The situation changed with the discovery of thermonuclear energy generation. Now there is plenty of energy available. At the same time there arose the realization that convection sometimes plays a very modest role; the concept of convective equilibrium was put aside and with it, Kelvin's explanation of the temperature gradient. According to Eddington (1926), who is more concerned with stars than with our atmosphere, "convective equilibrium" must be replaced by "radiative equilibrium" in the sense of Schwarzschild. He does not claim that this new concept accounts for the temperature gradient as well as Kelvin's convective equilibrium does, but in fact the local generation of heat by thermonuclear processes creates an outward flow of heat and is expected to explain the existence of a negative temperature gradient. (It does, at least, explain the persistence of high temperatures in a system that is open to the cosmos.) It is an indication of the incompleteness of this picture that it contains no parameter that can be associated with the strength of radiation and, a forteriori, it does not allow us to investigate the result of turning off the radiation.

II. Thermodynamics
II.1. Thermodynamic equilibrium A state of thermodynamical equilibrium of a system that consists of a very large number of identical particles is defined by the values of 3 variables, a priori independent, the volume V, the pressure P and the temperature T . These are variables taking real values; they apply to the system as a whole. In the case of any particular system there is one relation that holds for all equilibrium states, of the form It is written in this form, rather than F (T, V, P ) = 0, because a unique value of T is needed to define a state of equilibrium between two systems that are in thermal contact with each other: it is necessary and sufficient that they have the same temperature. This statement incorporates the zeroth law.
If we divide our system into subsystems then these will be in thermal equilibrium with each other only if they have the same temperature. This, at least, is inherited wisdom.
The ideal gas at equilibrium is defined by global variables T, V, P , and two relations. The principal one is the gas law where V is the volume of a mole of gas. The other may take the form of an expression for the internal energy.

II.2. The ideal gas in statistical mechanics
Here again we consider a gas that consists of identical particles (Boltzmann statistics), each with mass m and subject to no forces. It is assumed that the ith particle has momentum p i and kinetic energy p i 2 /2m. It is assumed that the number N of particles with energy E is given by the Maxwell distribution which implies a constant density in configuration space. Now place this gas in a constant gravitational field, with potential φ(x, y, z) = gz, g constant. Since the potential varies extremely slowly on the atomic scale it is plausible that, at equilibrium, each horizontal layer (φ constant) is characterized by a constant value of the temperature, density and pressure. Since neighbouring layers are in thermal contact with each other the temperature must (?) be the same throughout, The energy of a particle at level z is p 2 /2m + mgz and (2.1) now implies the following distribution in configuration space, in agreement with (1.17). This supports the expression for the potential, Eq.(1.15), which is strange since that potential is not appropriate for an ideal gas. Both derivations of the distribution rest on the assumption that the temperature is constant throughout the system. About the influence of gravitation on the temperature distribution there has been some debate, see e.g. Waldram (1985), page 151. It is said that the kinetic energy of each atom in a monatomic gas is 3kT /2 and that, when the temperature is the same everywhere, this is paradoxical because it does not take account of the potential energy of the atom in the gravitational field. The incident involving Loschmidt, Maxwell and Boltzmann has already been mentioned. All speculation along these lines falls short of being compelling. See the Kelvin footnote in Section I.7.

II.3. The first law and the internal energy
Can we extend the action principle to the case that the temperature varies with time? The action must be modified, for the temperature becomes a dynamical field. Is the temperature one of the variables with respect to which the action must be minimized? The usual approach is to lay down the additional equation by fiat (Section I.6); is this completely satisfactory? Would it perhaps be preferable to have it appear as the result of minimizing the action with respect to variations of the temperature field? We hope to show that there are important advantages.
To prepare for the generalization we shall examine some of the main tenets of thermodynamics in the context of the action principle. Assume for the moment that the system is one of uniform density and pressure. Suppose that the system is in thermal and mechanical isolation except for a force that is applied to the boundary. The system is in an equilibrium state with temperature T . The applied force is needed to hold the gas within the boundary of the domain Σ, then decreased by a very small amount leading to a displacement of the boundary and an increase of the volume by a small amount dV. Assume that this process is reversible. The work done by the applied force is dW = −pdV. (2.4) The first law states that, if the system is in thermal isolation, then this quantity is the differential of a function U (V, S) that is referred to as the internal energy of the system.
Here it should be recalled that the natural variables of U are V and S. When one says that the internal energy of an ideal gas is nRT M , what is meant is that this is the value obtained when S is eliminated in favor of T and V. Locally, as we shall see in Section II.7, We regard u as the on shell value of the function V = f + sT .
Consider the system that consists of an ideal gas confined to a volume V and experiencing no external forces, not even gravitation. If the gas expands at constant pressure the work done by the gas is pdV and the ideal gas law Eq.(1.12) tells us that (2.5) The idea of energy conservation suggests a concept of "internal energy". It is assumed that, under certain circumstances (dS = 0), the work done by the gas is at the expence of an internal energy U so that pdV + dU = 0, It is an experimental fact (Gay-Lussac 1827, Joule 1850) that the internal energy of an ideal gas is independent of the volume (see above) and the more precise statement that the on shell internal energy density u is proportional to RT ρ is often included in the definition of the ideal gas (Finkelstein 1969, page 7). Thus Statistical mechanics givesĉ V = n, where n is the adiabatic index and takes the value 3/2 for a monatomic gas. Thus RT M dV/V + dU = RT M dV/V + nRM dT = 0, which implies that The conclusion is that the two conditions that define an ideal gas, p = RρT and u = nRρT , imply the polytropic relation ρ/T n = constant for adiabatic changes. The calculation from (2.4) onward was done with the understanding that M = ρV is fixed. At the deepest level the concept of energy derives its importance from the fact that it is conserved with the passage of time, by virtue of the dynamics. In modern versions of thermodynamics, and especially in the thermodynamics of irreversible processes and in radiation thermodynamics, conservation laws are all important, but they are postulated, one by one, not derived from basic axioms as is the case in other branches of physics, and they have a formal aspect, serving to define various fluxes. See e.g. Stanyukovich (1960), Castor (2004).

II.4. The first law and the hamiltonian
Having adopted an action principle approach we are bound to associate the internal energy with the hamiltonian.
The hamiltonian density is determined by the equations of motion only up to the addition of a constant multiple of the density. When we decide to adopt a particular expression to be used as internal energy over a range of temperatures, we are introducing a new assumption. Any expression for the internal energy, together with the implication that applied forces increase it by an amount determined by the work done, is a statement about a family of systems, indexed by the equilibrium temperature or the entropy. This cannot come out of the gas law and implies an independent axiom.
If we adopt the simplest expression for the hamiltonian, that of the isothermal atmosphere, with the lagrangian density of Eq.(1.16), interpreting the potential as the 'internal energy', then we shall get, in the static case, The second term compensates for pdV and so dT = 0, the temperature does not change.
The temperature of this gas is an adiabatic invariant. This contradicts experimental results for ideal gases. In fact, the hamiltonian density h = V = RT ρ ln ρ is not the correct expression for the internal energy density of an ideal gas. (We shall have more to say about this later.)

II.5. The adiabatic lagrangian
In the absence of gravity the equilibrium configurations all have uniform temperature, density and pressure. The equilibrium configurations described by the lagrangian are related by reversible transformations involving no heat transfer, exactly the configurations examined in the earliest experiments. In the presence of gravity we shall assume only that the expression for the internal energy density has the same form, namely u =ĉ V RT ρ.
(2.6) Two kinds of additions can be made to the lagrangian (1.16) without spoiling the equations of motion that are essential to hydrodynamics.
Adding a term linear in ρ we consider The continuity equation is unchanged, and the hydrodynamical equation remains On shell or, more precisely, by virtue of this equation, the potential reduces to This is the on shell "free", static hamiltonian density (gravitational potential and kinetic energy omitted) that we expect to identify with the internal energy density (2.6). This requires that ψ[T ] = nRT ln T /T 0 , (2.9) leaving free only the constant T 0 . The on shell hamiltonian density takes the form h| := h| on shell = ρ v 2 /2 + ρφ + u, u = nRT ρ.
Finally, the equation of motion (2.8), with ψ[T ] as in (2.9), reduces to This is just the adiabatic relation ρ/T n = constant. It was derived, once more, from the two conditions that define an ideal gas. The equation of motion that is obtained by variation with respect to ρ iṡ Combined with Eq.(2.10) it reduces, in the static case, to φ − λ + (1 + n)RT = 0, which has the same form as the equation (1.18) studied in Section I.6, expressing the fact that the lapse rate is constant. We have thus found an action principle, with dynamical variables ρ and T , that reproduces all of the equations that characterize the equilibrium configurations, as well as the standard, hydrodynamical relations of an ideal gas.
The lagrangian density is II.6. The radiation term Since the advent of Schwarzschild's paper (1909), and especially after the adoption of his ideas by Eddington (1926), the analysis of the effect of radiation has not changed significantly. The conclusion, in the simplest approximation, is that the internal energy is augmented by the Stefan-Boltzmann expression for the energy of black body radiation.
The term ρµ[T ] in Eq.(2.7) has been included in the potential, with k = ρ/T n . The constant a = 7.64 × 10 −15 ergs/K 4 is the Stefan-Boltzmann constant and the new term is the pressure of the photon gas, or of black body radiation.
The new expression for the on shell internal energy is u = nRT ρ + aT 4 , and the pressure, defined either by the modified hydrodynamical equation or by dU +pdV = 0, is in agreement with the theory of black body radiation and with the principle that the pressure in a mixture of gases is additive. Variation with respect to T now gives R n − ln k k 0 ρ + 4a 3 T 3 = 0, (2.12) and in the important case when n = 3, which is equivalent to Poisson's law k = T 3 /ρ = constant. This reflects an affinity between the polytropic ideal gas with n = 3 and radiation, strongly emphasized by Eddington (1926). The value n = 3 has a cosmological significance as well, it is characteristic of the changes in ρ, p, T induced by uniform expansion (Ritter , Emden 1907, see Chandrasekhar 1938. For other values of n, Eq.(2.12) is a mild modification of the polytropic equation of change in the presence of radiation. The standard approach maintains the polytropic relation without change in the presence of radiation. The fact that the inclusion of the radiative term in the hamiltonian leads to a modification of the polytropic relation illustrates the new perspective that characterizes the action principle formulation of dynamics. It deserves to be emphasized that our approach does not allow us to determine a relation between dynamical variables (such as ρ ∝ T n or even P = RT ρ) until the lagrangian has been completed. The modification of the polytropic relation that results from including the energy of the radiation field is not a feature of the traditional theory.
We have thus found an action that, varied with respect to ρ, Φ and T reproduces all of the equations that define the ideal, polytropic gas with polytropic index n = 3, radiation included, as well as the standard, hydrodynamical relations. For any value of n, it describes a gas that has its effective polytropic index increased from the 'natural' adiabatic value, approaching the critical value 3 at very high temperatures.
We suggest that using the lagrangian (2.11) is preferable to the usual assumption that β := p gas /p tot is constant, which is true only when n = 3.

II.7. Thermodynamical relations
The basis for a close integration of the axtion principle with thermodynamics is the identification of the hamiltonian with the function a function of 4 independent variables V, T, S and P .
The states of thermodynamic equilibrium are the points in this 4-dimensional manifold at which H is extremal with respect to variations of T and V, In the case of an ideal gas, F (V, T ) = −RT ln(VT n ), and these relations give S/R = n + ln (VT n ), and P V = RT.
The on shell internal energy density is There is a symmetry between energy and entropy, already emphasized by Gibbs (1878). One can regard the entropy as a function of V, H and P , The conditions that this function be stationary with respect to the variables of T and V are exactly the same, The choice of the function F (V, T ) characterized the system. The variable S remains a free parameter that is fixed when the system is isolated.

Local relations
The local extrapolation of thermodynamics seeks to promote these relations to field equations that describe local but stationary configurations. The functions F, H, S are given new interpretations as specific densities, the variable V as specific volume. The mass density is ρ = 1/V and densities f, h, s are defined by

The Hamiltonian is
Variation with respect to T , with ρ, S, T treated as independent variables, leads to ∂f ∂T + s = 0. (2.13) Variation with repsect to ρ, with the mass and the volume fixed, gives 14) The local thermodynamic pressure is defined by then the last relation (2.14) reduces to grad h + p ρ = 0, (2.15) A complimentary variation of the density, with the mass fixed but the volume not, gives the result that the internal pressure p must agree with the "external" pressure P on the boundary. This is the only way that the external pressure P affects the equations of motion, so the values assigned to P in the interior play no role. However, one may wish to assure that every part of the system is in equilibrium; that amounts to placing imaginary boundaries; then P represents the pressure on the boundary by the molecules that are on "the outside", and then it has to match the thermodynamic pressure p everywhere. In this interpretation P is the pressure, an independent variable, and the condition for equilibrium is that it take the value of the thermodynamic pressure p everywhere.
In the case of the ideal gas The on shell value of h is the internal energy density, h| on shell = u = ρ v 2 /2 + nRρT and the variational equations reduce to S/R = n − ln ρ T n , grad v 2 /2 + (n + 1)RT = 0.
The first equation, (2.13), gives an expression for the entropy in terms of the density and the temperature. It must be interpreted as a condition to be satisfied by ρ and T once the entropy S is given. In Gibbs' original setting S was just a parameter, here it is a distribution, but the interpretation is the same. Variation of the energy gives no information about the entropy distribution. It retains its role as a free parameter, fixed for an isolated system.
The other equation, in the general case Eq. (2.15), must be compared with the Bernoulli equation. There is, however, an obstruction, for Eq.(2.15) reads with the gravitational potential φ now included, while the Bernoulli equation is, The first term is gradρ (p/ρ 2 ) = (1/ρ) grad p − grad (p/ρ), so that the equation of motion is grad( v 2 /2 + φ) + 1 ρ grad p + T grad S = 0. and the Bernoulli equation is obtained under the condition that the entropy is uniform. This, it turns out, is a very interesting requirement.
Reversing the roles of h and s we extremize the total entropy Variation with respect to T , with ρ, T, P and H = h/ρ treated as independent variables, gives the same result, ∂f /∂T + s = 0, but variation with respect to ρ gives an additional constraint, This result brings relief to what is the greatest difficulty of localized thermodynamics, finding the correct way to deal with the entropy. It also relates the two difficulties that arose in connections with the equations of motion; the (inconsequential) one of fixing the role of the external pressure, and the serious one of justifying the Bernoulli equation, to each other. In fact both problems are solved when we can show that P = p, and in that case the entropy is uniform. The result (2.16) is thus remarkble. The alternate form of Gibbs' axiom actually provides exactly the additional information that is needed to relate the axiom of maximum energy to the laws of hydrodynamics, provided that the interpretation of P is correct.
In the case of the earthly atmosphere, the implication is that, if the total entropy is extremal, then the entropy, and not the temperature, is uniform.
If we accept that the total entropy is extremal with respect to variations of the temperature and the density, then we must accept that the isolated gas takes on an equilibrium configuration that resembles that of an actual, isentropic atmosphere.
In this section we have not invoked our action principle, only classical ideas about the energy and the entropy being extremal at equilibrium. Let us point out that the function that we referred to as the hamiltonian actually deserves the name. We need to introduce a variable that is the canonical conjugate to the variable ρ. The velocity potential Φ fills the role admirably, with v = −grad Φ by definition. The continuity equation takes the forṁ ρ = −δH/δΦ, the Bernoulli equation (in integrated form) isΦ = δH/δρ.
The variational principle is thus thoroughly integrated with the thermodynamics of Gibbs.

A divided system
A well known general calculation aims to show that, when two bodies are in thermal contact, each in a state of equilibrium, then their temperatures will tend to equalize. Let us examine the case of an ideal gas, occupying both parts of a vessel that is divided by a weightless piston, free to move in a vertical direction.
The total energy is a sum, Let us assume that the external potential φ is constant in each volume, and that the masses are separately conserved.
Variations that hold the common boundary fixed lead to the usual expressions for the entropy and the pressure, and a uniform entropy in each part. The external pressures P 1 , P 2 are not yet related to the thermodynamic pressures p 1 , p 2 . It remains only to consider variations of the form dV 1 = −dV 2 = −dρ 1 /ρ 2 1 = dρ 2 /ρ 2 2 . Variation of the energy gives It means that the difference between the thermodynamic pressures must balance the net external force applied to the piston.
Variation of the total entropy gives The interpretation is this. If each subsystem is in equilibrium, p i = P i , then the only requirement is that the entropies be equal. But if the entropies are equal and both subsystems are out of equilibrium, then the temperatures must be equal. That is, if T 1 = T 2 , then the system will take advantage ot available thermodynamic changes to increase the entropy.
The usual argument rests on the reasonable assumption that, if the temperatures are unequal, some process that may be related or not to the considered thermodynamic changes, will intervene to modify the implications of the first relation. However, it can perhaps be agreed that this is not a prediction of thermodynamics in the narrow sense.
The conclusion that was reached above, that an equilibrium configuration of an ideal gas is isentropic rather than isothermal, is derived from precisely the same axioms. To modify the implications it is enough to invoke a process, not yet taken into account, for the addition or withdrawal of energy from a gas that is in equilibrium. The thermodynamics of an ideal gas cannot, by itself, settle the question.

II.8. The isothermal atmosphere
In this section we study the isothermal atmosphere from the conventional point of view. Instead of the polytropic relation, that theory postulates the equation of continuity, the Bernoulli equation in differential form, and the "energy conservation equation" In the case of an ideal gas in isolation, the familiar expressions u = nRρT and p = RρT are assumed to hold.
Given the other equations, the polytropic equation implies the energy conservation equation, but is the inverse statement true?
In the first term we use the continuity equation, The second term would compliment the first, to make a divergence, but this is tricky. The Bernoulli equation gives Without any assumptions, The right hand side can be transformed with the help of the equation of continuity, where s is the entropy density.* Conservation of entropy is a part of non equilibrium thermodynamics, but it is normally not invoked in the case of an isolated system. The equationṡ + ▽ · (σ v) = 0 is, nevertheless, one of the axioms of the general theory and it is natural to add it to the equation of continuity and Bernoulli's equation as a basic equation of the theory; for example, in the formk + v · ▽k = 0.
(2.16) This makes energy conservation a theorem instead of an axiom. Even so, the injunction T ′ = 0 at equilibrium is an extra constraint that is not implied by the equations of motion. What replaces or extends this rule in the case of a non equilibrium situation? The heat equation comes to mind, but it does not imply that the temperature is constant at equilibrium, as pointed out by Emden, op cit Section I.7. * If, besides being uniform, the temperature is constant in time, then this equation expresses the conservation of the free energy.
Consider harmonic perturbations of the isothermal equilibrium configuration, for which ρ ′ /ρ = k ′ /k = −g/RT. (2.17) Replace ρ, T, k by ρ + dρ, T + dT, k + dk and suppose that the space and time dependence of the perturbations share the harmonic factor e αt+βz , α, β complex constants. Eq.(2.17) and the continuity equation give us

The Bernoulli equation is
and after some calculation, This formula has the familiar, laplacian limit in the absence of gravity, g → 0, and in the limit of high frequencies. In terms of the wave number ν = iβ and the frequency ω = α/i the formula is If ω is real, which should be experimentally feasible, then which makes the factor exp(βz) = exp(−iνz) in the amplitude increase exponentially with the altitude. (Does it induce cooling?) This invalidates the linear approximation at high altitudes, but the predicted negative damping is unexpected even in the case of a gas column of modest height. Finally, The bass section is silent. Sound propagation in the polytropic atmosphere is unaffected by the terrestrial gravitational field; the speed is the same in vertical and horizontal directions.
The equations that partially define the standard theory allow for an arbitrary fixed, uniform value of the entropy. For any value of this number one would obtain a complete and well defined adiabatic theory, but this would violate the rule that T must be uniform at equilibrium and is rejected. There remains only the three equations, includingk+ v· ▽k = 0. But the theory is incomplete, as is evidenced by the fact that fixing the entropy is still a mathematically allowed option. The statement that the temperature must become uniform for equilibrium configurations helps to pin it down, but it is still not complete.
That the theory is incomplete is clearly shown by consideration of the centrifuge. The gas is moving and the density is not constant. But the equivalence principle has been invoked, to argue that the temperature must be uniform in this situation as well. The need to make this additional rule shows that, without it, the theory is incomplete, nor does that make it complete. What is needed is a rule that applies to non equilibrium configurations, from which the original rule of uniform temperature can be inferrd by continuity.

II. 9. The puzzle
We return to our analysis of the isolated, ideal gas, before the introduction of the radiation term in Section II.6. It was based on only two assumptions, the familiar expression for the internal energy of an ideal gas, and the ideal gas law. The adiabatic equation of change, ρ/T n = constant, was not postulated but derived from those assumptions. In the absence of gravity the result is standard. In particular, the equations of motion allow for stationary states with uniform density and temperature. The effect of gravity was included by adding the gravitational potential energy to the hamiltonian; which is standard practice. The result of that modification is that, in the presence of the gravitational field there are no longer any stationary solutions with uniform temperature. Instead both density and temperature decrease with elevation. This should be welcome as being in agreement with what is observed in real atmospheres. The fact that a portion of the atmosphere of the Earth exhibits the same temperature profile is a surprise; it suggests that the temperature gradient is not a product of radiation The problem is that nothing could justify an application of this theory to phenomena that are significantly influenced by radiation. Nothing that went into building up the theory suggests that the gas is not in isolation. But there is a very strong conviction among physicists that, in an isolated system, the temperature must be uniform, gravitation notwithstanding. We have built a theory that, surprisingly, seems to apply to the irradiated and gravitating atmosphere, but we have not solved the more basic problem, to provide a dynamical theory that incorporates the isothermal atmosphere.
Why is the prediction of a temperature gradient in an isolated atmosphere so shocking? Imagine a large heat bath located in the region z > 0 in IR 3 . A vertical tube, filled with an ideal gas, has its upper end in thermal contact with the bath, otherwise it is isolated. Assume that, at equilibrium, the lower part of the tube has a temperature that is higher than that of the bath. Now extract a small amount of heat from the bottom of the tube; then the restoration of equilibrium demands that heat must flow from the bath to the warmer, lower part of the tube, in violation of one of the statements of the second law, namely: "Heat cannot pass by itself from a colder to a hotter body" (Clausius 1887). * Concerning the status of this formulation by Clausius of the second law of thermodynamics we quote I. Müller (2007): "This statement, suggestive though it is, has often been criticised as vague. And indeed, Clausius himself did not feel entirely satisfied with it. Or else he would not have tried to make the sentence more rigorous in a page-long comment, which, however, only succeeds in removing whatever suggestiveness the original statement may have had". And Müller continues: "We need not go deeper into this because, after all, in the end there will be an unequivocal mathematical statement of the second law".
We note that Maxwell (1868), in refuting Loschmidt, did not make use of the statement but argued that the arrangement could be turned into a source of energy, a second class perpetuum mobile. But the argument is incomplete.
II.10. The centrifuge and the atmosphere Kelvin justified the polytropic model of the atmosphere in terms of radiation and convection. Eddington discounted the role of convection and relied on a concept of radiative equilibrium. To find out what happens in the case of complete isolation we study the analogous situation in a centerfuge.
Consider an ideal gas. By a series of experiments in which gravity does not play a role, involving reversible changes in temperature and pressure, it is found that, at equilibrium, the laws p/ρ = RT and ρ ∝ T n are satisfied, constant n fixed. When supplemented by the laws of hydrodynamics, they are found to hold, or at least they are strongly believed to hold, in configurations involving flow, over a limited time span, in the absence of external forces. In addition it is believed that, at equilibrium, the temperature must be uniform. Let us refer to this last statement as "the rule". We have in mind a fixed quantity of gas contained in a vessel, the walls of which present no friction and pass no heat.
Let the walls of the vessel be two vertical, concentric cylinders, * and construct a stationary solution of the equations of motion. In terms of cylindrical coordinates, take v z = v r = 0, v θ = ω, constant. The continuity equation is satisfied with ρ any function of r alone. Then neither T nor p is constant, for the hydrodynamical equations demand that rω 2 = cT ′ , c = (n + 1)R ≈ 10 7 cm 2 /sec 2 K (for air).
At first sight, this does not seem to violate the rule, for this is not a static configuration. But when the equivalence principle is brought to bear, then it is argued, and we must concede, that the rule should be generalized to cover this situation as well.
* According to a recent experiment, it can! A recent preprint (Graeff 2008) describes an experiment, carried out over a period of several months, in which a persistent temperature gradient was observed in a column of carefully isolated water.
* To avoid the objection that the velocity potential may not exist as a one valued function in a non simply connected domain, we divide the available volume into wedges. This shape reduces convection and eliminates friction.
Instead, if we accept the foregoing calculations, and if we also accept the equivalence principle, then we shall be lead to expect that a vertical column of an ideal gas, in mechanical equilibrium under the influence of terrestrial gravity, and perfectly isolated, will have a pressure and temperature gradient exactly of the form predicted by Homer Lane. This contradicts the prevailing opinion of atmospheric scientists, that the temperature gradient owes its existence to the heating associated with solar radiation.
Further measurements in the atmosphere may throw light on this, but isolation is difficult. Experiments with a centrifuge may be more realistic. The temperature lapse rate is rω 2 × 10 −7 K/cm. If the acceleration is 10 000 g at the outer wall, then the lapse rate will be 1 K per 10 cm, using air. The question of the existence of a temperature gradient is the most urgent. Once this is resolved one way or another the approach to equiilibrium is worthy of an investigation.

III. Conclusions
On variational principles The principal reasons for preferring an action principle formulation of thermodynamics were stressed in the introduction. Here we add some comments.
Variational principles have a very high reputation in most branches of physics; they even occupy a central position in classical thermodynamics of Gibbs (1878), see for example the authoritative treatment by Callen (1960). An action is available for the study of irrotational flows in hydrodynamics, see e.g. Fetter and Walecka (1960), though it does not seem to have been much used. Without the restriction to irrotational flows it remains possible to formulate an action principle (Taub 1954, Bardeen 1970, Schutz 1970, but the proliferation of velocity potentials is confusing and no application is known to us.
In this paper we rely on an action principle formulation of the laws that are believed to govern the behaviour of an ideal gas, in the presence of gravity and radiation. We have restricted our attention to irrotational hydrodynamical flows. With a hamiltonian formulation there is a natural way to include the energy and pressure of radiation, to cover the whole range from a dense gas at low temperatures to a very dilute gas at the highest temperatures.
It was shown that there is an action that incorporates all of the essential properties that characterize an ideal gas, expressed as variational equations. The independent dynamical variables are the density, the velocity potential and the temperature. The idea of varying the action with respect to the temperature is unusual but much in the classical tradition and the integration of the theory with classical thermodynamics is complete (Section II.7). The hamiltonian gives the correct expression for the internal energy and the pressure.
It was shown, in Section II.7, that the action principle is fully integrated and compatible with thermodynamics, in particular, with Gibbs' extremum axioms of energy and entropy.
On isothermal atmospheres Into this framework the inclusion of a gravitational field is natural. Inevitably, it leads to pressure gradients and thus also temperature gradients. The theory, as it stands, predicts the persistence of a temperature gradient in an isolated system at equilibrium. The existence of a temperature gradient in an isolated thermodynamical system is anathema to tradition, and further work is required to find a way to avoid it, or to live with it. In the absence of experimentation, the question may be said to be academic, for it has little or no bearing on the application of the theory to actual atmospheres. But it touches on the basics of thermodynamics and it deserves to be settled, or at least debated. Here we shall try to summarize what it is that we feel is missing in the official position.
Suppose we start with a vertical column that, for one reason or another, is isentropic. At a certain moment we turn off the incoming radiation and isolate the gas column from its environmant. Assume that the column eventually becomes isothermal, and that the dissipation of the temperature gradient is a slow process during which the gas passes through a sequence of adiabatic equilibrium configurations. The question is this: what are those intermeduary configurations? For example, does the polytropic index reach the final value (infinity) continuously, or suddenly?

The alternative
The action principle advocated in this paper does not incorporate the heat equation: where A is related to heat capacity and the tensor C to conductivity.
Let us suppose that conductivity and related phenomena that contribute to C are very small, so that the time scale of diffusion is much longer than that of the adiabatic excitations described by the equations of motion. In normal atmospheres this is surely an excellent approximation. Then the heat equation will describe the slow cooling of the atmosphere that will set in when radiation is switched off, and the system will pass through a succession of configurations that we may take to be stationary and even static. For this to happen the equations of motion must contain a variable that parameterizes these configurations. Our lagrangian does in fact contain just one free parameter.
The constant k 0 appears in the hamiltonian in the term −RT ρ log k 0 , identified with entropy. As we shall see (Appendix), this is very much like terms that appear when the interaction of the gas with external fields (electromagnetism) is taken into account. The interpretation must be that natural losses cause the decay of k 0 and that the effect of the radiation that is incident on stable atmospheres compensate for this loss.
We have not been able erase all doubt about the fundamental rule, that equilibrium implies a uniform temperature in all cases. Tolman (1934, page 314) shows that, according to General Relativity, the temperature of an isolated photon gas in a gravitational field is not quite uniform. The predicted magnitude of this effect is very small, but it shows that there are circumstances in which statistical mechanics is not the absolute truth.
The interaction of the ideal gas with electromagnetic fields has been discussed in a provisional manner in the appendix. The transfer of entropy between the two gases is in accord with the usual treatment of each system separately. We found no suggestion that the interaction is responsible for the temperature gradient.

Suggestions
(1) We propose the use of the lagrangian (2.19), or its relativistic extension, with T treated as an independent dynamical variable and n ′ = n, in astrophysics . Variation with respect to T yields the adiabatic relations between ρ and T , so long as the pressure of radiation is negligible, but for higher temperatures, when radiation becomes important, the effect is to increase the effective value of n ′ towards the ultimate limit 3, regardless of the adiabatic index n of the gas. See in this connection the discussion by Cox and Giuli (1968), page 271.
In the case that n = 3 there is Eddington's treatment of the mixture of an ideal gas with the photon gas. But most gas spheres have a polytropic index somewhat less than 3 and in this case the ratio β = p gas /p tot may not be constant throughout the star. The lagrangian (2.11), with n identified with the adiabatic index of the gas, gives all the equations that are used to describe atmospheres, so long as radiation is insignificant. With greater radiative pressure the polytropic index of the atmosphere is affected. It is not quite constant, but nearly so, and it approaches the upper limit 3 when the radiation pressure becomes dominant. Eddington's treatment was indicated because he used Tolman's approach to relativistic thermodynamics, where there is room for only one density and only one pressure. Many kinds of mixtures have been studied, but the equations that govern them do not supplement Tolman's gravitational concepts in a natural manner, in our opinion. Be that as it may, it is patent that the approximation β = constant, in the works of Eddington and Chandrasekhar, is a device designed to avoid dealing with two independent gases.
(2) In a subsequent paper we make use of the platform that is provided by the action principle to study the stability of atmospheres. A useful, exact virial thgeorem is derived from the equations of motion. It is argued that expressions for the total energy are not enough to determine stability; what is needed is an expression for the hamiltonian, in terms of the dynamical variables of the theory. (Fronsdal 2009) (3) The theory has a natural extension to mixtures, incorporating the Gibbs-Dalton hypothesis, It is being applied to mixed atmospheres, to chemical reactions and to changes of phase. (Fronsdal 2010).
(4) Observation of the diurnal and seasonal variations of the equation of state of the troposphere may lead to a better understanding of the role of radiation in our atmosphere. The lapse rate has been measured from the equator to the poles, summer and winter. The presence of convection in the early hours of the day, known to gliders, reduces the lapse rate but interpretation is difficult. Observed reduction by as much as a factor of 2 in the lapse rate are also difficult to interpret since the variation may be due, in part, to unrecorded changes in the composition of the atmosphere. What is needed is a survey of the normalized lapse rate where µ is the mean atomic weight. An observed relative constancy of this parameter would support the expectations of the theory.
The temperature lapse rate has been observed under conditions that would not seem to favor it, between a snow covered surface and an inversion layer. This is difficult to reconcile with the traditional point of view.
(5) The centrifuge may be a more practical source of enlightenment. We understand that modern centrifuges are capable of producing accelerations of up to 10 6 g. Any positive result for the temperature gradient in an isolated gas would have important theoretical implications.

Appendix. Sources and entropy
A.1. Electromagnetic fields We write the Maxwell lagrangian as follows, and add it to the ideal gas lagrangian Since the susceptibility of an ideal gas is small, the dielectric constant may be expressed by Paramagnetic effects will be ignored at present. An interaction between the two systems occurs through the dependence of the susceptibility on ρ. The source S has become −( D 2 /2ρ)(κ/T ). If this quantity has a constant value then it produces a shift in the value of the parameter k 0 . Two interpretations are possible. The electromagnetic field may represent an external field, produced mainly by the source J, and affecting the gas by way of the coupling implied by the dependence of the dielectric constant on ρ. Alternatively, the field is produced by microscopic fluctuations, quantum vacuum fluctuations as well as effects of the intrinsic dipoles of the molecules of the gas. In this latter case the main effect of radiation is represented by the radiation term aT 4 /3. Our difficulty is that neither interpretation is complete, and that we do not have a sufficient grasp of the general case when either interpretation is only half right. The following should therefore be regarded as tentative.
Variation of the total action, with lagrangian L rad + L gas , with respect to A, D, H and T gives˙ Taking into account the first 3 equations we find for the static hamiltonian With the help of (A.7) it becomes H = d 3 x φρ + nRρT + D 2 2 + µ H 2 2 + aT 4 − d 3 x T D 2 2 ∂(T κ) ∂T . (A.8) The last term, from the point of view of the thermodynamical interpretation of electrostatics, is recognized as the entropy (Panofsky and Phillips 1955). On a suitable choice of the functional κ it merges into the internal energy. For example, if κ = ρT it takes the form ρT S with S = D 2 .
A.2. Using T as a dynamical variable Let us examine the total lagrangian, So long as ǫ, µ and J are independent of ρ, T and v, the variational equations of motion that are obtained by variation of v, ρ, A, H and D are all conventional, at least when n = 3 (for all n if radiation is neglegible). It would be possible to be content with that and fix T by fiat, as is usual; in the case of the ideal gas without radiation the result is the same. But if ǫ depends on ρ and on T , which is actually the case, then we get into a situation that provides the strongest justification yet for preferring an action principle formulation with T as a dynamical variable. The equations of motion include a contribution from the variation of ǫ with respect to ρ, so that one of the basic hydrodynamical equations is modified. Thus it is clear that the extension of the theory, to include the effect of radiation, is not just a matter of including additional equations for the new degrees of freedom. The presence of the term D 2 /2ǫ[ρ, T ] certainly introduces the density ρ into Maxwell's equations; that it introduces D into the hydrodynamical equations is clear as well. The over all consistency of the total system of equations can probably be ensured by heeding Onsager's principle of balance, but the action principle makes it automatic. Variation of the action with respect to T offers additional advantages. The usual procedure, that amounts to fixing ρ = kT n , k and n constant, gives the same result when radiation is a relatively unimportant companion to the ideal gas, but in the other limiting case, when the gas is very dilute and the material gas gas becomes an insignificant addition to the photon gas, it is no longer tenable. We need an interpolation between the two extreme cases and this is provided naturally by the postulate that the action is stationary with respect to variations of the temperature field.
In the absence of the ideal gas we have another interesting system, the pure photon gas. The analogy between the photon gas and the ideal gas is often stressed; there is an analogue of the polytropic relation that fixes the temperature in terms of ρ; the pressure of the photon field is (a/3)T 4 . Our lagrangian already contains this pressure; we should like to discover a closer connection between it and the electromagnetic field. In the limit when the density of the ideal gas is zero, Eq.(A.7) becomes − D 2 2 ∂κ ∂T + 4a 3 T 3 = 0.
In the absence of the gas it is reasonable to impose Lorentz invariance, so we include magnetic effects by completing the last to − F 2 2 ∂κ ∂T + 4a 3 T 3 = 0.
If we suppose that κ[ρ, T ], in the limit ρ = 0, takes the form αT 2 , then The radiation from a gas of Hertzian dipoles can be shown, with the help of the Stefan-Boltzman law and Wien's displacement law, to satisfy a relation of precisely this form.
Whether the same relation holds in vacuum is uncertain, but it is suggested by an analysis of the effective Born-Infeld lagrangian calculated on the basis of the scattering of light by light (Euler 1936, Karplus andNeuman 1950). See also McKenna and Platzman (1962), Fronsdal (2007).