Jacques Arnaud

Mas Liron

Laurent Chusseau

Fabrice Philippe

A simple model for Carnot heat engines

) is recalled in Appendix B. Only elementary physical and mathematical concepts are employed.

I. INTRODUCTION

The purpose of this paper is to give newcomers to the field of Thermodynamics a feel for the concepts involved in a simple manner. The paper is self-contained and employs only elementary mathematics. The results are derived for a particular urn (or bag, or reservoir) model, related to the one introduced in 1907 by P. Ehrenfest. [START_REF] Ehrenfest | Ueber zwei bekannte Eingewände gegen das Boltzmannsche H-Theorem[END_REF][START_REF] Güémez | A generalization of the Ehrenfest urn model[END_REF][START_REF] Tobochnik | Teaching statistical physics by thinking about models and algorithms[END_REF] Our model consists of two reservoirs with N possible ball locations each, containing respectively n l and n h weight-1 balls. This model is directly applicable to Otto heat engines (in which the working agent parameter stays fixed when in contact with either bath) employing as a working agent two-level atoms. (For an exhaustive discussion concerning quantum heat engines see Quan. [START_REF] Quan | Quantum thermodynamic cycles and quantum heat engines (II)[END_REF]) Obviously, classical heat engines may of course be considered as special cases of quantum heat engines.

In section II we describe in more detail our model, and evaluate the average work produced, the average energy lost by the upper reservoir, and the efficiency. The general properties of heat engines are recalled in Section III. The relationship between our urn model and the properties of heat engines is discussed in Section IV. The reservoirs absolute temperatures T l , T h , respectively, are defined in the limit of large ball numbers. When n l ≈ n h the system efficiency and the average work obtained in Section II tend to coincide with the expression for the efficiency and average work given by Carnot for an ideal heat engine. The fluctuations of the work produced are evaluated in Appendix A. A discussion of the history of the Carnot discovery is in Appendix B.

It is well-known that heat exchange between two contacted bodies may be described by an urn model (see Section III). The present model employing two urns at different altitudes, and the comparison that we make with heat engines, has not, to our knowledge, been presented before.

It seems to us that mathematically-minded students would better understand the entropy concept from the present model than from classical Thermodynamics, because empirical results (such as the irreversibility of thermal contacts) are not needed in our discussion. For other students, temperature is a primary intuitive concept, and they may prefer an introduction based on gas-filled cylinders of variable length instead.

II. EXCHANGE OF BALLS BETWEEN TWO RESERVOIRS

We consider a system consisting of two reservoirs at altitudes E l and E h > E l respectively, with respect to some lower reference level, in the earth's gravitational field. There are N possible ball locations in each reservoir that we label: 1,2...N , as shown in Fig. 1. A single ball is allowed in any given location. The lower reservoir contains n l ≤ N weight-1 balls and the higher reservoir contains n h ≤ N weight-1 balls. By "weight-1 ball," we mean an object with a weight of 1 N, that is, with a mass of approximately 0.1 kg. In order to lift such an object by 1 m in the earth's gravitational field an energy of 1 J is required. Conversely, such an object delivers an energy of 1 J whenever its altitude gets lowered by 1 m. These energies may be removed or added to some external device with the help, for example, of cords and pulleys, or electrical motors (or generators). We leave the nature of these mechanisms unspecified in the discussion that follows. Note, however, that a particularly interesting mechanism is the action of resonant optical fields on two-level atoms. They may convert upper-state atoms into lower-state atoms and conversely, thereby receiving or delivering energy.

In Figure 1 we have N = 5, n l = 1 and n h = 2. In the higher reservoir there are 10 distinguishable ball configurations and in the lower reservoir there are 5 distinguishable configurations (the general formula for the number of configurations will be given later on). Considering the two reservoirs together there are therefore 5 × 10=50 distinguishable configurations. These 50 configurations correspond to the same energy. If one assumes that the reservoirs are being shaken up frequently (at least more frequently than the occurrence of a ball-exchange event), all possible ball configurations are equally likely to occur.

We consider ball displacements from the lower and higher reservoirs at a single location, say the left-most location, labeled 1. One may draw all the possible configurations and evaluate by inspection quantities of interest such as the average work produced by the system. For example, if N = 3, n l = 1, n h = 2, the nine distinguishable configurations are

• • • • • • -1 • • • • • • 0 • • • • • • 0 • • • • • • 0 • • • • • • 1 • • • • • • 1 • • • • • • 0 • • • • • • 1 • • • • • • 1
The number below each configuration is the energy produced over a cycle, setting for brevity

E ≡ E h -E l = 1.
Indeed, restricting our attention to the first location, labeled 1, and, for example, the first configuration shown above, we note that there is an empty location in the higher reservoir and a ball in the lower reservoir. In that case, a cycle consists of transferring the lower-reservoir ball into the higher empty location. The system then delivers an energy equal to -1, that is, absorbs an energy equal to 1. From the above numbers, we calculate that the average energy produced, called "average work," is W = (-1 + 0 + 0 + 0 + 1 + 1 + 0 + 1 + 1)/9 = 1/3. This pedestrian method also provides the variance of the work produced.

