The Carnot Cycle, Reversibility and Entropy

The Carnot cycle and the attendant notions of reversibility and entropy are examined. It is shown how the modern view of these concepts still corresponds to the ideas Clausius laid down in the nineteenth century. As such, they reflect the outmoded idea, current at the time, that heat is motion. It is shown how this view of heat led Clausius to develop the entropy of a body based on the work that could be performed in a reversible process rather than the work that is actually performed in an irreversible process. In consequence, Clausius built into entropy a conflict with energy conservation, which is concerned with actual changes in energy. In this paper, reversibility and irreversibility are investigated by means of a macroscopic formulation of internal mechanisms of damping based on rate equations for the distribution of energy within a gas. It is shown that work processes involving a step change in external pressure, however small, are intrinsically irreversible. However, under idealised conditions of zero damping the gas inside a piston expands and traces out a trajectory through the space of equilibrium states. Therefore, the entropy change due to heat flow from the reservoir matches the entropy change of the equilibrium states. This trajectory can be traced out in reverse as the piston reverses direction, but if the external conditions are adjusted appropriately, the gas can be made to trace out a Carnot cycle in P-V space. The cycle is dynamic as opposed to quasi-static as the piston has kinetic energy equal in difference to the work performed internally and externally.


Introduction
The Carnot cycle is the foundation upon which modern thermodynamics has been built, but we owe our modern understanding not to Carnot but to Clausius. Carnot had framed his theory of the heat engine in terms of caloric, the invisible, indestructible material that was believed to be heat, but Clausius re-worked Carnot's ideas to take into account not only the notion then emerging that heat was a form of motion, but also the idea that heat and work were equivalent [1]. Although later developments by Caratheodory, aimed at putting thermodynamics on a more mathematically sound footing, and the development of irreversible thermodynamics in the second half of the twentieth century, would seem to have reduced the dependence on the foundations laid down by Clausius, the modern notions of reversibility and entropy are still those laid down by Clausius in the nineteenth century. As Planck made clear in 1926 [2], even the commonly quoted form of the Second law is due to Clausius: there is a property of thermodynamic systems called entropy that is either constant or increases in all changes of the system. This is not the original form in which Clausius expressed the Second Law: heat cannot pass from a colder to a hotter body without some other effect occurring at the same time. In fact, it is not clear that these two forms are equivalent, whereas Clausius's original form is equivalent to Kelvin's statement: it is impossible to convert an amount of heat completely into work in a cyclic process in the absence of other effects. The cyclic process is central to both Kelvin's and Clausius's original statement because they were formulated with reference to heat engines. Indeed, Zemansky uses two ideal Carnot engines working in tandem, one operating as a heat engine and the other as a refrigerator, to show that the two are equivalent [3]. How, then, do we make the transition from laws developed with reference to cyclic processes to a form of the law applicable to non-cyclic processes?
The answer lies in Clausius's Sixth Memoir, published originally in 1862. This and eight of Clausius's other papers on thermodynamics originally published between 1850 and 1865 [4] were published together in one volume in 1867. Each paper in the collection is referred to as a memoir and the whole collection describes the evolution of his thinking from his re-working of Carnot's theory to his development of entropy. It is in the Sixth Memoir that he describes his thinking about the extension of the Second Law, originally given in the Fourth Memoir, to non-cyclic processes and the function he later came to name as entropy in the Ninth Memoir. It is not intended here to present a detailed historical analysis, but to present an alternative view of the Carnot cycle and to explore the implications for both entropy and reversibility. However, some historical analysis is essential as there are some peculiarities with entropy that can only be understood with reference to the origins of the concept.
For example, it appears impossible to attach a physical meaning to the thermodynamic entropy. This would appear to be a bold statement given the place that entropy assumes within thermodynamics. The development of irreversible thermodynamics in the second half of the twentieth century is founded upon the principle of entropy production, but exactly what is being produced and how is not clear. Yet, this is crucial. If we are to assert that entropy is a physical property of a system in a given physical state and therefore increases when the system changes from one state to another, we are entitled to ask, What is the mechanism? What is the cause and what is the effect? If we cannot answer those questions, do we conclude that entropy is not a physical property of a physical system, despite the acceptance of such ever since Clausius? The idea that entropy is a property of matter is one of the founding principles of irreversible thermodynamics, as laid down by DeGroot and Mazur [5]. An entropy per unit mass is defined and the total entropy of the system is then simply the integral of the specific entropy over all mass in the system. Moreover, it is possible to define an entropy flow through the transport of matter by diffusion and convection. More recent developments in irreversible thermodynamics have attempted to treat reversible and irreversible processes alike by mapping a space of non-equilibrium states on to the space of equilibrium states and by defining non-equilibrium quantities such as a contact temperature, which determines the entropy exchange with the environment arising from heat flow [6].
These are complex mathematical ideas that have the potential to treat complex irreversible phenomena, but still they depend on the notion that entropy is a property of matter and that it is produced in an irreversible process. In addition, a question arises over the physical nature of a non-equilibrium state. Whereas it is possible, in the case of a gas, for example, to point to an equilibrium state as particular set of coordinates on a graph of pressure against volume, no such identification is possible for a non-equilibrium state. By the very definition, a non-equilibrium state is transient. Properties such as pressure and temperature are equilibrium concepts so whilst it might be possible to define local effective quantities that allow for calculation of heat flow or work done during a particular process, it is not possible generally to define effective values for the state itself. Quite what a non-equilibrium state is and how it maps on to equilibrium states are questions that would appear to be answerable with reference to mathematics rather than physics.
So, what is entropy? Leff recently explored of the energy spreading metaphor as a way of understanding entropy [7], and was unable to come to a firm conclusion. Leff's paper is interesting in as much as it has primarily a pedagogical focus and his inability to come up with a clear conceptual model of entropy to help students understand the concept is telling. He described the energy spreading metaphor as an interpretive tool but raised many questions which remained unanswered. More significantly, Leff quoted two authors, Čápek and Sheehan, from their book, Challenges to the Second Law of Thermodynamics-Theory and Experiment [8]: "Entropy remains enigmatic. The more closely one studies it, the less clear it becomes. Like a pointillism painting whose meaning dissolves into a collection of meaningless points when observed too closely, so too entropy begins to lose meaning when one contemplates it at a microscopic level". The idea that, microscopically, entropy loses its meaning is profoundly disturbing. In this author's view, the enigmatic nature of entropy goes beyond a loss of meaning at the microscopic level to a multiplicity of meanings at the macroscopic level. It seems impossible to settle on a single interpretation that satisfies all circumstances and in this paper, I will highlight some of the inconsistencies prior to tracing their origin back to Clausius. This will then set the context for a re-evaluation of the concept on entropy, the Carnot cycle and the notion of reversibility.
Following on from the discussion on irreversible thermodynamics, the first inconsistency to be addressed is the notion of additivity. One of the axioms of the nonequilibrium approach in [6] is that the entropy of the subsystem and its reservoir are additive. This seems perfectly reasonable and is certainly justified from a probabilistic view. The author has investigated the connection between thermodynamic entropy and accessible states in simple systems and shown that in an ideal gas it is possible to define a single-particle entropy in a system thermally connected to a heat reservoir [9]. However, this single-particle entropy does not resolve Čápek and Sheehan's concern over a microscopic meaning because it arises from the possible states of motion available to the particle rather than in some intrinsic property of matter. Nonetheless, entropy is additive. On the other hand, the Gibbs paradox leads to a different conclusion.
The Gibbs paradox highlights a problem that stubbornly refuses to be solved and even now, well over 100 years after Gibbs published his seminal work on statistical mechanics, papers are still being written about the topic. In its simplest form, it is taken to be a problem in the mixing of gases, but in fact it has nothing to do with mixing, as the following shows. A chamber of total volume 2V, has a partition down the middle separating the chamber in two. Two gases, say A and B, each with N particles, are contained in the different halves at the same temperature and pressure and on removal of the partition the gases inter-diffuse. Both the thermodynamic and statistical entropies increase. However, the entropy increase for each gas can also be arrived at by considering the expansion of each gas into an equal empty volume upon removal of the partition This implies that the entropies of the two different gases, S(A) and S(B), are additive. The fact of mixing is therefore irrelevant. However, if the two halves contain the same gas, whether A or B, the extensivity property of entropy requires the entropy of the total to be the sum of the entropies of the two halves. In other words, entropy doesn't increase when the partition is removed. However, this same final state could be achieved by having all the gas, 2N particles, in one half of the system and allowing it to expand freely. As this is an irreversible process, the entropy must increase, which means that the entropy of 2N particles in a given volume at a given temperature must be less than twice the entropy of N particles in the same volume at the same temperature. Unlike the entropy of two different gases occupying the same volume, the thermodynamic entropy of a single gas within a given volume is not additive.
This leads to a different paradox. Gibbs' asserted that a small part of a larger system is canonically distributed with respect to the rest of the system. For a canonically distributed system, energy fluctuates between the system and the reservoir and for a gas this means that each particle has access to the full range of velocities allowed by the Maxwellian distribution. The N-particle Mazwellian distribution of velocities is simply the product of N single-particle Maxwellians and transforms exactly to the Gamma distribution of energies. Unlike the canonical distribution, the Gamma distribution takes into account the density of energy states available to the system and therefore provides a physical description [10] of the probability that a small system lies in a given energy state [11]. The author has investigated this aspect of small systems by means of computer simulations of gases using the hard sphere approximation and confirmed that the energy state of a small part of a larger system is indeed given by the Gamma distribution, thereby confirming, by implication, that a small part of a larger system is canonically distributed. Therefore, its entropy is well defined. It follows that any given ideal gas can be subdivided into a large number, say m, of identical smaller systems, each of which is canonically distributed with respect to the other m -1 systems, which collectively act as the reservoir. As each small system has a well defined entropy, the total entropy of the system should simply be the sum of the entropies of each of the m sub-systems, but if entropy is not additive the entropy of any combination of the m -1 systems acting as the reservoir cannot be the sum of the individual entropies of each of the sub-systems. This difficulty over extensivity vs additivity arises from the spatial component, or volume-dependence, of the entropy rather than the thermal component, or the dependence on temperature. Thermodynamically, it is difficult to separate out the thermal component of entropy from the spatial component because of the role that work plays in the First Law, but in statistical entropy the probability that a particle of a gas has a given speed or energy is entirely independent of its position or the volume available to it. In a canonically distributed system, the temperature of the reservoir determines which velocity states are accessible to the particles and the contribution of this probability distribution to the entropy is additive [9,12]. The nonextensity in statistical entropy, and by implication the Gibbs paradox, arises from the spatial component of the entropy and Planck's solution effectively operated on this component. Planck assumed that the states are overcounted because the particles are indistinguishable. The probability of finding a point particle in a volume element dV is simply V -1 so that the integral over all space is normalised. This leads to the number of ways of distributing N-particles as the inverse of the N-particle probability, V N . Planck argued that if the particles are indistinguishable, the number of ways of distributing the particles over the volume is,

