Coherent application of a contact structure to formulate Classical Non-Equilibrium Thermodynamics

This contribution presents an outline of a new mathematical formulation for Classical Non-Equilibrium Thermodynamics (CNET) based on a contact structure in differential geometry. First a non-equilibrium state space is introduced as the third key element besides the first and second law of thermodynamics. This state space provides the mathematical structure to generalize the Gibbs fundamental relation to non-equilibrium thermodynamics. A unique formulation for the second law of thermodynamics is postulated and it showed how the complying concept for non-equilibrium entropy is retrieved. The foundation of this formulation is a physical quantity, which is in non-equilibrium thermodynamics nowhere equal to zero. This is another perspec-tive compared to the inequality, which is used in most other formulations in the literature. Based on this mathematical framework, it is proven that the thermodynamic potential is defined by the Gibbs free energy. The set of conjugated coordinates in the mathematical structure for the Gibbs fundamental relation will be identified for single component, closed systems. Only in the final section of this contribution will the equilibrium constraint be introduced and applied to obtain some familiar formulations for classical (equilibrium) thermodynamics.


Introduction
The main objective of this paper is to derive a mathematical framework for macroscopic non-equilibrium thermodynamics, which is not based on some kind of an (implicit) equilibrium assumption. Instead it will be shown, that the equilibrium conditions are "contained" in the proposed framework by applying an additional constraint. There are two key components in this innovative derivation: 1) a generalization of Gibbs fundamental relation for non-equilibrium thermodynamics that is based on the dissipation of energy and 2) a unique formulation of the second law of thermodynamics, including a mathematical proper derivation of non-equilibrium entropy as a thermodynamic state function. This paper presents the mathematical framework of Classical Non-Equilibrium Thermodynamics (CNET) based on a harmonious integration of mathematics and physics.
In his monumental work "On the Equilibrium of Heterogeneous Substances" [1] Josiah Willard Gibbs (1839Gibbs ( -1903 postulates a relation that is fundamental for thermodynamics, viz. Gibbs postulates this relation for a mixture of spc N non-reacting, chemical species in a closed system, which is in a thermodynamic equilibrium state. Often this relation is derived by a simple elimination of the reversible heat flow from both laws of thermodynamics [2]- [7] or it is applied in non-equilibrium states by using the local equilibrium hypothesis [8]. In this paper, only a state space for non-equilibrium thermodynamics will be postulated and the corresponding generalization of the fundamental relation will be derived. This paper will be restricted to closed, single component systems, but a proposition to include the physical phenomena of open systems with chemical reactions can be found in [9]. Based on the original work of Rudolf Clausius (1822-1888), the macroscopic entropy of systems in thermodynamic equilibrium is often defined as the quotient of heat flow and temperature. For non-equilibrium processes this definition is then simply extended to an inequality (e.g. Clausius inequality [6]) or an additional term is included in the definition of macroscopic entropy [10]. The major drawback of these approaches is, that it is not obvious that entropy is also a state function in non-equilibrium thermodynamics. It is often reasoned, that the non-equilibrium entropy has to be a thermodynamic state function. This paper presents a unique postulate for the second law of thermodynamics, which does not explicitly include the concept of entropy. Based on a mathematical property of this postulate, the non-equilibrium entropy will be derived with the appropriate mathematical structure of a thermodynamic state function. This paper is confined to the thermodynamic state space, there is no reference to temporal or spatial coordinates. Section 2 starts with the introduction of a thermodynamic state and defines a corresponding state function. The mathematical machinery of contact geometry is used to postulate the so-called non-equilibrium state space ( ) 1 , G G M ∆ . Darboux's theorem can be derived for a contact structure, which possesses the mathematical structure of the Gibbs fundamental relation in thermodynamics (viz. Equation (1)). In the third section the first law of thermodynamics is postulated in such a way, that the internal energy is a state function that complies with the appropriate definition. The next step is to postulate a unique formulation for the second law of thermodynamics and the complying derivation of non-equilibrium entropy. Both sections are combined in Section 4 to identify the thermodynamic potential as Gibbs free energy and to identify the pairs of conjugated coordinates in Darboux's theorem. With this identification, a generalized Gibbs fundamental relation for non-equilibrium thermodynamics is derived, which includes sufficient additional degrees of freedom to model non-equilibrium phenomena. The postulate for a thermodynamic equilibrium is postponed until the final section of this paper. It will be shown how the equilibrium constraint reduces Gibbs fundamental relation to a Pfaffian equation, which is the basis for the derivation of the so-called Maxwell relations in thermodynamics [3] [5] [6] [7].

Non-Equilibrium State Space
A powerful feature of phenomenological thermodynamics is its capability to make statements about the macroscopic state of a system without detailed knowledge of its microscopic details. This feature is based on the phenomenological observation, that a finite number of macroscopic properties is required to completely describe the thermodynamics of a system. Non-equilibrium thermodynamics will be described in a separate state space  , which is based on statistical averages of the phase space in statistical mechanics.
A . Notice that there is no explicit expression for time nor for spatial distributions of macroscopic properties within the system.
Non-equilibrium thermodynamics describes changes in a system, which depend on changes in its state Ξ due to some arbitrary process γ . There are various macroscopic properties of the system that depend on the state Ξ , which requires the definition of a so-called state function  . Definition 1 [Non-equilibrium state function]. The 0-form that is generated by an exact 1-form 1 µ , is defined as a non-equilibrium state function. Hence, In this definition symbol d denotes an exterior derivative with respect to the thermodynamic coordinates Θ , which makes it an essential part of the definition. It describes the dependencies of the thermodynamic changes, which are given by the set Ξ of independent macroscopic properties of the system (again, there is no reference to temporal or spatial coordinates). Another important aspect of the above definition is that any non-equilibrium property can return to its initial condition after an arbitrary periodic process has concluded a complete period 1 .
The manifold G M is not sufficient to completely describe non-equilibrium thermodynamics. By using the mathematical framework of contact geometry, the thermodynamic space can be based on the concept of a contact structure. In 1973 Robert Hermann [15] suggested to formulate equilibrium thermodynamics based on a ( ) cjg 2 1 N + -dimensional differential manifold G M and a non-degenerating contact 1-form 1 G ∆ . In this paper his mathematical framework will be used as the basic building block to formulate non-equilibrium thermody- The Gibbs state space  is defined by the contact structure ( ) In the general context of this paper, it is very important to notice, that this postulate is neither the first law nor the second law of thermodynamics. The above postulate states that the contact structure ( ) non-equilibrium thermodynamic state space. In this paper, all thermodynamic observations will be formulated in this state space. The non-degenerate Gibbs contact 1-form 1 G ∆ has two important mathematical properties (see [16] [17]): 1 The macroscopic property has obtained an identical statistically averaged value compared to its initial value, but this does not mean that the probability distribution is identical to its original distribution (nor that the microstates are identical). This observation is a severe release of constraints compared to traditional equilibrium based approaches.
• it is never equal to zero, so it is either everywhere positive or it is everywhere negative, • it is not completely integrable (Frobenius condition).
Both these properties play a key role in the formulation of the second law of thermodynamics in section 3. The physical interpretation of the quantity 1 G ∆ is postponed until the next section.
According to Darboux's theorem (see [16]   this point it must be emphasized that  , X  and Y  are coordinates in the Gibbs state space  that defines non-equilibrium thermodynamics. Equation (6) from Darboux's theorem specifies only the functional relation between these non-equilibrium coordinates and captures the complete mathematical wealth of irreversible, non-equilibrium thermodynamics. One of the remaining issues will be to identify the physical meaning of the thermodynamic potential  and the set of canonical coordinates X  and Y  . But before these coordinates can be identified, it is required to introduce the first and second law of thermodynamics.

Thermodynamic Laws
The distinction between exact and inexact 1-forms is an essential part of the mathematical formulation of the first and second laws of thermodynamics. The first law of thermodynamics states that for an arbitrary periodic process, the energy at the start and end of a complete period are identical. This statement complies with the definition of a non-equilibrium state function (e.g. see Definition 1). Both the amount of heat flow 1 α and work flow 1 ω are each path dependent quantities (viz. both are inexact 1-forms), so they are not conserved over a complete period in a periodic process. The first law of thermodynamics states that their sum is conserved.
Postulate 2 [First law of thermodynamics]. Summation of the inexact 1-forms for heat flow 1 α and work flow 1 ω results in an exact 1-form 1 Γ , viz.
( ) ( ) The crucial feature in the above postulate is, that the sum of two inexact 1-forms 1 α and 1 ω results in an exact 1-form 1 Γ . According to Definition 1 there exists then a non-equilibrium state function, which will be called internal energy The internal energy is conserved over a complete period of an arbitrary periodic process due to the definition of the exterior derivative (viz. , which is equivalent with the cycle integral).
In nature, it is observed that, for closed systems, processes are such that the system eventually approximates an equilibrium state. Once a system has obtained such an equilibrium state, interactions with the surroundings of the system are required to disturb this equilibrium. Hence, processes are directed towards a mathematical extremum, which corresponds with the equilibrium state, and this is irreversible when there is no interference from outside the system.
Observations of these phenomena are for the first time published by Sadi Carnot (1796-1832, see [4] [21]) and later mathematically formulated by Rudolf Clausius (see [22] [23]). Clausius postulates, that a system in an equilibrium state has a macroscopic property, which he calls entropy  and is mathematically defined by 2 As is already stated before, the heat flow 1 α is a path dependent quantity and thus an inexact 1-form (viz. in Table 1 in Postulate 2. In classical thermodynamics, the above definition is then often extended to non-equilibrium states by replacing the equal sign with an unequal sign or by adding some other term 3 . In such an approach, it is not clear that entropy  is a non-equilibrium state function in thermodynamics, since it is not properly derived as an exact 1-form. This lack of mathematical accuracy might be one of the reasons why there are so many formulations of non-equilibrium thermodynamics. One of the less famous pioneers in thermodynamics is the Greek mathematician Constantin Carathéodory (1800-1900). His work [30] [32] [33] on the use of Pfaffian equations for the mathematical formulation of thermodynamics has been crucified 4 , although it is one of the first attempts for a rigorous formalization of thermodynamics. In the second axiom in his 1909 paper [31], he has an interesting formulation for the second law of thermodynamics that is based on geometrical considerations: Axiom II: In jeder beliebigen Umgebung eines willkürlich vorgeschriebenen Anfangszustandes gibt es Zustände, die durch adiabatische Zustandsänderungen nicht beliebig approximiert werden können 5 .
Above axiom is in the literature also known as Carathéodory's inaccessibility condition or as Carathéodory's principle [30]. Notice that Carathéodory makes a statement about an arbitrary initial state, so in this axiom there is no explicit restriction to a thermodynamic equilibrium. But in his paper an adiabatic process is defined as a process where the systems remain in (phase) equilibrium when the deformable coordinates change 6 . So the heat transfer is not necessarily always equal to zero, which is in the textbook of Bamberg and Sternberg [13] [24] elegantly formulated by the mathematical concept of a null curve 0 γ , viz.
Based on the Frobenius integration theorem the second relation is derived from Axiom II and therefore also known as Carathéodory's theorem [24] [35] [36]. So modern interpretations of mathematical formulations for the definition of entropy in classical thermodynamics show, that the Frobenius integration theorem plays a crucial role. But opposite to the before mentioned formulations, in In these relations N denotes the uncompensated heat in analogy to the "uncompensirten Verwandlung" N in the work of Clausius [23]. The last relation with  can only be found in his paper [28], where his Equation (8) has the same structure as Equation (13) in this paper. Opposite to this paper, 1 ϑ − is not identified as an integrating factor for the term d and the quantity d itself is not specified in further detail. 4 See the Appendix to the Historical Indroit: Failure of Carathéodory's attempt to set the house in order' in the textbook on Rational thermodynamics by Truesdell (pp. 49-57 in [34]). 5 In every neighborhood of an arbitrary thermodynamic state there exist states that cannot be approached by an adiabatic process. this paper Frobenius integration theorem is not applied to the inexact 1-form 1 α for heat flow. As is shown in both before mentioned cases, this would explicitly or implicitly require that there is an equilibrium state. Recall that the Gibbs contact 1-form 1 G ∆ is explicitly postulated to be non-degenerate, so it is not integrable by itself. Therefore, and this is a unique feature of the mathematical formulation in this paper, Frobenius integration theorem is applied to the difference between the heat flow and dissipation, viz. ( ) ( ) Similar to the approach of Carathéodory, the concept of entropy is not defined in the above formulation for the second law of thermodynamics. Based on the integrability condition in Postulate 3 it can then be shown (see [18] [37]), that there exists exactly one pair of conjugated coordinates. Here these coordinates are denoted by the absolute temperature ϑ and non-equilibrium entropy  , such that ( ) The exterior derivative of entropy is an exact 1-form due to the presence of the integrating factor 1 ϑ − in the right-hand side of Equation (13).
Hence, the existence of entropy  as a non-equilibrium state function is based on a different mathematical mechanism compared to internal energy are introduced in this paper as non-equilibrium state functions. Finally, notice that both the absolute temperature ϑ and the Gibbs contact 1-form 1 G ∆ are nowhere equal to zero, so they are either everywhere positive or everywhere negative. Hence, in this paper the second law is not dominated by an inequality, but by the observation that certain physical quantities cannot be equal to zero.
An integral part of the definition of a non-equilibrium state function is, that the initial value is identical to the final value at the end of a complete period in a periodic process. This means that the initial and final non-equilibrium state Ξ must be identical and consequently this has to hold for every macroscopic property Θ . As is already mentioned in Section 2, the likelihood that the statistically averaged value of every macroscopic property is recovered after a complete period in a real physical system is very small. But it is not equal to zero and thus it has to be considered as a limiting case in non-equilibrium thermodynamics. Consider Equation (13) for the case of a complete period, then Both the absolute temperature ϑ and the dissipation 1 G ∆ are never equal to zero, hence their quotient is unequal to zero. This means that the right-hand side in the last relation is always either positive or negative. Consequently, the heat flow in a periodic process must have the same direction over every completed period and thus a heat flow is required to drive a periodic process. Or conversely, in non-equilibrium thermodynamics there does not exist a process that is both periodic and adiabatic at the same time. This is an intriguing observation, since Clausius's formulation for entropy is based on periodic processes, while Carathéodory uses adiabatic processes to specify the second law of thermodynamics.

Identification of Thermodynamic Coordinates
In this section the thermodynamic potential  and the cjg N pairs of conjugated coordinates X  and Y  in Equation (6) will be identified for the case of a single component, closed system (e.g. there is no mass transfer with the surrounding of the system). The basic elements for this identification are both laws of thermodynamics, but first the work flow 1 ω has to be specified in more detail. In general, every 1-form can be written as a linear combination of the corresponding coordinates. The coordinates for work are force F and displacement D , thus the inexact 1-form 1 ω for the work flow can be written as  (8) and (13), then the following equation can be obtained By comparing this equation with Equation (6), one could argue that the thermodynamic potential and the set of conjugated coordinates are identified. But this identification would not be a sound mathematical proof due to the presence of the contact 1-form 1 G ∆ . Furthermore, this reasoning obscures another important thermodynamic quantity, which is already hidden in the three proposed postulates.
Opposite to most textbooks on thermodynamics, in this paper the definition of the Gibbs free energy  is not one of the building blocks for the mathemat- thermodynamics and the above general specification for the work flow 1 ω . Theorem 1 [Gibbs free energy]. For a single component, closed system the thermodynamic potential  in the generalized fundamental relation (e.g. Equation (6)) is the so-called Gibbs free energy  , viz. .
The corresponding pairs of conjugated coordinates X  and Y  are: and , and and , , 2, 3, , . and Proof. The proof starts with the combination of the generalized Gibbs fundamental relation and the second law of thermodynamics by substituting Equation (13) into Equation (6). Then replace the 1-form 1 α for heat flow using the first law of thermodynamics. Finally, use the above specification of the work flow 1 ω to obtain Notice that due to these steps the Gibbs contact 1-form 1 G ∆ is removed from the above equation, so the Gibbs fundamental relation is reduced to a Pfaffian equation where . This is the essential step that provides crucial features for the following derivation.
The next step in this proof is based on a unique property of thermodynamic properties: thermodynamic properties are either extensive or intensive quantities. Extensive quantities are proportional to the size (or extend) of the thermodynamic system and therefore scalable, while intensive quantities are independent of the size of the system. The total volume  of the system is used here to scale every extensive quantity in Equation (19) Consider the case that all conjugate coordinates denoted by X  are extensive quantities (viz. then  (20) to the corresponding terms in Equation (19) and apply the product rule of differentiation. Rearrange the resulting equation by collecting all terms with either d or The total volume  of a thermodynamic system is larger than zero, while the change of volume d can be positive, negative or equal to zero. So, for an arbitrary system, above equation can only hold when both terms between the brackets are equal to zero. Hence, the following two relations have been derived Equation (23) 2 is obtained by multiplying Equation (23) 1 with the total volume  . The thermodynamic potential  , as it is specified in Equation (23), is called the Gibbs free energy and is therefore denoted by symbol  . The final step in this proof is to identify the set of conjugated coordinates X  and Y  . Apply therefore the exterior derivative to Equation (23) 2 with =   and use again the product rule of differentiation, then This is again a Pfaffian equation for a thermodynamic state function, either for the Gibbs energy  or the internal energy  . Subtract then Equation (19) from the above Pfaffian equation, which results in the following relation There are Again, for an arbitrary thermodynamic process the above equation can only hold when all terms between brackets are equal to zero. The set of extensive conjugated coordinates { }   is therefore also determined.  Equation (17), which is in this paper derived in the above proof, is in the literature also known as Euler's relation (e.g. see [38] [39] [40]). Substitute Equation (17) and the pairs of conjugated coordinates in Theorem 1 into Equation (6) to obtain the following generalized formulation for the Gibbs fundamental relation Equation (16) can be derived by subtracting the above equation from Equation (27), where =   . The equation can also be derived by repeating the proof of Theorem 1 for the reversed case, where every X  is an intensive quantity and every Y  is an extensive quantity (viz. then . This case shows that the thermodynamic potential is specified by the following Euler equation Both Equations (16) and (27) are implementations of Equation (6) for single component, closed systems, which is therefore a generic formulation of the third key element of thermodynamics (besides both laws of thermodynamics). Both equations confirm that Gibbs free energy  and internal energy  are thermodynamic potentials according to Definition 2. Finally, notice that both equations contain identical 1-forms, viz.

Equilibrium Constraint
So far, this paper has been focused on the general case of non-equilibrium states and arbitrary irreversible processes. For an isolated system (then there are no interactions with the surroundings), it is in nature observed, that the macroscopic state of the system does not change any more if one waits sufficiently long. The corresponding thermodynamic state is called the equilibrium state of the system for which the change of a state function  is equal to zero, hence Molecules do not stop moving in such an equilibrium state; there are many fluctuations of the microstates, which are not visible on the macroscopic level. On a macroscopic level, any perturbation away of an equilibrium state requires some kind of exchange with the surrounding of the system. The above equation implements a mathematical extremum, which is not present in the proposed mathematical framework for non-equilibrium thermodynamics due to the mathematical properties of the Gibbs contact 1-form 1 G ∆ . To further clarify this point, consider Equation (13) for the case of a closed system without any heat flow, then The absolute temperature ϑ and the Gibbs contact 1-form 1 G ∆ are defined to be everywhere unequal to zero. So, in the case of non-equilibrium thermodynamics, the change of entropy d cannot be equal to zero, as is required for an equilibrium state. Based on the above considerations it becomes clear, that an additional mathematical construct is required to embed equilibrium thermodynamics within the proposed mathematical framework. Consider therefore an arbitrary irreversible process : This postulate can also be found in the original work of Hermann [15] and Mrugała [44] on thermodynamics in a geometric framework. The modern literature (e.g. see [15] [33]).
The distinction between the equilibrium Legendre state space ( ) transition between two equilibrium hypersurfaces requires that the thermodynamic system has been in a non-equilibrium state. For instance, the non-equilibrium states which connect the equilibrium states A and B (here shown as a jump by the dotted line). Notice that these non-equilibrium states depend, besides 1 Y and 2 Y , also on the corresponding conjugated coordinates 1 X and 2 X . Next some results will be obtained for the case of equilibrium thermodynamics. An underline will be used in this paper to denote symbols that refer to an Then a similar procedure can be applied to pairs of conjugated coordinates in Equation (6), where the 1-form 1 Thus, application of the equilibrium map in Postulate 4 to the generalized Gibbs fundamental relation in Equation (6) The relations in Equation (35) Since the Gibbs contact 1-form 1 G ∆ is everywhere unequal to zero, it is not possible to derive relations from the terms between brackets. This observation confirms that the relations in Equation (35) 3 do not hold for non-equilibrium thermodynamics.
Another example of interesting formulations in equilibrium thermodynamics are the so-called Maxwell relations (e.g. see [3] [7] [48]). Apply the equilibrium constraint in Postulate 4 to Equation (16), which reduces to the following Pfaffian equation on the Legendre submanifold The second relation shows the correct set of canonical coordinates to completely specify internal energy  in the case of equilibrium thermodynamics. Apply this knowledge to Equation ( . So, the thermodynamic potential (viz. here =   ) is a state function according to Definition 1 in the case of equilibrium thermodynamics. Notice that Equation (6) is not a Pfaffian equation due to the presence of the Gibbs contact 1-form 1 G ∆ , which is everywhere unequal to zero. Consequently the 1-form 1 in Equation (6) is neither an exact nor a closed 1-form. The thermodynamic potential  is in the presented mathematical framework for non-equilibrium thermodynamics not explicitly postulated as a state function that complies with Definition 1.

Conclusions
Classical Non-Equilibrium Thermodynamics (CNET) is the science of phenomenological changes in the state of systems. Especially these changes make the tools of differential geometry extremely suited for a rigorous mathematical formulation. The presented formulation for non-equilibrium thermodynamics consists of the following three base postulates: • there exists a non-equilibrium thermodynamic phase space (Gibbs state space), • energy is conserved (first law of thermodynamics), • the difference between heat flow and dissipation is completely integrable (second law of thermodynamics). 11 Definition 1 introduced the non-equilibrium state function as an exact 1-form and Equation (34)1 shows that the 1-form 1 Λ in a Pfaffian equation is also exact. The mathematical concept of an exact 1-form originates from the area of differential manifolds (e.g. see [20] Based on the Poincaré lemma, it can be proven that every exact 1-form is also a closed 1-form (see [17] [25]). Hence 1 Λ is a closed 1-form, which means that its exterior derivative is equal to zero. Apply the exterior derivative to the case of the above example, which results in The term between parentheses has to vanish since Equation (35)2 shows that the coefficients 1 X and 2 X are equal to the partial derivatives of the generating function ( ) which results in the mixed partial derivatives (See also [16]).
The thermodynamic phase space is built upon macroscopic properties of a system. Neither temporal nor spatial coordinates are considered in the presented mathematical formulation of non-equilibrium thermodynamics. The direction of processes is not implemented by an explicit inequality in the second law of thermodynamics. Instead an implicit reverse is applied: there is a physical quantity that is nowhere equal to zero, viz. the dissipation of energy. Furthermore, no explicit signs are assigned to nowhere vanishing physical quantities. Still this formulation shows clearly that there can only be a periodic process if and only if it is driven by the appropriate heat flow.
Together with the definition of a state function, other relations are derived based on the mathematical properties of this formulation. The mathematical structure for the Gibbs fundamental relation follows from the Gibbs state space.
Through a clever combination with both laws of thermodynamics it can be proven that the thermodynamic potential is specified by the Gibbs free energy.
Other coordinates in the formulation of the Gibbs fundamental relation are identified for a single component, closed system. Notice that there is neither in the postulates, nor in the derivation of the mathematical framework for nonequilibrium thermodynamics any assumption that restricts the arbitrary processes to certain classes (e.g. periodic, adiabatic, sufficiently slow, etc.).
The introduction of an equilibrium state is postponed until the final section, where it is introduced as an extremum (viz. no change of a state function). This is mathematically implemented by the pull-back of an equilibrium map with the condition that there is no dissipation of energy. Such an elaborate construction is required, because the dissipation of energy is in the general case of nonequilibrium thermodynamics by definition unequal to zero. For the case of an equilibrium state, the Gibbs fundamental relation reduces to a Pfaffian equation.
It is shown that the Maxwell relations in thermodynamics can be derived only for the case of an equilibrium state.