We now turn to an equivalent but more convenient picture (see the abstract), involving the probability of picking up a ball from a reservoir. It is then convenient to suppose that empty locations are occupied by weight-0 balls. Such balls, of course, do not carry any energy when displaced. A cycle consists of exchanging two balls (of weight 0 or 1), one randomly picked from the lower reservoir, and one randomly picked from the higher reservoir. The probability of picking a weight-1 ball from the lower reservoir is l ≡ n l /N and the probability of picking up a weight-1 ball from the higher reservoir is h ≡ n h /N . As we discuss below, the average energy produced is W = h -l. In the above example (namely N = 3, n l = 1, n h = 2), l = 1/3, h = 2/3, we obtain W = 2/3 -1/3 = 1/3, which coincides with the previous result. The equivalence between the two methods is general.

The total (potential) energy of a reservoir at altitude E (with respect to some arbitrarily selected level) containing n weight-1 balls is obviously Q = nE (kinetic energy being not considered, the total energy coincides with the potential energy). The letter Q is employed anticipating a correspondence with heat. When a weight-1 ball is added to a reservoir at altitude E the reservoir energy is incremented by E. On the other hand, if a ball is randomly picked up from the N locations of a reservoir containing n weight-1 balls, the probability that this ball has weight 1 is clearly n/N . Accordingly, if the picked up ball is subsequently carried to a reservoir at altitude E, the latter reservoir average energy is incremented by ∆Q = E n/N . The word "average" will henceforth be omitted in the main text since only average values are considered.

Consider now two such reservoirs. One at altitude E l (lower reservoir) and containing n l weight-1 balls. The other at altitude E h (higher reservoir) containing n h weight-1 balls. A cycle consists of exchanging two randomly-picked balls between the two reservoirs. From what has just been said and setting l ≡ n l /N , h ≡ n h /N , the energies added The number of weight-1 balls (black circles) is n l in the lower reservoir, and n h in the higher reservoir (with n l = 1, n h = 2 in the figure). Open circles may be viewed as weight-zero balls. For each reservoir, every ball configuration is equally likely to occur considering that the energies are the same. The complete figure should therefore consist of 5 × 10 = 50 similar figures exhibiting all the possible system configurations. Balls may be transferred from one reservoir to the other in location 1 only. If there is a ball in the upper reservoir at that location and none in the lower one (as is the case in the figure), the ball gets transferred from the upper reservoir to the lower one, thereby delivering energy. Conversely, if there is a ball in the lower reservoir and none in the upper one the ball gets transferred from the lower reservoir to the upper one, thereby absorbing energy. In some limits, the efficiency is the same as for a Carnot cycle.

to the lower and higher reservoirs read respectively

∆Q l = E l (h -l), ∆Q h = -E h (h -l). (1)
The work performed follows from the law of conservation of energy

W = -∆Q l -∆Q h = (E h -E l )(h -l). (2)
The engine efficiency, defined as the ratio of the work performed W and the energy -∆Q h lost by the higher reservoir, is therefore

η ≡ W -∆Q h = 1 - E l E h . (3)
In the next section we recall well-known properties of heat engines. In the subsequent section, we show that when h ≈ l the efficiency given in Eq. ( 3) coincides with the Carnot efficiency and the work given in Eq. ( 2) coincides with the expression given by Carnot.

Note that after a cycle the number of weight-1 ball in a reservoir may be incremented by -1, 0 or 1. The next cycle operates therefore with different values of the l, h parameters. We will not consider the evolution of the work produced cycle after cycle. Indeed we are interested in a comparison with heat engines operating between two baths whose heat capacity is so large that their temperatures do not vary significantly. Likewise, in the present reservoir model, one may suppose that the number of balls in each reservoir is so large that their change after any number of cycles is insignificant.

III. HEAT ENGINES

The purpose of the present section is to recall some well-known facts about heat and heat engines (for a detailed discussion see for example Ref. 5).

It is empirically known that when two bodies at different temperatures are contacted, they eventually reach the same temperature. This observation can be verified using only the intuitive concept of temperature. Classically, this fact may be interpreted by supposing that some heat (energy) is flowing from the high-temperature body into the low-temperature body, but that the converse never occurs. A similar observation can be made with two urns (see the figure with E l = E h ). Suppose that the urns contain N balls each that have either weight-1 (black) or weight-0 (white).

If randomly picked balls are repeatedly exchanged between the two urns, eventually the ratios of black and white balls become nearly the same in both urns, irrespectively of the initial conditions. For the analogy with the phenomenon of thermal contact to hold, one must define the temperature of an urn as a monotonically increasing function of the ratio of black to white balls [for an exact expression, see Eq. ( 6) with E > 0 and n = n black , N -n = n white ].

It is also an empirical fact that when the energy originating, for example, from a dropping weight is dissipated into a body the body heats up. According to the law of conservation of energy, one thus presumes that a hot body contains an energy called "heat." The fact that this heat cannot be converted back into usable energy is one form of the second-law of Thermodynamics. In order to get usable energy from heat one needs two bodies at different temperatures, one of them being called the high-temperature bath and the other the low-temperature bath. If the low-temperature bath is at zero absolute temperature, all the heat may in principle be converted back into usable energy, but this is not the case in general. Heat is usually pictured as the average kinetic energy of randomly moving atoms, according to Bernoulli and Maxwell pictures. For example, the average kinetic energy of an helium atom in a gas is 3T /2 in appropriate units, where T denotes the gas absolute temperature. We will not discuss further this conventional model because in the present paper we instead represent heat by a random potential energy. Consider for example the first location of the higher reservoir in Fig. 1. For the configuration shown in that figure the energy is equal to E h since a weight-1 ball at altitude E h is present. But for other configurations (not shown in the figure), the energy may be zero. On the average, the higher reservoir energy is easily found to be (2/5)E h .