= !
(1) Using Sterling's approximation for ln[N!] effectively normalises the volume to the number of particles and does not result in an increase in entropy in the Gibbs paradox. However, it leads to a lack of additivity because as more particles are added the effective volume per particle decreases.
Arguably, a single-particle probability of V -1 is unphysical in so far as it is based on the assumption of point particles that have no intrinsic volume and therefore allows the possibility that all the particles could occupy the same volume element dV. One way round this would be to treat the particles as impenetrable hard spheres and to divide the available volume into cells of size such that only one particle can occupy a given cell at any one time [13]. If M is the total number of cells and N is the number of particles, simple combinatorics gives the number of possible arrangement as If σ is the volume of a single particle such that M=V[Nσ] -1 , then for a dilute gas, such that M>>N, the entropy approximates to

= ln[ ] ≈ ln [ ] − ln
(3) This is essentially the same dependence on volume that follows from equation (1) and appears to confirm that statistical entropy is extensive in line with thermodynamic entropy. However, at higher densities such that N approaches M , the statistical entropy in (3) would cease to agree with the thermodynamic entropy owing to another term in the volume that becomes appreciable under these conditions. As a resolution to the Gibbs paradox, it is not entirely satisfactory and still does not overcome the difficulty, present in both the thermodynamic entropy and the statistical entropy, that extensivity is incompatible with additivity. A gas expanding freely into vacuum must increase its entropy according to all current understanding and as the final state in the Gibbs paradox can be achieved through 2N particles expanding from V into 2V it follows that 2N particles in a given volume at a given temperature must have less than twice the entropy of N particles in the same volume at the same temperature.
It is quite possible that the Gibbs paradox is not a paradox at all. A true paradox implies an inconsistency or contradiction, but the Gibbs paradox simply points out that the statistical and thermodynamic entropies calculated under a given set of circumstances are sometimes different and sometimes the same, depending on the distribution used. A statistical entropy can be defined for any proper probability distribution regardless of whether the distribution has any connection with thermal phenomena. Certain distributions yield entropy functions that appear to have identical mathematical forms to thermodynamic entropy, implying some sort of connection between thermodynamics and statistical mechanics, but it is not in itself proof that the two are equivalent.
The change in entropy on a free expansion of a gas is itself problematic. This process was used by Clausius himself in his Sixth Memoir when he developed the function which he later called entropy in the Ninth Memoir. He recognised that there is a state function and as such it must increase during a free expansion. The question which Clausius did not consider, and which, to this author's knowledge has not been considered since, is whether the property of a state in thermodynamic phase space, which is essentially a mathematical idea, is also a property of a body in that same thermodynamic state. There are two essential difficulties. First, the failure to attach a physical meaning to thermodynamic entropy as a property of a body means that we have no idea what is increasing, what the physical mechanism is, or what the physical consequence is. Statistically, there is no difficulty: entropy increases because the particles have access to a greater volume and the uncertainty over their location increases. Secondly, there is no change in energy during the free expansion. It would not be fair to say that Clausius overlooked conservation of energy in his thinking on entropy because the concept of energy wasn't well developed at the time, but his thinking wasn't consistent with the notion of energy conservation as it later came to be understood. It will be shown below that entropy as formulated by Clausius conflicts with energy conservation as expressed in the First Law. In order to understand this, some analysis of Clausius'swriting is necessary.
The modern reader attempting to understand Clausius's writing faces two difficulties: first, his writing style is cumbersome and consequently his meaning is not always clear and, secondly, his view of heat does not correspond to the modern view. The idea of "heat as motion" was taken literally by Clausius and he wrote of heat as though it was what was later understood as internal energy. Although Clausius was aware of the notion of internal energy, and indeed he appears to have been the first to write the mathematical form of the Fist Law in his First Memoir [1] (p29), he put the emphasis on heat rather than internal energy. In the First Memoir, for example, he described the heat absorbed by a gas as being decomposed into two portions, one of which is U and the other external work. U comprised "the sensible heat and the heat necessary for internal work". In the Ninth Memoir, he acknowledges that Thomson proposed the term energy for U, but in line with his previous thinking he also retained the phrase, "thermal and ergonal content", ergon being the term Clausius used for work. For Clausius, heat rather than energy was the principle quantity of interest. In the Fourth Memoir [14] (p115) he described a quantity of heat absorbed by a body, Q , as being divided into three parts: the first is "employed in increasing the heat actually existing in the body", the second producing the "interior" work and the third producing the "exterior" work. The distinction between interior and exterior work is crucial to understanding the development of entropy and may be understood as the work done internally by particles moving against inter-particle forces or externally by a gas acting on a piston or some other device.
A modern reader trying to interpret Clausius from the modern perspective will more than likely find Clausius confusing in many respects, but a shift in perspective to heat as kinetic energy removes all the confusion. For example, in describing entropy in the Ninth Memoir [15] (p355) he had written, ∫ = ∫ + ∫ (4) He described H as denoting, "the heat actually present in the body, which, as I have proved, depends solely on the temperature of the body and not on the arrangement of its parts". The first integral on the right therefore leads to, "a magnitude which is perfectly defined by the present condition of the body". The quantity H is effectively the kinetic energy of the particles. In an ideal gas the kinetic energy is equivalent to the internal energy, but Clausius intended his description of H to be generally true, prompting Maxwell to write in 1876 [16]: "With respect to our knowledge of the condition of energy within a body, both Rankine and Clausius pretend to know something about it. We certainly know how much goes in and comes out and we know whether at entrance or exit it is in the form of heat or work, but what disguise it assumes when in the privacy of bodies … is known only to R., C. [Rankine and Clausius] and Co..".
Of the quantity, Z , in the second integral, this was defined in the Sixth Memoir as the disgregation: it "depends on the arrangement of the particles of the body". Clausius was led to consider the arrangement of particles from what he called, "the separative force of heat". This is where the internal work comes into consideration. In changing the arrangement of particles, internal work must be done and this requires heat. The disgregation is an odd concept that has disappeared from the thermodynamic lexicon, but is central to Clausius's development of the concept of entropy and central to the difficulty over energy. Clausius based his argument on entropy as a state function on the notion that around a closed cycle, the integral of all changes in Q/T is zero. Mathematically, The inequality applies to irreversible cyclic processes and the application to cyclic process is strict and important.
For Clausius, there was no essential distinction between cyclic and non-cyclic processes as a reversible cycle is made up of separate, reversible processes. In the Sixth Memoir, he wrote: "since there is no essential difference between interior and exterior work, we may assume almost with certainty that a theorem which is so generally applicable to exterior work cannot be restricted to this alone, but that, where exterior work is combined with interior work, it must be capable of application to the latter also" [17] (p219). The theorem applicable to exterior work is equation (5) and Clausius sought an inequality equivalent to (5) that would apply to irreversible processes based on interior work.His thinking is set out in the Sixth Memoir.
Clausius acknowledged that he did not have enough information to tackle the problem at the microscopic level and therefore chose to address the issue through internal work's relation to heat. Clausius gave both reversible work and reversible heat a special status within his thinking. Reversible heat flow is isothermal and reversible work occurs when the external pressure matches the internal pressure, which he described as the force of the heat. As Clausius regarded heat as the cause of expansion (the separative force referred to earlier) he considered an external pressure not only to be capable of reversing the effect of heat smoothly and continuously, but also to be a measure of the force of heat. In order to express this mathematically, Clausius needed to combine internal and external work into a single quantity. However, he had previously incorporated internal work into U and therefore proceeded to split U into its two constituent components: the actual heat present in a body, H, and the internal work, I. This shows the importance he placed on heat over internal energy in his thinking. He then combined the internal and external work into the disgregation, Z , and noted that in an irreversible process the external work is always algebraically less that the reversible work. In compression over a small volume change, for example, the work done on a gas is greater in magnitude than PdV, but the external work done is negative to represent the action of the external force against the internal force. In expansion the work is positive, but smaller in magnitude than PdV. Therefore, = + ≥ + The entropy change therefore becomes, In order to illustrate the idea of a state function, Clausius discussed in the Sixth Memoir replacing the isothermal expansion in a Carnot cycle with the free expansion. In the context of a heat engine, this makes no sense. There is no heat taken in and no work performed, but Clausius does not appear to have recognised this difficulty. According to equation (5), the sum of all changes in dQ/T must be negative and this is illustrated in figure 1, which shows a schematic 3-D plot of U, V and δQ/T for both the reversible and irreversible cycles. The Carnot cycle is shown in (a) by the path ABCD and the cycle incorporating the free expansion is shown in (b), by the path EFGHI. It should be apparent that the dQ/T in equation (5) must be different from the dQ/T in equation (7). The latter is a state function and the former self-evidently is not. This is a distinction that Clausius did not recognise. He regarded the heat content of a body as a property of that body at a given temperature and for him the function dQ/T was a property of a body. It should be clear to the modern reader, however, that in equation (5), dQ/T is negative because there is a nett outflow of heat. In the case of the free expansion, the initial state can only be reversed by compressing the gas and extracting heat to ensure that the temperature is returned to the initial condition. Hence, δQ/T is negative and equation (5) is fully consistent with energy conservation and the First Law. On the other hand, dQ/T in equation (7), which is a state function, is a mathematical property of P-V diagrams based on differential geometry. Making the assumption, as Clausius did, that this state function is also a physical property of a body in that thermodynamic state requires that that in any irreversible transformation entropy must increase. Yet, there would appear to be no physical mechanism, no cause and no measurable effect. Moreover, TdS has the units of energy, so some property of the body with the units of energy is increasing in a way that is not consistent with the First Law.
The physical meaning of an inequality in energy for a single process is open to question. It is one thing to assert that the work done is different from the work done in a reversible process, it is quite another to combine this with other quantities and define this as a property of a body. This difficulty persists to the present day. We have, However, dU is also defined by the energy changes that actually occur: Therefore, (10) For irreversible processes, the magnitude of dWrev exceeds dW and the sign of work processes relative to change in volume means that the difference will always be positive, hence > . In the case of a gas, the reversible work is usually taken as PdV. In the free expansion, dQ=dW=0 as the particles are expanding freely into a vacuum. Therefore, there is no change of momentum and no force. This leaves TdS=PdV.
As far as Clausius was concerned, the effect of an external pressure was to match the "separative force" of the heat, as illustrated by the following from the Sixth Memoir [17](p223): "The mechanical work which can be done by heat during any change of arrangement of a body is proportional to the absolute temperature at which this change occurs." This was followed immediately by: "The law does not speak of the work which the heat does, but of the work which it can do; and similarly, in the first form of the law, it is not of the resistances which heat overcomes, but of those which it can overcome that mention is made." Clausius himself emphasised the terms in bold. The resistance that heat can overcome is an external pressure, P, that matches the internal pressure, resulting in work PdV. However, the First Law is not concerned with potentialities, but with work that is done and heat that does flow. PdV is a work term and therefore implies a change in energy, but it does not correspond to work done, and therefore the changes in energy, in an irreversible process. If entropy is a property of a body that changes in accordance with PdV, it is changing in a way that is not consistent with energy conservation in irreversible processes for which the work, dW<PdV.
Difficulties with energy conservation can also be found in the dependence of entropy on particle number, as expressed by the chemical potential. Suppose a system containing an ideal gas comprising N particles in a volume V at temperature T. Imagine we can add a small number of particles, dN. The volume, V is allowed to increase so that the system remains at the same temperature. Therefore, U, N and V are all increased by the infinitesimal amounts dN, dU and dV such that, = = = (11) It follows from the definition of extensivity, namely that S is a homogeneous function of degree 1, that the difference in entropy is dS=αS. In addition, the wellknown Gibbs relation gives, = + − (12) Suppose that the system is compressed isothermally to its initial volume. The work done is PdV and TdS decreases accordingly. Therefore, from equation (12), = − (13) However, the change in internal energy is due only to the extra particles. If ϵ is the average energy per particle, then it follows that, = ( − ) (14) Equation (14) implies that for any value μ≠0, there is some property of the gas with the units of energy, TdS, that is changing in a way that is not consistent with the actual energy changes.
Clausius's thinking behind entropy, particularly his thinking on reversibility, has implications for the Carnot cycle. Modern thermodynamics reflects Clausius's view that a reversible cycle is made up of processes which are themselves reversible, but Clausius's view of reversible work was based on the idea of reversing the separation between particles, which he believed to be a consequence of the separative force of heat. He acknowledged that strictly, when force and counterforce are equal, no work can be done, but he nonetheless believed PdV to be a limiting case that could be envisaged. On the other hand, if a step-change in pressure is required to initiate a change of state through work, Clausius's view of PdV as a limiting case would appear to be invalid. The author has shown by means of kinetic simulations [19,20] that internal mechanisms of damping exist in an ideal gas and it is not necessary to appeal to friction at the piston to damp what would otherwise be an indefinite oscillatory motion.
The existence of internal damping means that it is possible to consider work processes in idealised systems comprising frictionless, thermally insulating pistons. In this paper, a macroscopic formulation of these internal damping mechanisms based on rate equations is presented. These allow the rate of exchange of energy with the environment, either through work or heat flow, to be coupled to the rate of damping and are solved numerically. Such work processes appear to be intrinsically irreversible and it is shown that there are no circumstances in which a step change in external pressure leads to work approximated by PdV. Crucially, however, under idealised conditions of no damping, the system maps out a trajectory through the space of equilibrium states. The trajectory is reversed as the piston motion is also reversed and, with appropriate adjustments to the external conditions, an ideal gas can be made to execute a reversible Carnot cycle. The cycle is dynamic rather than quasi-static and appears to be closer to Kelvin than Clausius. Kelvin is especially clear that in referring to "work done or the mechanical effect produced", it is in the context of "complete cycles of a periodic engine" [18] (p114). The implication is that the cycle itself should be considered reversible and it is the purpose of this paper to show how such a reversible cycle can be realised without recourse to quasi-static processes. The connection between entropy changes in such a cycle and the mathematical notion of entropy as a state function are discussed.