Let us now recall how, concretely, usable energy may be retrieved from two baths at different temperatures. What one needs is a "working agent," which may be any piece of material whose properties can be changed by varying a parameter. An example is an helium-filled cylinder with a piston, of length ǫ, where ǫ is the parameter. Another example (more relevant to this paper discussion) is a collection of two-level atoms. We suppose that the separation in energy ǫ of the two levels may be varied through, e.g., the application of an electrical field. It is the external agent that causes the parameter ǫ to vary that collects, or delivers, the energy. A typical closed cycle consists of putting the working agent with parameter ǫ 1 in contact with the low-temperature bath, and slowly varying this parameter to ǫ 2 . The working agent is then carried from the low-temperature bath to the high-temperature bath while the parameter is slowly changed to ǫ 3 . The parameter is then changed to ǫ 4 . The working agent is finally carried back to the low temperature bath while the parameter recovers its initial ǫ 1 -value. A closed cycle is thus defined by the nature of the working agent and four parameter values. If the parameter ǫ does not vary at all, obviously no energy is delivered or received. The cycle then simply transfers heat from the high-temperature bath to the low-temperature bath, and is analogous to a thermal contact.

A more interesting situation is the Otto cycle that describes an idealized form of the gasoline engine (discovered by Beau de Rochas in 1862 and Otto in 1876). In that case ǫ 2 = ǫ 1 and ǫ 4 = ǫ 3 , meaning that the parameter does not vary when the working agent is in contact with either bath. The parameter varies only during the adiabatic transitions from one bath to the other. This cycle may deliver work or receive work (heat pump) for appropriate choices of the parameters. Usually it does not achieve the maximum (Carnot) efficiency. It does so approximately, however, when ǫ 4 ≈ ǫ 2 . For the exact description of Carnot heat engines, see the generalization of the ball model in Ref. [START_REF] Arnaud | Mechanical equivalent of quantum heat engines[END_REF].

In the celebrated Carnot cycle the parameters are so chosen that the temperature of the working agent is nearly the same as the bath temperature when contacted with it. Then the efficiency is η = 1 -T l /T h , and the work produced is W = (T h -T l )S, where S denotes the entropy transferred from the high-temperature bath to the low-temperature bath. These concepts will be made clearer in the next section.

To summarize, whenever we have at our disposal two baths at different temperatures, one may always find a heat engine that delivers energy. But many kind of cycles fail to deliver energy even though T h > T l . As a matter of fact they may instead absorb energy and act as heat pumps. As we shall see, our potential-energy model is fully consistent with the above well-known considerations.

IV. ENTROPY AND TEMPERATURE

We consider again reservoirs containing N locations and n weight-1 balls and N -n weight-0 balls. To relate this device to heat engines, let us first recall that the number of ball configurations in a reservoir is N !/n!(N -n)!. For example, if N = 3 and n = 1, there are 3!/(1!2!)=3 configurations, namely (• • •), (• • •) and (• • •). Next, we define the entropy as the logarithm of the number of configurations, the Boltzmann constant being set equal to unity, that is, for a reservoir,

S(n) = ln N ! n!(N -n)! . ( 4
)
Note that

S(n + 1) -S(n) = ln N ! (n + 1)!(N -n -1)! -ln N ! n!(N -n)! = ln N -n n + 1 ≈ ln N n -1 , (5)
for large n.

The absolute temperature of a reservoir is then defined as

T (n) = Q(n + 1) -Q(n) S(n + 1) -S(n) ≈ E ln( N n -1) . ( 6
)
Temperature is an intensive quantity. For example, the temperature of two identical bodies at temperature T , considered together, is again T . Because heat has the nature of an energy and is an extensive quantity, it is required that S be also an extensive quantity. Since the number of configurations in two separate bodies is the product of the configurations (for each configuration of one body one must consider all the configurations of the other body) and the logarithmic function has the property that ln(ab) = ln(a) + ln(b), the above definitions do ensure that T be an intensive quantity. Note that we have chosen a temperature unit such that the Boltzmann constant k B be unity. By doing so the distinction between extensive and intensive quantities drops out of sight. For example, the energy of a single-mode oscillator E = k B T reads in our notation E = T . However, the distinction may be restored, while keeping k B = 1, by writing E = T × the number of modes. The number of modes depends on volume, while T does not. Note that the temperature is positive if n < N/2. The cycle efficiency given in Eq. ( 3) may now be written in terms of temperatures as

η = 1 - E l E h = 1 - T l T h ln( 1 l -1) ln( 1 h -1) . (7)
Thus, when l ≈ h, the last fraction in the above equation drops out and the Carnot efficiency is indeed obtained. In the limit l ≈ h the work W produced per cycle is very small. However, one may always add up the work contributions of any number of similar devices having the same reservoir temperatures (but possibly different values of E, n), and achieve any specified work at the Carnot efficiency.

The ball exchange discussed above may increment the reservoir entropies. The number of weight-1 balls in a reservoir may indeed be incremented by one, remain the same, or be decremented by one. From what was said before, the probability that a weight-1 ball be transferred from the high reservoir to the lower one is h ≡ n h /N , and the probability that a weight-1 ball be transferred from the low reservoir to the higher one is l ≡ n l /N . Since these events are independent, the lower reservoir entropy increment reads

∆S l = h(1 -l)[S(n l + 1) -S(n l )] + l(1 -h)[S(n l -1) -S(n l )]. (8)
Using Eq. ( 5) we obtain

∆S l = (h -l) ln 1 l -1 . (9)
The increment of the higher reservoir entropy is obtained by exchanging the h and l labels in the above expression, that is

∆S h = -(h -l) ln 1 h -1 . (10)
We thus find that, in the limit n l /N ≈ n h /N (or l ≈ h), ∆S l ≈ -∆S h so that there is no net entropy produced. Entropy is just carried from the higher reservoir to the lower one. The Carnot expression for the work recalled in Section III may thus be written as

W = (T h -T l )∆S l ≈ E h ln 1 h -1 - E l ln 1 l -1 ∆S l ≈ (E h -E l )(h -l), (11)
so that the Carnot general formula for W indeed coincides with the expression for the work performed per cycle evaluated for our model from simple reasoning. More precisely, the ratio of the total entropy produced ∆S l + ∆S h to the work produced W tends to zero as h → l, see Eq. (A4). The final expression tells us that the engine, according to our model, delivers work only if the terms E h -E l and h-l are both positive or both negative. But since E h > E l by convention, this implies that we must have h > l. Going back to the expression of the temperature in Eq. ( 6), and remembering that the ln(.) function is a monotonically increasing function of its argument, we find that work may be produced only if T h > T l . Whenever T h > T l there exist heat engines that may deliver work. But this is not so for every heat engine. In particular, one may consider the properties of an Otto heat engine that stops delivering work (and turns into a heat pump) when a condition similar to our l = h condition holds, even though T h > T l .

Conventional heat engines operate with two large baths, or reservoirs, one hot and one cold. Because these baths are not infinite in size, cycle after cycle, the hot bath cools down and the cold bath warms up. Eventually no work is being produced. The same situation occurs in our model. After a very large number of cycles the values of h and the value of l tend to coincide and no work is being produced any more. Because the reservoir temperatures do not equalize, however, one may say that the system has then reached a state of equilibrium, but not a state of thermal equilibrium. This is not a peculiarity of our model, but a general property of some heat engines.

V. CONCLUSION

We have seen that heat engines may be equivalent to random mechanical engines of a special kind. Precisely, the model consists of two reservoirs having N locations, with n l , n h weight-1 balls, at different altitudes. The only concepts involved in the present paper are those of potential energy and of uniform probability. We have shown that the efficiency and work in our model coincide with the Carnot expressions in the limit where n l ≈ n h . Full Carnot cycles may be generated out of this elementary configuration.

to [START_REF] Zemansky | Heat and Thermodynamics[END_REF], ∆S(n l -1) -∆S(n l ) =ln( 1 l -1), and the increment of S h is ∆S(n h + 1) -∆S(n h ) = ln( 1 h -1). It follows that the increment in total entropy is ln(

1 h -1 1 l -1 ) with probability l(1 -h).
The average increment in total entropy is therefore

∆S = h(1 -l) ln 1 l -1 1 h -1 + l(1 -h) ln 1 h -1 1 l -1 = (h -l) ln 1 l -1 1 h -1 0. (A3)
As was said in the main text, when h ≈ l, ∆S ≈ 0 and the system tends to be reversible and to achieve the highest efficiency. Note that the entropy increment is non-negative for both a heat engine (h > l) and a heat pump (l > h).

More precisely, noting that to first order in δ ≡ h -l we have ln[(1/l -1)/(1/h -1)] ≈ δ/[l(1 -l)], and thus

∆S ≈ δ 2 l(1 -l) . ( A4
)
The whole model presented makes sense because the generated entropy is proportional to δ 2 while the work produced is proportional to δ, so that, for small δ, near reversibility does not imply vanishing work. Finally, we evaluate the variance of the total entropy increment. From the above expressions, it follows that

(∆S) 2 = h(1 -l) ln 1 l -1 1 h -1 2 + l(1 -h) ln 1 h -1 1 l -1 2 = (h + l -2lh) ln 1 l -1 1 h -1 2 , ( A5
)
and the variance reads