The thermodynamics of an ideal gas based on rate equations
Consider the situation depicted in figure 2. A cylinder containing an ideal gas is aligned with the x-axis of a 3-D Cartesian coordinate system and open at one end. It has a piston with its gas-facing surface located instantaneously at position xp. The piston is moving with a velocity vp, which can be either positive or negative. Taking the gas in the left hand side of the piston only, at any instant the kinetic energy of a single particle can be regarded as the algebraic sum of three terms associated with the component of the motion along each axis and the sum over particles of each of the three separate terms is just the total kinetic energy. As the gas is ideal, there is no interaction with other particles or with the walls except through collisions and within the piston the internal energy is equal to the kinetic energy: that is, Equilibrium is defined by (16) Apply this now to the rate at which work is done. In reality, the interaction between the particles of a gas and the wall of a container, including the surface of a piston, are quite complex. In kinetic theory it is usual to regard collisions between the particles and the wall as elastic, but a moment's reflection will show that this cannot be the case. Whatever might be happening at the microsopic scale, whether particles are first adsorbed and then emitted at random or interact directly with vibrational modes (phonons) in the chamber wall, macroscopically it must be possible for energy to be transferred from the wall to the gas and vice versa, depending on the relative temperatures. Otherwise, it would not be possible for a gas at a different temperature from the walls of a chamber to thermalise with the chamber. For a gas interacting with a moveable piston there are two effects to consider: an exchange of heat between the gas and the piston and the transfer of momentum in order to allow the piston to move. As the total energy must be conserved, the two are connected and for the purposes of modelling the piston motion it is simpler to assume that no heat is transferred. That is to say, the collisions are elastic and only the conservation of momentum need be considered.
It follows from the preceding that only the component of particle velocity in the direction of the motion of the piston is affected and the component of velocity perpendicular to the plane of the piston remains unaffected. It will be apparent, therefore, that the action of gas particles on the piston will lead to a loss of equilibrium within the gas in as much as ≠ 3 (17) Two consequences follow from this. First, there must be some mechanism of relaxation within the gas to restore equipartition and secondly, while the gas is out of equilibrium the pressure acting on the piston will be different from the equilibrium pressure given by the equation of state. The effective pressure can be found by looking at the mechanics of a collision between a gas particle, say an atom, with mass ma and velocity ua, and a piston, with mass mp and velocity up. Conservation of both momentum and kinetic energy leads to well-known expressions for the velocities after the collision, respectively va and vp , given by, The mass of the piston is of course much greater than the mass of the particle so for the atom, If up is positive, ie. moving in the same direction as the impinging atom, then | | < | |. In other words, a gas particle loses energy on each collision. Generally, ua,>> up so the effect is quite small for each individual particle, but as even a small volume contains a very large number of particles the collective effect is to cool the gas as it does work on the piston. Other the other hand, if up is negative and the piston is moving towards the gas particles, the gas gains energy as work is done on it.
By Newton's 3 rd law, the magnitude of the force acting on the piston is just the rate of change of momentum of the atoms. The change in momentum of a single atom is, − = 2 − 2 (20) Suppose N‫׳‬ atoms collide with the piston in a time Δt. The direction of the force is in the opposite direction to the change in momentum of the gas particles, so, In order to find N‫,׳‬ assume the gas contains 6N atoms/unit volume, all travelling in different directions with a range of speeds. A sample of those 6N atoms close to the piston will collide with it. If the probability of finding an atom with a component of velocity in the positive x-direction between u and u+du is p(u)du, then it is clear from (21) that the total force taken over all the atoms in N‫׳‬ will depend on the average speed provided we ignore those atoms for which ua,< up, as these do not collide with the piston and therefore do not contribute to the force. Strictly, excluding these atoms would require some renormalisation of the probability distribution, but for simplicity we ignore that and move to a model in which we regard all the atoms as travelling with the same average speed. We can therefore divide the 6N atoms into N atoms each travelling in the positive and negative x, y and z directions. The average speeds in each of the different directions will in general be different and in both the positive and negative x directions there could also be a spatial dependence as atoms that have collided with the piston propagate through the system. Collisions between particles will smooth out these differences as energy is redistributed among the different degrees of freedom, but any differences in the total momentum in the atoms induced by collisions must remain.
If all the atoms within a short distance ∆l travelling with an average speed ua collide Therefore, Putting where, Ex + is the kinetic energy of the atoms associated with motion in the positive x direction, ie. towards the piston, we have, Particles that have impacted on the piston will have had their momentum altered, as described above, and, strictly, Ex + will be different from the kinetic energy of the atoms moving in the opposite direction, denoted by Ex -. In a kinetic model, this would automatically be accounted for through knowledge of the individual velocities of the particles as they propagate through space and collide with other particles and the walls of the chamber. In a macroscopic formulation the loss of information about individual momenta and their changes in both space and time means that it will be very difficult, perhaps impossible, to keep track of the differences between Ex + and Exin both time and space. Out of necessity, the differences between Ex + and Exare ignored and instead Ex , the total energy associated with the velocity components in both the positive and negative directions, is used.
In effect, = 2 + (25) and = 2 (1 − ) (26) Therefore, the effective pressure acting on the piston is not the intensive quantity in classical thermodynamics but a one-dimensional, dynamic quantity that depends not only on the properties of the particles, via their energy, but also on the speed of the piston.
If the external pressure on the right-hand side of the piston in figure 2 is Pext, the nett force on the piston is, The rate at which work is done on the piston is, The two terms on the right-hand side of equation (28) are recognisable as the rate of work done on or by the gas, depending on the sign of dxp, ⁄ and on or by the external load, ⁄ . For a gas is in equilibrium the energy is partitioned equally among the degrees of freedom, but changes in Ex at the piston will change the internal energy and the system will be out of equilibrium, in the sense given by equation (17). The exchange of energy between the different degrees of freedom, say Ex, and, for example, Ez, can be described by the rate equation, An identical expression applies to scattering into Ey denoted by the process variable, Exy. The constant, αz, in (29) is a variable parameter equivalent to an inverse time constant. Thus, for example, if < 3 energy is scattered out of the x-direction and into the zdirection. Energy conservation requires, The subscript on the left-hand side denotes that only changes to Ex brought about by scattering are being considered in (30). In addition to scattering, heat can flow in from the external walls and affect the total energy. Consider heat flow from the y-z plane into x, ie. the wall opposite the piston on the left of figure 2. This affects Ex. The one-dimensional rate of heat flow can be defined as where Twall is the wall temperature and is equal to the starting temperature of the gas, ∝ ℎ is again a variable parameter equivalent to an inverse time constant, 2 is a onedimensional heat capacity and the 1-D equivalent temperature, Tx, can be defined from kinetic theory as (32) Tx is the effective temperature associated with motion in the x-direction and is greater than, or less than, the equilibrium temperature of the gas according to whether Ex is greater than, or less than, 3 . Heat flow from walls in the y-x and z-x planes into Ez and Ey respectively can be expressed in the same manner. Under these assumptions, namely that: 1. heat flows into the system from walls through inelastic collisions; 2.
the collisions with the piston are perfectly elastic and therefore only the x component of velocity is affected; then (33c) These equations can be solved numerically by a simple forward difference time-step, with the time-step, t, being reduced until a stable solution is achieved. Then, the heat entering the system from the y-z wall is (34) It is evident that the upper limit corresponds to ideality: that is, for ∝ ℎ = 1, heat flow is instantaneous and the gas temperature remains constant and for ∝ = 1 , equipartition occurs instantly and the gas is always in internal equilibrium. In reality, both h and z are properties of the gas and its interaction with its surroundings and are therefore independent of t, but in as much as they are unknown, they can be varied at will in the simulations. This does mean, however, that this approach is not suited to an exploration of the dynamical evolution of such systems as the evolution depends not only on the choice of scattering parameters, h and z, but on knowledge of the spatial variation of both energy and particle densities as well as the flow of momentum. The more complex computational approaches of irreversible thermodynamics [21] are probably better suited to this kind of in-depth exploration. Here, the emphasis is on the final state and as will be shown in the next section, the final state depends only on the equality of internal and external pressures and is independent of the dynamics of the system.