var(∆S) ≡ (∆S) 2 -∆S 2 = (h + l -2lh -(h -l) 2 ) ln 1 l -1 1 h -1 2 = [(h(1 -h) + l(1 -l)] ln 1 l -1 1 h -1 2 , (A6)
which vanishes, as well as the average entropy produced, when h ≈ l. To first order in δ ≡ h -l, we have var(∆S) ≈ 2 ∆S , (A7) a remarkably simple result. This result has been presented before in Ref. 7 just after Eq. ( 18), and also in previous works. This agreement shows that the properties of our model are, at least up to a point, generic, that is, generally applicable to heat engines.

One reason for the current misunderstanding is that part of the Carnot contribution appeared in print only decades after his early death. A second one is that his work was popularized by Clapeyron in a partly erroneous manner. A third one is the unfortunate use by Carnot of the word "calorique" to designate what Clausius later on called "entropy." The word "calorique" had been formerly employed by Lavoisier to designate some hypothetical heat substance. Clausius and Lord Kelvin, though highly appreciative of the Carnot work, missed part of his contribution because the notes mentioned above were not available to them. Let us cite also the paper by La Mer who expressed himself forth-fully as follows: "Unless the view-point that the Carnot theory is accurate is adopted, one is placed in the position of maintaining that Carnot succeeded in demonstrating some of the most fundamental and profound principles of physical science by the most masterly display of scientific double-talk that has ever been perpetrated upon the scientific world. This view is untenable. [START_REF] La Mer | Some current misinterpretations of N. L. Sadi Carnot's memoir and cycle[END_REF]" Much clarification is due to Hoyer. [START_REF] Hoyer | How did Carnot calculate the mechanical equivalent of heat?[END_REF] The historian of science R. Fox says: "Until recently there were very few studies concerning [the physics of Carnot reflexions]. Thanks to the work of Hoyer, we now have papers on the logical implications of the Carnot theory, and its analogy with modern thermodynamics [...]. It is not at all obvious to understand how Carnot [discovered the mechanical equivalent of heat]. Hoyer examined this question in two important papers. His articles provide complete references to earlier attempts [...]. He explains the exactness of Carnot calculation (which is even more striking if one uses modern values for the specific heats) by noticing that the Carnot theory is entirely accurate."

As far as the first law of thermodynamics is concerned, let us quote Carnot: [START_REF] Carnot | Réflexions sur la puissance motrice du feu[END_REF] "Heat is nothing but motive power, or rather another form of motion. Wherever motive power is destroyed, heat is generated in precise proportion to the quantity of motive power destroyed; conversely, wherever heat is destroyed, motive power is generated." Carnot calculated that 1 calorie of heat is equivalent to 3.27 J, instead of the modern value: 4.18 J.

As far as the second law is concerned, the key fact is that engine efficiencies reach their maximum value when they are reversible. Carnot reached this conclusion from the consideration that energy cannot be obtained for free. He therefore looked for heat processes that could work in a reversed manner, ending up with the celebrated "Carnot cycle." Slow processes are reversible, with the exception of thermal contacts. Because there is some confusion in the literature concerning the significance of the Carnot contribution with respect to the second law of Thermodynamics, let us quote Zemansky and Dittman: [START_REF] Zemansky | Heat and Thermodynamics[END_REF] "Carnot used chaleur when referring to heat in general, but when referring to the motive power of fire that is brought about when heat enters an engine at high temperature and leaves at low temperature, he uses the expression chute de calorique, never chute de chaleur [. . . ]. Carnot had in the back of his mind the concept of entropy, for which he reserved the term calorique."

FIG. 1 :

 1 FIG.1: Schematic representation of an engine that converts potential energy into work. The figure represents two lotterylike reservoirs located at altitudes, E l and E h ≥ E l , respectively, with N possible ball locations labeled 1,2,3...N (N = 5 in the figure). The number of weight-1 balls (black circles) is n l in the lower reservoir, and n h in the higher reservoir (with n l = 1, n h = 2 in the figure). Open circles may be viewed as weight-zero balls. For each reservoir, every ball configuration is equally likely to occur considering that the energies are the same. The complete figure should therefore consist of 5 × 10 = 50 similar figures exhibiting all the possible system configurations. Balls may be transferred from one reservoir to the other in location 1 only. If there is a ball in the upper reservoir at that location and none in the lower one (as is the case in the figure), the ball gets transferred from the upper reservoir to the lower one, thereby delivering energy. Conversely, if there is a ball in the lower reservoir and none in the upper one the ball gets transferred from the lower reservoir to the upper one, thereby absorbing energy. In some limits, the efficiency is the same as for a Carnot cycle.

ACKNOWLEDGMENTS

The authors thank the anonymous referees for sharp reading and useful comments.

APPENDIX A: FLUCTUATIONS Some readers may not be particularly interested in the fluctuations of the quantities of major interest considered in the main text, namely the work produced and the high-temperature reservoir heat loss. However, fluctuations are important in some applications. We show in this appendix that the variance of these quantities can be readily obtained from the ball model.

Recall that in our model a cycle consists of exchanging simultaneously a ball from the higher reservoir (at altitude E h and containing n h weight-1 balls and N -n h weight-0 balls) and a ball from the lower reservoir (at altitude E l and containing n l weight-1 balls and N -n l weight-0 balls). The probability that a weight-1 ball be picked up from the higher reservoir is h ≡ n h /N . The probability that a weight-1 ball be picked up from the lower reservoir is l ≡ n l /N . The two events are independent.

Setting E ≡ E h -E l , we have seen in the main text that the average work produced per cycle is W = E(h -l). We now evaluate W 2 . The probability that a weight-1 ball falls and none is raised is h(1 -l). If this event occurs, the work performed squared is equal to E 2 . Conversely, the probability that a weight-1 ball is raised and none falls is l(1 -h). If this event occurs, the work performed squared is again equal to E 2 . Because the two other cases produce no work, it follows that

Therefore, the variance of the work produced reads

In the limit h ≈ l considered in the main text, we have

Let us now consider the total entropy produced ∆S ≡ ∆S l + ∆S h . When a weight-1 ball is being transferred from the high reservoir to the lower one and none from the low reservoir to the higher one, an event that occurs with probability h(1 -l), the increment of S l is, according to Eq. ( 5), ∆S(n l + 1) -∆S(n l ) = ln( 1 l -1), and the increment of S h is ∆S(n h -1) -∆S(n h ) =ln( 1 h -1). It follows that the increment in total entropy is ln(

) with probability h(1 -l). When a ball is being transferred from the low reservoir to the higher one and none from the high reservoir to the lower one, an event that occurs with probability l(1 -h), the increment of S l is, according

APPENDIX B: BRIEF HISTORY OF THE CARNOT DISCOVERY

The motivation for introducing the present account of Carnot discoveries is that, in spite of the efforts of a number of motivated scientists (see below), they remain insufficiently appreciated.

The Carnot theory, which appeared in a book in 1824 and in unpublished notes, established both the first and the second laws of Thermodynamics. This fact has been pointed out by a number of authors who took the trouble of looking carefully at what Carnot actually said, clarifying the terminology employed, up-dating the system of units, and correcting minor errors in the experimental data. One of these authors is the Nobel-prize winner A. Kastler. [START_REF] Kastler | Sadi Carnot et l'essor de la Thermodynamique[END_REF] We translate from Kastler paper: "Had Sadi Carnot lived longer [...] he would be considered today not only as the author of the Carnot principle (called by Clausius second principle of Thermodynamics) but also as the author of the first principle of that science." Another author is the russian scientist V.M. Brodiansky. [START_REF] Brodiansky | Sadi Carnot[END_REF] At the end of his book, p. 228 and 229, the author lists ten major achievements of Carnot. The first reads "Carnot is the first to formulate the second principle of thermodynamics" and the eighth says "He was among the firsts to formulate strictly the law of equivalence between heat and work, and the first to calculate with sufficient accuracy its numerical value."


S Papa
email: stefpapa@unina.it

S Patalano

A Lanzotti
email: antonio.lanzotti@unina.it

S Gerbino

J Y Choley

Towards the Integration of Thermal Physics and Geometrical Constraints for a 3D-Multiphysical Sketcher

Keywords: Multiphysics, TTRS, Modelica language, preliminary design

The paper deals with the relationship between geometrical or topological entities of complex systems and the physics in which the systems are involved. In particular, the paper deepens the integration of thermal physics with geometrical constraints. Therefore, the results of the work could be used within the development of a 3D-multiphysical sketcher viz., a tool for the preliminary design of complex systems, characterized by the presence of one or more overlapping physics. Firstly, the model of Topologically & Technologically Related Surfaces (TTRS) is used and related Minimal Reference Geometrical Elements (MRGEs) and constraint conditions are implemented by means of Modelica language. Then, the implementation of new objects for MRGEs and constraint conditions are applied to a mechanical assembly. Finally, the integration of TTRS model within thermal physics is applied to the case of the layout designing for electronic boards.

I. INTRODUCTION

The design of a complex system nowadays deals with the interaction of many components involving different physics. The designer uses a typical procedure, passing from the preliminary design to the final configuration, validated through several simulations. In general, the multidisciplinary aspect of a complex system, such as a mechatronic system [START_REF] Van Amerongen | Mechatronic design[END_REF], requires an environment suited to all steps of the design, which allows to model mechanics, electronics, automation, and also the interaction between the different physics involved [START_REF] Plateaux | Méthodologie de conception d'un produit mécatronique" 19ème Congrès Français de Mécanique[END_REF].

A methodology for the conceptual design of complex systems, developed at SUPMECA in Paris, proposes the combined use of various instruments widely applied during the different phases of the design process [START_REF] Plateaux | A need for the definition of a topological structure for the complex systems modeling[END_REF], [START_REF] Plateaux | Vers un environnement intégré pour le prédimensionnement-Modelica 3D", 19ème Congrès Français de Mécanique[END_REF].

Nowadays, many studies have been accomplished, but they focus just on each level of the V-Cycle and do not allow a continuity of modeling from the definition of requirements to virtual prototyping [START_REF] Ferretti | Virtual prototyping of mechatronic systems[END_REF]. On the opposite, the approach in [START_REF] Plateaux | Towards an Integrated Mechatronic Design Process[END_REF] introduces a hybrid methodology based on different tools, languages and methodologies, such as SysML [START_REF] Johnson | Integrating models and simulations of continuous dynamics into SysML[END_REF], [START_REF] Penas | A telescope robust preliminary design with SysML[END_REF], Modelica [START_REF] Lind | Model Based Systems Engineering for Aircraft Systems-How does Modelica Based Tools Fit?[END_REF] and CATIA [START_REF] Plateaux | Integrated Design for a Mechatronic System with CATIA V6[END_REF], [START_REF] Kleiner | Model based design with systems engineering based on RFLP using V6[END_REF]. In particular, the analysis of a complex system starts from its breakdown into several devices, sub-assemblies or components that could be considered homogeneous and consistent from the topological, functional and multi-physical point of view, respectively. Such goal is accomplished by means of dedicated tools [START_REF] Choley | A consistent preliminary design process for mechatronic systems[END_REF]. Each device has a behavior related to one or more physics and contributes, therefore, to the overall multiphysical field that characterizes the complex system. Once identified the functional requirements and the physical parameters of the complex system, the next step deals with the definition of the logical architecture, the connection of different components characterized by their dynamic behaviors and, finally, the simulation of whole system performances. The language used for this step is Modelica [START_REF]Modeling of Complex Physical Systems[END_REF], [START_REF] Fritzson | The modelica object-oriented equation-based language and its open modelica environment with metamodeling, interoperability, and parallel execution[END_REF]. In fact, the libraries developed using Modelica already contain objects and models aimed to simulate different physics, including related equations, and the existing connectors could be used to connect devices by means of compatible parameters [START_REF] Patalano | A Digital Pattern Approach to the Design of an Automotive Power Window by means of Object-Oriented Modelling[END_REF], [START_REF] Herfs | Design of Feed Drives with Object-Oriented Behavior Models[END_REF].

The simulation of multiphysical behavior of a complex system could be very useful during preliminary design. By creating a tool i.e. a 3D multiphysical sketcher for preliminary design of complex systems, in fact, it is possible to reduce the successive use of Finite Element (FE) simulations. Such simulations represent the most expensive task in terms of time consumption for solving the dynamic behavior of multiphysical systems [START_REF] Plateaux | Introduction of the 3D Geometrical Constraints in Modelica[END_REF]. To accomplish the simulation of different and overlapping physics, it is necessary to determine the relationship existing between geometrical or topological entities of the system and the physics in which the system is involved. A method to establish this relationship is to use Topologically & Technologically Related Surfaces (TTRS) [START_REF] Clement | The TTRS: 13 constraints for dimensioning and tolerancing. geometric design tolerancing: theories, standards and applications[END_REF], together with the related Minimal Reference Geometrical Elements (MRGEs) and constraint conditions. The present paper deepens the relationship between geometrical or topological entities of complex systems and the thermal physics in which the systems is involved. The paper is arranged as follows. Section 2 presents the implementation of the set of MRGEs within Modelica environment and the application of such MRGEs to a mechanical assembly. Section 3 summarizes the logical scheme supporting the action of a 3D multiphysical sketcher. Section 4 illustrates the application of the integration of TTRS model within thermal physics to the case of the designing for electronic boards. Finally, Section 5 draws the conclusions.

II. MODELLING TTRS WITHIN MODELICA LANGUAGE

The coupling of information related to the position and orientation of different objects in a three-dimensional space could be accomplished using Topologically & Technologically Related Surfaces (TTRS) and Modelica language. According the TTRS model [START_REF] Clement | The TTRS: 13 constraints for dimensioning and tolerancing. geometric design tolerancing: theories, standards and applications[END_REF], any surface or association of real surfaces of an object can be associated to a kinematic invariance class named TTRS. There are 7 classes of TTRS, classified according to increasing Degrees of Freedom (DOF): Identity equals to 0, Revolute, Prismatic and Helical equal to 1, Cylindrical equals to 2, Spherical and Planar equal to 3. Kinematic joints can be expressed by TTRS. Each TTRS is characterized by a MRGE. Each MRGE is made up of a combination of one point and/or one line and/or one plane, but it does not take into account the intrinsic dimensional aspect of the object (Table I).

In order to assembly two geometrical objects, i.e. to define geometrical constraints between two TTRS, 44 associations were identified depending on the relative orientations and positions. They correspond to the most elementary formulation of a kinematic connection between objects.

TABLE I. A CONE ASSOCIATED TO TTRS "REVOLUTE SURFACE" WHOSE MRGES ARE A POINT AND A LINE

Surface

Class MRGE

Revolute Surface

Point-Line

Finally, the study of related MRGEs enables to have only 13 possible cases of constraints. These constraints between MRGEs, numbered from C1 to C13, use algebraic expressions and parameters (Fig. 1) [START_REF] Clement | The TTRS: 13 constraints for dimensioning and tolerancing. geometric design tolerancing: theories, standards and applications[END_REF]. Firstly, each MRGE (point, line and plane) was implemented in Modelica environment as an object. The primary object is the point, defined as a vector with three variable coordinates. The coordinates of the point can be assigned as a datum or evaluated during a simulation (point or point_u in Fig. 2, respectively). The line block is created using a class containing both two vectors for the coordinates of two points, and two matrices for parametric and Cartesian coordinates. When simulation starts, the environment evaluates both Cartesian and parametric coordinates of the objects. A line could be defined by means of two points, or obtained using geometric conditions, as the intersection of two planes. A plane could be defined by means of three points. For this reason, the line object contains both parametric and Cartesian coordinates. In Fig. 3 the coordinates of the line, defined through two datum points or the intersection of two planes, are shown. The equations of the planes are ax+by+cz+d=0 and a'x+b'y+c'z+d'=0 respectively. In particular, Fig. 3 depicts the condition related to the planes represented by equations y=0 and z=0. The 13 constraints were generated in Modelica environment by using MRGEs. Each block was created by using vectors and parameters, in order to calculate the coordinates of the involved MRGE. The constraint C2, for example, related to the distance between two points, uses the parametrical Equation in (1):

oint2 = oint1 + v c • (1)
In particular, vector is the unitary vector between the two points and d is the parameter that defines the position of point2 respect to point1. The components of vector are evaluated by initial conditions related to the two points or by means of geometrical constraints coming from other blocks. In fact, an additional connector located on the top right of the block was added: when this connector is used, the direction of vector is evaluated from other blocks of the model. Similar procedures were used to implement the whole set of 13 constraints. Fig. 4 depicts the 13 constraints and the implementation related to C2 constraint. In particular, a counter "_x" was added to the label of each constraint to univocally identify the instance used in the system context. In order to verify the implemented objects for MRGEs and the 13 constraints, a lifting valve assembly was preliminarily modelled within Modelica environment. The assembly consists in a vertical valve moved by an eccentric shaft rotating around the horizontal axis. The nominal axis (axis_nom) is aligned to x axis and defined by two datum points (point1 and point2), while the eccentric axis (eccentric) is parallel to the nominal one and translated along y direction by the constraint C12_1. The valve, according to TTRS model, is a revolute surface, so it is associated to the MRGEs line and point. The line is the axis of revolution (valve) and it is defined perpendicular to axis_nom by the constraint C12_2 and passing through point2. The point (point_u1) is the center of the valve and it belongs to the axis of revolution by means of C4_1 constraint; the distance for point_u1 position is given through the C5_1 constraint (Fig. 5).

III. THE ROLE OF TTRS MODEL CONSTRAINTS IN A 3D MULTIPHYSICAL SKETCHER

The strong integration and the geometrical compactness among the different components of modern complex systems carry as a consequence the proximity between different multiphysical domains and the inevitable physics interactions. In particular, the devices that compose the system are immersed in media with known physical characteristics, which determine the values of the multiphysical interactions. The connectors implemented for each device enable the multiphysical interactions (Fig. 6). The simulation of a complex system works both in terms of time, thanks to the solution of equations by means of Modelica solvers and in terms of variational changes of geometries. The role of geometrical constraints from TTRS model, here implemented in Modelica environment, is to accomplish the updating of geometrical conditions between devices, in a 3D space, during multiphysical simulations. Fig. 6. Logical scheme for the interaction between devices to be modelled in a 3D multiphysical sketcher At this step, this goal is accomplished by using the same parameters and objects related both to 13 constraints and the simulation of physical interactions.

IV. CASE STUDY: LAYOUT OF COMPONENTS IN PRESENCE OF HEAT TRANSFER

The case study consists of 2 masses in a 3D space, 1 thermic relation for heat transfer, and 1 metal media for conduction. The two-masses system refers to the case of electronic boards as in [START_REF] Roumizadeh | Pre-designing an electronic card using a multi-domain models approach with DYMOLA[END_REF], or to the case of the evaluation board depicted in Fig. 7 [START_REF] Vv | Stratix Documentation[END_REF]. In the board, a 10 watts power Field-Programmable Gate Array (FPGA) transmits thermal energy to a set of DDR3 memory modules. Therefore, a limit working temperature for the DDR3 modules should not be exceeded. At this stage, a preliminary model for conductiveconvective thermal exchange has been implemented. In particular the model uses the classes belonging to Modelica libraries together with the ad hoc models implemented for the 13 constraints and related to TTRS. In fact, by considering the TTRS model for the C2 constraint i.e. the distance between two geometrical points, the final displacement of the mass, representing the DDR3 modules, was accomplished (Fig. 8).

The distance between the two lumped masses was associated to the balance distance in the conduction equation, by using Modelica environment (Eq. 2). (2) e=e0+alfa]dT; TTRS.C2 c2_1(Vector={1,2,3}); c2_1.d=thermalConductor2_1.e; ……

……

The result was the displacement of the second mass to the allowed distance, evaluated according to thermal parameters in terms of power, heat capacity, thermal conductivity and initial temperatures (Fig. 9). The automatic displacement of the two lumped masses is actually accomplished using the 3D animation window related to the Modelica library for multi-body systems.

V. CONCLUSIONS

The paper summarizes the preliminary results related to the integration of thermal physics with geometrical constraints, i.e. the possibility to use a thermal exchange to impose a variational change to a set of assigned MGREs (point, line, plane) that represent the complex system. Therefore, such results could be used within the development of a 3Dmultiphysical sketcher aimed to preliminary designing of complex systems.

The objects developed within Modelica environment assure the possibility to model every complex system, including all possible constraints conditions between components, thanks to the completeness of TTRS approach that is used as a basis. Furthermore, the approach to simulation, used in the work, operates in terms of time thanks to the solution of equations through Modelica solvers but also in terms of variational changes related to geometrical elements. Therefore, different design solutions could be explored by means of simulation. A first possibility deals with the evaluation of transitory events related to parameters, as in case of working temperatures for critical components. Otherwise, final displacements, such as relative positioning of components, could be simulated providing a significant support to designers.

The developed case study related to a two-mass system showed the potentiality of the approach and the data coming from such simulation. Further works have to be developed to test the whole set of constraints as well as the presence of coexisting and overlapping physics.

Fig. 1 .

 1 Fig.1. The 13 constraints within TTRS model[START_REF] Clement | The TTRS: 13 constraints for dimensioning and tolerancing. geometric design tolerancing: theories, standards and applications[END_REF]

Fig. 2 .Fig. 3 .

 23 Fig. 2. Objects of MRGEs in Modelica environment

Fig. 4 .Fig. 5 .

 45 Fig. 4. Blocks related to 13 constraints and the code related to C2 constraint, within Modelica environment

  Real e; equation G = k*A/e; Q_flow = G*dt;

Fig. 7 .Fig. 8 .Fig. 9 .

 789 Fig.7. Relative positioning of DDR3 modules and FPGA related to the electronic board in[START_REF] Vv | Stratix Documentation[END_REF]

ACKNOWLEDGMENT

The present work was developed with the contribution of the Italian Ministry of University and Research (MIUR) performing the activities of the PON01_01268 DIGIPAT Project, Digital Pattern Product Development: A Pattern Driven approach for industrial product design, simulation and manufacturing. Finally, the authors thank Eng. Giovanni Marco Di Vincenzo for his technical support.