Step changes in pressure
We start with a small, but finite change in external pressure in order to show, first, that the macroscopic formulation presented above reproduces the results of the kinetic simulation in which it is based, and, secondly, to investigate the nature of irreversibility in a simple thermodynamic system. Equations (26) to (34) were solved numerically using purpose-written code run in a 64-bit implementation of Python 3.8 for a system comprising an ideal gas with an atomic mass of 20, the same as Ne, initially at standard temperature and pressure. The choice of volume and piston starting position were arbitrarily chosen to correspond to a cylinder of cross-sectional area 1 cm 2 with a piston initially located at xp=10 cm. The mass of the piston was calculated by specifying its thickness as a variable and using the density of aluminium as typical metal from which such a piston might be made.
The mass of the atoms allows the calculation of a mean particle speed in equation (26). As N/3 particles are assumed to be travelling along the x-axis, this mean speed was updated with each change in Ex according to, (35) The rate equations were solved by a simple process of forward time step so that the differentials become finite differences in the manner of equation (34). Equation (27) was used in conjunction with Newton's 2 nd law to calculate the acceleration of the piston. With a small enough time step the acceleration can be assumed constant and the distance travelled by the piston in the time step is easily computed. The work done on or by the gas is then calculated from knowledge of the pressure and the change in volume and Ex adjusted accordingly. For simplicity, only heat flow from the rear wall in figure 2 was permitted and the only changes to Ey and Ez considered are those due to scattering, with the additional assumption that Ez = Ey at all times. For adiabatic processes, h is set to zero.
This assumption makes clear the idealized nature of adiabatic processes. Ordinarily, the walls of any container will have a much larger heat capacity than the gas contained within it and can act as a reservoir, exchanging energy with a gas within, even if it is lagged to prevent heat flow from outside. The assumption of h =0 is an idealization that limits the system under consideration to the gas and the piston alone. The only interaction between the piston and gas is through the exchange of momentum which changes the temperature of the gas, but not the piston. The piston is therefore a mechanical device which acts as a repository for the difference in work done within the gas and the exterior pressure. Setting h >0 is a device that connects the gas to a heat reservoir and allows the final temperature to equal the initial temperature.
The initial temperature was set to 295K and the pressure to 101325.0 Pa. This allows the total number of particles to be calculated and the equilibrium starting value of Ex. Both expansion and compression from this starting state were modelled by setting the external pressure to be a factor (1±β) of the internal pressure, where -0.1≤β≤0.1 in steps of 0.01. The time step was set to δt=10 -9 s, which is small enough to give stable results. Figure 3 shows the piston position as a function of time for β=0.5, corresponding to an external pressure of 106391.25 Pa, with h =0 and z = 10 4 , for three different piston thicknesses of 10 -5 , 10 -4 and 10 -3 m. For clarity, the data for the thinner pistons has been offset to 0.12 and 0.10 s respectively, but the timescales remain the same. It is apparent that the heavier the piston, the longer the decay. It is not just that the piston moves slower, hence the larger period of the motion, but also that there are many more oscillations within the decay. For the thinnest piston, 10 -5 m, corresponding to a mass of 2.7 mg, there is essentially only one oscillation and the movement from the starting position to the minimum looks almost like a vertical line on this time scale. All three cases settle at the same final position and for computational convenience, and unless mentioned otherwise, the piston thickness was set at 10 -4 m for all other calculations. It is easily verified that the change in internal energy at the final position of 0.097143m is identical to the external work done.  Figure 4 shows the piston motion for four values of αz, with αz =10 2 having the slowest decay of the oscillation followed by a steady decay to the equilibrium position. The data in figure 4 has been truncated in time, but the downward trend for the piston position for αz =10 2 is evident. The explanation for this is provided by figure 5, which shows that for αzδt=1, corresponding to instantaneous equipartition of energy such that the gas can be considered be in internal equilibrium, the motion is still damped. The cause can be traced to the dependence of the pressure on the speed of the piston in equation (26). By contrast, omission of this term with αzδt=1, so that the effective pressure is just 2Ex and equivalent to the equilibrium pressure given by the equation of state, leads to undamped motion. Indeed, a simulation based on the internal energy and the corresponding equilibrium pressure yields the same indefinite oscillation. For αz =10 2 , then, the piston motion has been damped before full equipartition occurs. The gas is therefore out of equilibrium, but scattering out of Ex into Ey and Ez continues according to equations (33c-33c) and the system very slowly relaxes to equilibrium. As it does so the effective pressure acting against the piston also reduces and if left long enough the system settles at the expected position.  This effect is called here piston damping because it depends on the piston motion rather than energy relaxation by conduction or scattering. Confirmation of this explanation is provided in figure 5, which shows piston damping for three different conditions: 1. both αz and αh set to zero, corresponding to an adiabatic process with no scattering out of Ex into Ey and Ez; 2. both αz and αh set such that both αzδt=1and αhδt=1, corresponding to ideal isothermal; 3.
αz is set such that αzδt=1 but αh=0, corresponding to ideal adiabatic, which is the same situation as shown in figure 4.
In all three cases the piston should oscillate indefinitely. For 2 and 3 above, corresponding to ideal isothermal and adiabatic respectively, the gas is effectively in equilibrium and piston damping causes the piston to settle in the expected position. For case 1 above, the lack of any scattering mechanism, including equipartition, means that Ex is always different from both Ey and Ez and the system settles in an artificial state.
Piston damping is therefore seen to be a real computational effect that arises from the velocity-dependence of the pressure in equation (26). Whether it corresponds to a real, physical effect is as yet unclear. By contrast, interparticle collisions and heat flow, represented by αz and αh respectively, represent processes that have been shown to give rise to damping in a kinetic simulations [19,20]. When inter-particle collisions was switched off, undamped oscillations were observed, but in the macroscopic model, as shown in figure 6, switching off the inter-particle collisions still gives rise to damped motion. In a kinetic simulation, the velocity-dependence of the effective pressure should automatically be accounted for through the speed of the particles, so the lack of any damping observed at the microscopic level is counter to the observation of damping in the macroscopic formulation. It is entirely possible, therefore, that the effect is a consequence of the loss of microscopic information and the implicit averaging that necessarily occurs in the transformation from a microscopic to a macroscopic view. It is for this reason that the simulations reported in this paper rely on one or both of αz and αh as sources of damping. It was argued in the introduction that the existence of internal damping mechanisms means that work processes are intrinsically irreversible: that is, a change of state brought about by a finite change in the external pressure will not be reversed if the external pressure is reset to the original condition. This is illustrated in figure 7, which shows two such two-step processes for β=0.05 and 0.1 with αz=10 4 . As expected, the system expands to a larger volume upon reversal of the external pressure. The inset shows this more clearly. Although the difference is small, it is only because the initial change is small, but it is nonetheless real and within the limits of computational accuracy, even for β=0.05. There is, of course, a limit as to how small a change can be modelled on a computer with a set numerical resolution, so rather than attempt to model very small changes, instead the data from slightly larger changes is extrapolated back. Thus, figure 8(a) shows the ratio of work done in expansion to the work done in compression plotted against 1+ β. The data appears linear over a small range of β, but is fact best described by a gentle curve. There is no sense of asymptotic behaviour or the ratio becoming unity as β tends to zero, such that the work done in either direction approaches equality and the process becomes effectively reversible. The ratio only approaches unity for β=0, in which case there is no change in pressure and therefore no change of state. This is exactly what would be expected for even very, very small changes in a system that is intrinsically irreversible. There are no circumstances in which a finite change of external pressure leads to a return to exactly the same state on restoration of the external pressure. Figure 7. Two two-step processes corresponding to a step increase in external pressure followed by a return to the starting external pressure. The starting position of the piston is indicated by the dotted line at a position of 0.1m. The inset shows clearly that the system does not return to the starting state, but as would be expected, the final volume is greater than the initial volume. This is further supported by figure 8(b), which shows a plot of log V against log P for the final state for -0.1≤β≤0.1 in steps of 0.01, a piston thickness of 10 -4 m and αz=10 4 . The axes are plotted this way because in the simulation the pressure is the independent variable. Also shown is the line of best fit, which has a slope of -0.6009, which is effectively the inverse of γ, the ratio of specific heats. However, this is an average. Closer examination of the data reveals that there are two slightly different slopes, one corresponding to compression (-0.6149) and one corresponding to expansion (-0.58960. In [22] a mathematical argument was made for intrinsic irreversibility using a binomial expansion of = for a small step change in P and a corresponding step change in V. This argument is open to the criticism that this expression is derived using the notion of reversibility, and whilst the existence of two slopes shows that the relationship linking states in the process of compression is different from that in expansion, on average the relationship holds for irreversible processes over the limited range of expansion and compression for which the binomial expansion would apply. Figure 8. The ratio of work done in expansion to the work done in compression for a two step process in which compression is followed by expansion (a). For small changes, the ratio of works is approximately linear with the ratio of initial to final pressure in the compression stage and always less than unity. In (b) a plot of log V against log P yields a straight line with a best fit slope of -0.6002, which is effectively the inverse of γ, the ratio of specific heats.

The Carnot cycle
The idea of intrinsically irreversible processes, which is supported by kinetic simulations as well as the present macroscopic formulation and mathematical arguments, calls into question the notion of a quasi-static Carnot cycle. Figure 8 suggests that for even very small step changes in external pressure, the work of compression is greater than the work of expansion, so it is by no means clear that any cycle composed of such changes will be reversible. It is a question of exactness. Unless a cycle exactly reversible in as much work can be extracted from heat as heat from work if the cycle is reversed, the cycle cannot be said to be a Carnot cycle.
The irreversibility described in this work arises from three different mechanisms: inter-particle scattering, as represented by 0< αz<1; heat conduction from a reservoir, as represented by 0< αh <1; and piston damping, owing to the dependence of the effective pressure on the speed of the piston. The key to the first two mechanisms is the idea of a delay between work done at the piston and the consequent redistribution of energy among the degrees of freedom or the exchange of heat with a reservoir. For αz =1, energy is instantaneously redistributed and the gas can effectively be described by the ideal gas equation of state. In consequence, the work done on or by the gas, depending on whether the gas is expanding or being compressed, is always PdV. The work done on or by the external pressure is different and the difference between the two is, by equation (27), the kinetic energy of the piston . For αh =0 the temperature changes with the work done and for αh =1 the temperature remains constant. As shown in figure 5, either of these conditions, in conjunction with the elimination of piston damping, leads to undamped oscillatory motion of the piston and this forms the basis of a dynamic Carnot cycle. Figure 9 shows both isothermal and adiabatic undamped oscillations for the same ideal gas in the same cylinder, with the same starting position for the piston of 0.1m, but at an initial temperature of 995K acting against a constant external pressure of 2 atmospheres. For computational convenience, the mass of the piston still corresponds to aluminium at a thickness of 10 -4 m, but the piston damping is idealised away by setting the ratio of up:ua to zero for all piston speeds in simulation of a much heavier piston. It is perhaps not immediately or intuitively obvious, but an appropriate combination of ideal isothermal expansion and ideal adiabatic expansion as illustrated in figure 9 will cause the piston to undergo a Carnot cycle, as illustrated in figure 10.   The cycles in figure 10 differ only in the point at which the heat flow from the reservoir is switched off. This affects the end point of the expansion and therefore the temperature of the cold reservoir as well as the external pressure on the return stage. The precise procedure for performing the forward Carnot cycle, in which heat is converted to work, is as follows. 1.
The gas is allowed to expand isothermally to some arbitrary point before the maximum of the piston motion when the heat is switched off: that is, αh is switched from a value of 1 to 0. The two cycles correspond to 0.5 and 0.7 of the maximum isothermal extent of the piston motion, which from figure 8 corresponds to a piston position of just under 0.27m. The temperature of the wall is set to the temperature of the gas and the total heat input during the isothermal expansion is summed. This allows for a calculation of the entropy change, . At the point when the heat flow is switched off, the piston is already in motion and the gas continues to do work on the piston, thereby cooling in the process. 2.
At the extremum of the motion, αh is reset to 1. The temperature of the wall is set to the temperature of the gas and the external pressure is reduced. That is to say, from the entropy calculated during the isothermal stage, the nett heat that must be exchanged with the cold reservoir can be calculated. The difference between the heat in (QH) and the heat out (QC) must be equal to the nett work done. If the external pressure is Pout and Pin on the outward and inward piston motions respectively and the total movement of the piston is δxtot, then; The heat flow to the cold reservoir is summed during the isothermal compression and at the point when the entropy change is equal to the change during the expansion stage, the heat flow is switched off by setting αh to 0.
3. The piston continues its motion, but now without any heat flow the temperature rises. The program continues until the minimum piston position is found. This turns out to be the same as the starting point and both the temperature and internal pressure are restored to their starting values.
These cycles are reversible. Starting with an adiabatic expansion and reversing exactly the steps that led to the execution of a forward Carnot cycle, one finds that the same P-V curve is mapped out.

Discussion
The remarkable feature of the dynamic Carnot cycle just described is its simplicity. It is not necessary to do anything special to force a system comprising an ideal gas to execute the cycle other than to assume the gas to be always in internal equilibrium. Then, the pressure acting on a piston is given the equation of state and the work done by the gas is equal to PdV. If the external pressure is constant, representing a real physical load such as a weight being lifted, the nett force due to the difference in pressures causes the piston to accelerate. At the extremum of the piston the external conditions have to be adjusted to allow the cycle to be completed. The external load has to be reduced, as represented by a lower constant pressure, and the temperature of the external reservoir has to be lowered to match the temperature of the gas at the extreme point. Not only is work done owing to the difference in external pressures over the distance of the piston stroke, but power is developed. Thus, one of the principle conceptual difficulties associated with Clausius interpretation of the Carnot cycle, namely that the ideal engine has to operate quasistatically such that no power is developed, is overcome. Moreover, the cycle can be reversed simply by reversing these operations.
None of these conditions are realisable in a practical engine. A gas is not always in internal equilibrium; a piston is not always in contact with a reservoir at a constant temperature which can be adjusted to match the internal conditions at the end of the piston stroke; the heat flow from the exterior cannot be switched on or off at will; and the piston stroke itself will not vary in extent if it is connected to a driving mechanism such as a cam. This makes clear the ideal nature of the Carnot cycle as a representation of an ideal engine. The formulation presented here of the processes occurring within the gas in terms of rate equations makes clear the assumptions that must be made to ensure the gas is always in internal equilibrium: instantaneous heat flow form the exterior; instant redistribution of energy within the gas, both spatially through conduction and among the different degrees of freedom through inter-particle scattering; and finally, a pressure acting on the piston which is independent of the speed of the piston.
In one sense, the existence of so many separate idealised conditions for the ideal operation of a Carnot engine is not surprising. Carnot himself assumed a similar set of steps in his own description of the operation of an ideal engine [18](p18). Carnot was concerned with the development of "motive power", but the phrase has to be understood in its historical context. The modern definition of power as the rate at which work is done or energy exchanged was not understood at that time and instead, motive power seems to have been equated with the ability to do work. Certainly, Carnot associated motive power with expansion and regarded heat flow without expansion as a loss of motive power of heat. Therefore, he envisaged the cycle as occurring in four separate stages: expansion of a gas through heat flow from a reservoir at the same temperature as the gas, removal of the gas from contact with the reservoir and continued expansion without heat flow to change the temperature, contact with another reservoir at the same temperature as the gas and compression at a constant temperature, and finally removal from the reservoir and continued compression back to the starting state. Reversal of the sequence of operations allowed the cycle to be reversed.
The realisation of the Carnot cycle presented in this paper is closer to Carnot's scheme than Clausius's. Although Carnot himself mooted the idea of reversible processes occurring in infinitesimally small steps [18](p15), he didn't make that a condition of the successful operation of the cycle. His focus was on a cycle consisting of the four steps above and reversing the order in which those steps are executed to reverse the cycle. This is the same notion of reversibility presented in this paper. Clausius, on the other hand, introduced the notion of a quasi-static process as reversible. Quite possibly, he was influenced by Carnot, who described heat conduction between two bodies at different temperatures occurring via a series of bodies at intermediate temperatures as a way of reversibly maximising the motive power developed by such heat flow. He was describing a particular situation when steam, having done work and condensed to water, needs to be returned to the state of steam. This could be done by placing it in contact with a body at a high enough temperature, but that would result in heat flow without expansion, which is a loss of motive power, and the reverse operation of returning the heat back to the hot body would be impossible. He therefore argued that if the temperature difference between two bodies was infinitesimally small, heat could flow and do work and in reverse, work could be done and heat would flow in the opposite direction.
Clausius gave a similar description of reversible heat flow as isothermal and by comparison, described reversible work as occurring at the same pressure. In addition, the switch from caloric to the theory of heat as motion led Clausius to believe that large scale motions could be dissipated as heat and specifically required a reversible process to avoid "perceptible" external motion. Necessarily, this meant that the Carnot cycle must be executed quasi-statically, but it also represented a shift away from Carnot's idea that the cycle is reversible simply by reversing the sequence of operations to the idea that the cycle is made up of separately reversible processes. The present work shows that this need not be the case and that a reversible cycle can be executed dynamically.
This has implications for our understanding of entropy. There are two conflicting views of entropy that need to be reconciled. The first is expressed in equation (5), Clausius's theorem, in which entropy is self-evidently not a state function because the sum of all changes can be less than zero round a closed cycle, and the second is that entropy is a state function because the integral of dQ/T between any two points in thermodynamic phase space is independent of the path. The obvious distinction between these two interpretations is that one is internal and the other external. Equation (5) defines whether a process is reversible or not with reference to the exchange of heat between a system and its environment, so in the free expansion, for example, the system can only be returned to the original state by doing work, which necessitates a flow of heat out of the system.
In contrast, the internal interpretation is not concerned with actual heat exchanges. It is primarily mathematical and is based on representing the quantities in the First Law in the form of differentials. Clausius was well aware of the mathematical arguments around integrability and devoted several pages of introductory material [23] in his collection of Memoirs to the topic. Born gives an account of the treatment of two variables in terms of Pfaffians and the existence of an integrating factor [24]. A small change in heat can expressed as, = + (37) It is a property of such equations that there is an integrating factor such that, = .
(38) The quantity dϕ is an exact differential and is recognizable as a change in entropy. The integrating factor, λ, is identified as the absolute temperature, T. This only applies to Pfaffians of two variables and Born shows how, for three or more variables, such that, = + + (39) a geometric interpretation can be attached to this in the form of a set of planes perpendicular to the surfaces in which ϕ is constant. Dunning-Davies also gives an account of the mathematical interpretation of entropy in terms level surfaces within thermodynamic phase space [25]. States lying on the same surface can only be accessed by adiabatic transformations such that dW=PdV. If dW≠PdV or if dQ≠0, the transformations occur between states on different surfaces, with the former requiring a transition to a surface representing a higher value of entropy.
Entropy thus defined is consequence of the differential geometric properties of thermodynamic phase space and the question arises as to whether there is a corresponding physical property of a system in that same state. Clausius certainly believed so. It was common at the time to consider heat as a property of a body in as much as a body was believed to contain a certain amount of heat at a certain temperature. It would follow from such a belief that any change δQ/T is changing some property of the body. As we have seen from Maxwell, however, there was a growing shift away from the notion of heat as motion, or kinetic energy, to the idea that heat is associated with an exchange of energy in some form and this is clearly the most appropriate interpretation of equation (5). Nevertheless, entropy is still regarded as a property of a body today, but it is the very idea of entropy as a physical property, with the units of joules per degree Kelvin, that leads to a conflict with energy conservation.
This conflict can be traced directly back to Clausius. He appears to have retained the belief that heat was a property of a body in the sense given above well into the second half of the nineteenth century, and quite possibly until his death. He also believed that one of the principal effects of heat was to cause a separation between the constituent particles. He called this the separative force of heat and attempted to express this mathematically through the change in disgregation, dZ. This quantity replaced work done in what is essentially a mathematical expression for the conservation of energy in order to derive an expression identical to equation (5). It should be noted that in modern usage the inequalities have different signs, but originally, Clausius defined a positive dQ in such a way as to make the integral in equation (5) positive or zero and it appeared in this form in his earlier works. It was only later, in the Ninth Memoir, that he changed the sign of dQ to correspond with the modern view that a negative dQ equates to a loss of heat by the system. As derived by Clausius, the inequalities were identical and it was this later change of sign that made them different.
Clausius's thinking behind these inequalities is based on something he referred to as "uncompensated" transformations. Clausius's whole theory of the thermodynamics of cyclic processes was based on what he called the equivalence of transformations. The concept is difficult to understand, being based in part on Clausius' outmoded view of heat, and has disappeared from the modern thermodynamic lexicon, but for the purposes of this discussion we can focus on the transformation of heat into work and vice versa, work into heat. Clausius assigned such transformations an equivalence value (aequivalenzwerth in German) of δQ/T, where δQ is a change in heat, and in a cyclic process such as the Carnot cycle, the equivalence value of the isothermal expansion is compensated by equivalence value of the isothermal compression. In an irreversible cycle, for example, if the isothermal expansion is replaced by the free expansion, one of the transformations will be uncompensated. There will be a negative value of δQ/T around the cycle, corresponding to a net outflow of heat. Clausius sought an equivalent uncompensated transformation for a single, irreversible, non-cyclic process and focused on work. By setting TdZ≥dW in equation (4), he arrived at the sought-after inequality. In a reversible process TdZ=dW and dQ/T is compensated by the combined effect of the changes in both dZ (=dW/T) and dH/T, or their integrals over larger changes, but for an irreversible process, TdZ>dW and dQ/T remains uncompensated.
Clausius believed the equivalence value to be a property of a body and it was quite natural for him to extend that to the entropy, but therein lies the origin of the conflict with energy conservation identified in the introduction. Whilst it might well be true that the work done in a so-called "reversible" process is always algebraically greater than the work done in an irreversible process, the total change in internal energy for a system containing a fixed number of particles is given by the sum of heat exchanged and work done, not the work that could be done in a different process. By associating the work that can be done as opposed to the work that is done with a physical property of a body Clausius derived a quantity that does not adhere to energy conservation if the work done is less than the so-called irreversible work.
This explains why Clausius believed entropy to be property of a body, but it doesn't explain why later thermodynamicists continued to accept this view in light of the emergence of the concept of energy. Undoubtedly, the idea of entropy as a state function played a part. Clausius clearly regarded his own mathematical arguments on integrability to provide a mathematical explanation for his interpretation, and as the argument against entropy being a property of a body is physical rather than mathematical, later mathematical treatments would not have provided any kind of counter argument. For example, Boyling [26,27] asserted that entropy exists based on purely mathematical arguments. He considered the space of equilibrium states as a differentiable topological manifold, the properties of which are determined through the existence of differential functions representing work and heat and internal energy that link the states. A global integrating factor exists which is the inverse of temperature, and he concludes, therefore, that entropy exists. It seems unlikely that Boyling was simply re-stating a mathematical truth. More likely, he was suggesting that the existence of a global integrating factor, coupled with the physical nature of heat, work and internal energy as the quantities involved, means that entropy is a physical property of thermodynamic states.
For entropy to be a property of a body and to increase in irreversible processes, there has to exist a reversible process in which work done in either direction is given by PdV. The nature of reversible processes has long exercised thermodynamicists and recently Norton has summarized the difficulties [28]. Quite possibly, there is no such thing as a quasi-static, reversible process. The assumption underlying the work presented in this paper is that a step change in external pressure is required to bring about a change in state. The existence of internal damping means that the ensuing work is intrinsically irreversible: that is, the work of compression will be greater than the work of expansion. As figure 8(a) makes clear, there is no sense that PdV approaches a limiting value that is effectively the same in both directions and no matter how small the change, some heat will have to be extracted to restore the initial state. By equation (5), such processes are irreversible.
The conventional interpretation of the need to extract heat to return the system to its original state means that the entropy of the gas has increased during the irreversible process. However, the argument that this increase in entropy represents a real, physical property of a gas in the state represented on the P-V diagram rests on the possibility, even if it is difficult to realise in practice, that there exists a reversible path between the two states. Boyling's definition of reversible is equivalent to a point representing a thermodynamic state moving in the manifold. The existence of two different slopes in figure 8(b) shows that even for small step-wise changes in external pressure, motion along adiabats is not possible. The cause can be traced to the need to damp the piston motion. Unless the kinetic energy of the piston is dissipated, the piston will simply oscillate. The existence of internal, and therefore intrinsic, mechanisms of damping means that continuous, and therefore integrable, motion of the thermodynamic states of a physical system along isotherms and adiabats would appear to be impossible. Therefore, the idea of a reversible process represented by work PdV would appear to be a mathematical abstraction.
This brings us to the Carnot cycle as executed in this work. It is a dynamic cycle executed over the expansion and return stroke of a piston. This conditions and assumptions necessary for the cycle to be realized mean that at any given instant the gas has an identifiable temperature and pressure. Although the gas never occupies a static equilibrium state, the continuous motion of the piston means in effect that the thermodynamic state of the gas, as defined by the pressure, volume and temperature, changes continuously. In effect, the state of the gas can be considered as point moving along isotherms or adiabats, depending on the heat flow from the reservoir. As such, the expansion and compression strokes are reversible. As figure 9 shows, under the idealized conditions of no damping, both isothermal and adiabatic expansions are cyclic, which is to say that on its return, the piston follows exactly the reverse trajectory through thermodynamic phase space. Even if the heat flow from the reservoir is switched off at some point during the piston stroke so that the expansion changes from isothermal to adiabatic, as long as the external conditions remain unchanged and provided the heat flow is switched back on at the same point the piston will reverse its path through thermodynamic phase space. However, if the external pressure and temperature of the reservoir are adjusted at the end of the piston stroke, the gas can be made to follow a different trajectory through thermodynamic phase space back. It follows that in mapping a continuous motion through thermodynamic phase space, the entropy change associated with heat flow to or from the reservoir must match the mathematical property of entropy associated with the states in that phase space. Therefore, if the entropy change on the return stroke matches the entropy change on the outward stroke, a dynamic Carnot cycle can be executed.
Authors should discuss the results and how they can be interpreted from the perspective of previous studies and of the working hypotheses. The findings and their implications should be discussed in the broadest context possible. Future research directions may also be highlighted.

Conclusions
Some of the conceptual difficulties around entropy have been discussed to illustrate its confusing and contradictory nature. In particular, attention has been drawn to idea that an increase in entropy means that some property with the units of energy, TdS , is increasing in a way that is incompatible with energy conservation. The origin of this difficulty has been traced back to Clausius, who actively sought an inequality similar to that he had developed for cyclic processes in which the maximum work is done in a reversible process. It has been shown that he based his development of the concept of reversibility not on conservation of energy but on the idea that a body at a given temperature contained an identifiable amount of heat and that this heat had associated with it a force that could do work. He justified the inequality for a single, irreversible process through the inclusion of reversible work in his mathematical development of entropy rather than the work that is actually done and thereby built into the concept of entropy the potential for a quantity with the units of energy to increase outside the bounds of the First Law. The argument is succinctly summarized in equation (10), which shows how the entropy increase in an irreversible process depends on the difference between the work that is actually done and the work that could be done in a corresponding reversible change between the same two states.
It has also been argued that the idea of reversible work is a mathematical abstraction. Physically, a step-change in external pressure is required to bring about a change of state and the presence of internal damping means that the ensuing work is intrinsically irreversible. However, the same states can be represented as points in thermodynamic phase space and an integrable path between can be defined through differential geometry with the work done being expressed in the form PdV. This is a necessary condition for an integrating factor, and therefore the state function called entropy, to exist. In contrast, in the intrinsically irreversible processes described in this work, the work done between any two states is not expressible in terms of state variables and no integrating factor exists for such transitions. Nonetheless, entropy can be said to exist as a consequence of applying the techniques of differential geometry to the graphical representation of thermodynamic states in thermodynamic phase space. The question arises as to whether the mathematical state function is also a physical property of a body and grounds for thinking that these are not the same have been presented in this paper.
The microscopic scattering processes underlying the internal damping mechanisms has been formulated macroscopically using rate equations that couple energy changes in the gas to work done at the piston. The irreversible nature of work done following a step-change in external pressure has been demonstrated through numerical simulations. It has also been shown that in the ideal case when these damping mechanisms are assumed not to operate, the gas behaves as if it is in internal equilibrium at all times. The pressure acting on the piston is equivalent to the equilibrium pressure and the gas does work PdV. The difference between the work done internally and externally, against the constant load, becomes kinetic energy in the piston. As the piston moves the system maps out a trajectory through the equilibrium states of thermodynamic phase space. The change in entropy of the states corresponds exactly to the change in entropy due to the exchange of heat with the reservoir and with appropriate adjustments to the temperature of the reservoir and the external pressure, the gas inside a piston can be made to undergo a Carnot cycle.
This dynamic cycle is a conceptually less challenging alternative to the quasi-static Carnot cycle in several respects.
• Although the quasi-static approach to reversible processes is accepted as standard, it is not compatible with the idea that a difference of pressure must exist in order to change the state.
• In the dynamic cycle, on the other hand, the external pressure is different from, and independent of, the internal pressure and the movement of the piston is a consequence of simple mechanical principles.
• The Carnot cycle is intended to represent the ideal engine and the assumption of ideal conditions within the gas to eliminate damping mechanisms is fully compatible with that.
• There is no need to consider whether entropy is a property of a body or not as the entropy change due to the heat flow from the reservoir necessarily corresponds to the state function of thermodynamic phase space.
• Finally, the absence of damping means that the system can map out the reverse trajectory in thermodynamic phase space under the same external conditions and in consequence the cycle itself is reversible.
Funding: This research received no external funding.