A Review of the System-Intrinsic Nonequilibrium Thermodynamics in Extended Space (MNEQT) with Applications

The review deals with a novel approach (MNEQT) to nonequilibrium thermodynamics (NEQT) that is based on the concept of internal equilibrium (IEQ) in an enlarged state space SZ involving internal variables as additional state variables. The IEQ macrostates are unique in SZ and have no memory just as EQ macrostates are in the EQ state space SX⊂SZ. The approach provides a clear strategy to identify the internal variables for any model through several examples. The MNEQT deals directly with system-intrinsic quantities, which are very useful as they fully describe irreversibility. Because of this, MNEQT solves a long-standing problem in NEQT of identifying a unique global temperature T of a system, thus fulfilling Planck’s dream of a global temperature for any system, even if it is not uniform such as when it is driven between two heat baths; T has the conventional interpretation of satisfying the Clausius statement that the exchange macroheatdeQflows from hot to cold, and other sensible criteria expected of a temperature. The concept of the generalized macroheat dQ=deQ+diQ converts the Clausius inequality dS≥deQ/T0 for a system in a medium at temperature T0 into the Clausius equalitydS≡dQ/T, which also covers macrostates with memory, and follows from the extensivity property. The equality also holds for a NEQ isolated system. The novel approach is extremely useful as it also works when no internal state variables are used to study nonunique macrostates in the EQ state space SX at the expense of explicit time dependence in the entropy that gives rise to memory effects. To show the usefulness of the novel approach, we give several examples such as irreversible Carnot cycle, friction and Brownian motion, the free expansion, etc.


Introduction
Thermodynamics of a system out of equilibrium (EQ) [1][2][3][4][5][6][7][8] is far from a complete science in contrast to the EQ thermodynamics based on the original ideas of Carnot, Clapeyron, Clausius, Thomson, Maxwell, and many others [9][10][11][12][13][14][15][16] that has by now been firmly established in physics, thanks to Boltzmann [17,18] and Gibbs [19]. Therefore, it should not be a surprise that there are currently many schools of nonequilibrium (NEQ) thermodynamics (NEQT), among which are the most widely known schools of local-EQ thermodynamics, rational thermodynamics, extended thermodynamics, and GENERIC thermodynamics [20,21]. This pedagogical review and various applications in different contexts deal with a recently developed NEQT, which we have termed MNEQT, with M referring to a macroscopic treatment in terms of system-intrinsic (SI) quantities of the system Σ at each instant. These quantities are normally taken to be extensive SI-quantities, and are used as state variables to describe a macrostate M of Σ. The MNEQT has met with success as we will describe in this review so it is desirable to introduce it to a wider class of readers and supplement it with many nontrivial applications.
We take Σ as a discrete system in that it is separated from its surrounding medium Σ (if it exists) with which it interacts; see Figure 1. Such a system is also called a Schottky system [21][22][23] Because of the use of SI-quantities, the MNEQT differs from all other existing approaches to the NEQT in that the latter invariably deal with exchange quantities with Σ, which are medium-intensive (MI) quantities that differ from SI-quantities in important ways in a NEQ process as we will see. We will useMNEQT to refer to the latter approaches, withM referring to the use of macroscopic exchange quantities. The corresponding NEQ statistical mechanics of the MNEQT is termed µNEQT, in which µ refers to the treatment of Σ in terms of microstates, which form a countable set {m k }, with k counting various microstates. The existence of the µNEQT is possible only because of the use of SI-quantities in the MNEQT. These quantities are easily associated with {m k } as will become clear here. This ability in the MNEQT immediately distinguishes it from theMNEQT as the latter cannot lead directly to a statistical mechanical treatment with {m k }. Therefore, we believe that the MNEQT and µNEQT will prove very useful. All quantities pertaining to M are called macroquantities, while those pertaining to microstates contain an index k and are called microquantities for simplicity in this review. (a) An isolated nonequilibrium system Σ 0 with internally generated d i Z driving it towards equilibrium, during which its SI-fields T(t), P(t), · · · , A(t) continue to change to their equilibrium values; d i Z k denote the microanalog of d i Z. The sign of d i Z is determined by the second law. (b) A nonequilibrium systen Σ in a surrounding medium Σ, both forming an isolated system Σ 0 . The macrostates of the medium and the system are characterized by their fields T 0 , P 0 , ..., A 0 = 0 and T(t), P(t), ..., A(t), respectively, which are different when the two are out of equilibrium. Exchange quantities (d e Z) carry a suffix "e" and irreversibly generated quantities (d i Z) within the system by a suffix "i" by extending the Prigogine notation. Their sum d e Z + d i Z is denoted by dZ, which is a system-intrinsic quantity (see text).
While most of the review deals with an isolated system or an interacting system in a medium, we will occasionally also consider a system interacting with two different media such as in Figure 2, to study driven and steady macrostates [24][25][26][27] at τ ∼ τ st for which there is no EQ macrostate having unique values of the temperature, pressure, etc. as long as we do not allow the media to come to EQ with each other, which takes much longer time τ EQ >> τ st . A steady or an unsteady macrostate always gives rise to irreversible entropy generation so it truly belongs to the realm of the NEQT. What makes the MNEQT a highly desirable approach is that it can also deal with unsteady processes easily as we will do.  Figure 1. If they are the same, the situation reduces to that in Figure 1a. Later in Section 10.3 we consider this situation between two heat sources Σ h1 and Σ h2 , where we treat Σ as a composite system as an application of our approach.

Unique Macrostates in Extended State Space
The firm foundation of EQ statistical mechanics is accomplished by using the concept of microstates m k of Σ and their EQ probabilities p keq . This is feasible as the EQ macrostate M eq is unique in the EQ state space S X spanned by the set of observables (see Definition 1) X = (E, V, · · · ), where E, V, · · · are the energy, volume, etc. using standard notation (we do not show the number of particles N as we keep it fixed throughout this review; see later, however). But the same cannot be said about its extension to describe NEQT, since NEQ macrostates M in S X are not unique [12] even if they appear in a process between two EQ macrostates, which we will always denote by P and use P for any general process including P. It is clear that unless we can specify the microstates for M uniquely, we cannot speak of their probabilities p k in a sensible way, but this is precisely what we need to establish a rigorous NEQ statistical mechanics of thermodynamic processes [28][29][30][31][32][33][34][35][36][37][38]. The system is usually surrounded by an external medium Σ, which we always take to be in EQ; see Figure 1b. The combination Σ 0 as the union Σ ∪ Σ forms an isolated system, which we assume to be stationary.
The lack of uniqueness of M is handled in the MNEQT by using a well-established practice [3,16,[39][40][41][42][43][44][45] by considering a properly extended state space S Z spanned by Z . = X ∪ ξ, by including a set ξ of internal variables, in which NEQ macrostates M and microstates of interest can be uniquely specified during the entire process P. Here, ξ is internally generated within Σ so it cannot be controlled by the observer. The use of internal variables in glasses, prime examples of NEQ systems, is well known, where they give rise to distinct relaxations of the glassy macrostate [42,43,[46][47][48][49]. Their justification is based on the ideas of chemical reactions [50], and has been formalized recently by us [45] to any NEQ macrostate M. It is well known that internal variables contribute to irreversibility in P, which justifies their important role in the NEQT. We give several examples for their need later in the review and a clear strategy to identify them for computation under different conditions. In S Z , the unique M's are specified by the collection {m k , p k } of two independent quantities, which form a probability space P. We can then pursue any P followed by M(t) as the latter evolves in time t to another (EQ or NEQ) unique macrostate. A major simplification occurs when this independence is maintained at each instant so that during the evolution, each microstate m k follows a trajectory (such as a Brownian trajectory) γ k whose characteristics do not depend on p k (t) as a function of time t ( [32] (for example)); the latter, of course, determines the trajectory probability p γ k . Thus, γ k , p γ k uniquely specifies P in P. For the same collection γ . = {γ k }, different choices of p γ k describe different processes.

Layout
The review is divided into two distinct parts. The first part consisting of Sections 3-9 deals with the up-to-date foundation of the MNEQT for Σ, regardless of whether it is isolated or interacting (in the presence of one or more a external sources). We have tried to make the new concepts and their physics as clear as possible so a reader can appreciate the foundation of the MNEQT, which can be complex at times. The most important one is that of the NEQ temperature T as anticipated by Planck that is required to be defined globally over the system so that it can satisfy the Clausius statement about macroheat flow from hot to cold. The concepts of the generalized macroheat dQ and the generalized macrowork dW are directly and uniquely defined in terms of SI-quantities that pertain to the system alone. Thus, they are capable of describing the irreversibilty in the system. A clear strategy to identify internal variables is discussed for carrying out thermodynamic computation. The other part consisting of Sections 10-14 deals with various applications of the MNEQT, many of which cannot be studied within theMNEQT without imposing additional requirements. This part provides an abundant evidence of successful implementation of the MNEQT.
The layout of the paper is as follows. In the next section, we introduce our notation and give some useful definitions and new concepts without any explanation. This section is only for bookkeeping so that readers can come back to it to refresh the concepts in the manuscript later when they are not sure of their meanings. The next six sections deal with various new concepts and theory behind the MNEQT. Section 3 introduces the central concept of internal variables that are required for arbitrary NEQ macrostates M. Many examples are given to highlight their importance for M. They form the extended state space S Z , which contains the state space S X as a proper subspace. The internal variables are irrelevant for EQ macrostates in S X . Section 4 is also very important, where we introduce the concept of NEQ entropies based on the original ideas of Boltzmann. In this sense, the derivation of this entropy is thermodynamic in nature, and gives rise to an expression of S that generalizes the Gibbs formulation of the entropy to NEQ macrostates. Using this formulation, we reformulate a previously given proof of the second law. In Section 5, we formulate the statistical mechanics of the MNEQT, and discuss the statistical significance of dW and dQ that provide a reformulation of the first law in terms of SI-quantities for any arbitrary process between any two arbitrary macrostates. The SI-quantities are determined by Σ alone, even if it is interacting with its exterior, and its usage has neither been noted nor has been appreciated by other workers in the field. These generalized macroquantities are different from exchange macrowork and macroheat. In this reformulation, the first law includes the second law in that it contains all the information of the irreversibility encoded in M. This formulation applies equally well to the exchange energy change d e E and the internally generated energy change d i E, which shows the usefulness of the formulation. In Section 6, which is the most important section for the foundation of the MNEQT, we discuss the conditions for M to be uniquely specified in S Z , and introduce the concept of the internal equilibrium (IEQ) to specify M ieq in S Z . A parallel is drawn between M ieq and M eq so that many results valid for M eq also apply to M ieq , except that the latter has nonzero entropy generation (d i S ≥ 0). The entropy of M ieq is a state function in S Z , while that of a macrostate M nieq that lies outside of S Z is not a state function. see later. The entropy of M that lies outside S X is similarly not a state function of X. We show that the NEQ entropy in Section 4 reduces to the thermodynamic EQ entropy for M eq and to the thermodynamic IEQ entropy for M ieq . We introduce the concept of a NEQ thermodynamic temperature T as an inverse entropy derivative (∂S/∂E). We show that this concept satisfies various sensible requirements (C1-C4) of a thermodynamic temperature, which is global over the entire system even if it is inhomogeneous. This, we believe, solves a long-standing problem of a NEQ temperature. In terms of T, we show that the Clausius inequality in the MNEQT is turned into an equality in the MNEQT as shown in Section 7. In Section 9, which is the last section of the first part, we use the idea of chemical equilibrium to show how entropy is generated in an isolated system. We now turn to the second part of the review. In Section 10, we consider various applications of the MNEQT ranging from a simple system to composite systems under various conditions. This section is very important in that we establish here that we can treat a system either (i) as a "black box" Σ B of temperature T but without knowing anything about its interior, or (ii) as a composite system Σ C for which we have a detailed information about its interior inhomogeneity. Both realizations give the same irreversible entropy generation. Thus, we can always treat a system as Σ B of temperature T, whose study then becomes simpler. In Section 11, we apply our approach to a glassy system and derive the famous Tool-Narayanaswamy equation for the glassy temperature T. In Section 12, we apply the MNEQT to study an irreversible Carnot cycle and determine its efficiency in terms of ∆ i S. In Section 13, we apply the MNEQT to a very important problem of friction and the Brownian motion. In Section 14, we consider a classical and a quantum expansion. In the classical case, we study the expansion in S X , where M is a non-IEQ macrostate, with an explicit time-dependence, and in S Z , where M is a an IEQ macrostate, with no explicit time-dependence, and show that we obtain the same result. The quantum expansion is only studied in S Z . The last section provides an extensive discussion of the MNEQT and draws some useful conclusions.

Notation
Before proceeding further, it is useful to introduce in this section our notation to describe various systems and their behavior and new concepts for their understanding without much or any explanation (that will be offered later in the review where we discuss them) so that a reader can always come back here to be reminded of their meaning in case of confusion. In this sense, this section plays an important role in the review for the purpose of bookkeeping.
Even though Σ is macroscopic in size, it is extremely small compared to the medium Σ; see Figure 1b. The medium Σ consists of two parts: A work source Σ w and a macroheat source Σ h , both of which can interact with the system Σ directly but not with each other. This separation allows us to study macrowork and macroheat exchanges separately. We will continue to use Σ to refer to both of them together. The collection Σ 0 = Σ ∪ Σ forms an isolated system, which we assume to be stationary. The system in Figure 1a is an isolated system, which we may not divide into a medium and a system. Each medium in Figure 2, although not interacting with each other, has a similar relationship with Σ, except that the collection Σ 0 = Σ ∪ Σ 1 ∪ Σ 2 forms an isolated system. In case they were mutually interacting, they can be treated as a single medium. In the following, we will mostly focus on Figure 1 to introduce the notation, which can be easily extended to Figure 2.
We will use the term "body" to refer to any of Σ, Σ, and Σ 0 in this review and use Σ b to denote it. However, to avoid notational complication, we will use the notation suitable for Σ for Σ b if no confusion would arise in the context. As the mechanical aspect of a body is described by the Hamiltonian H, whose value determines its macroenergy E, it plays an important role in thermodynamics. Therefore, it is convenient to introduce where \E means to delete E from the set, and · · · refers to the rest of the elements in X besides V. We use x to denote the collection of coordinates and momenta of the N particles in the phase space of Σ. The variable W appears as a parameter set in the Hamiltonian H( x|W) of Σ that can be varied in a process with a concomitant change in H. As internal variables play no role in EQ, W = w in Equation We will normally employ a discretization of the phase space in which we divide it into cells δx, centered at x and of some small size, commonly taken to be (2πh) 3N . The cells cover the entire phase space. To account for the identical nature of the particles, the number of cells and the volume of the phase space is assumed to be divided by N! to give distinct arrangements of the particles in the cells, which are indexed by k = 1, 2, · · · and write them as {δx k }; the center of δx k is at x k . These cells represents the microstates {m k }. The energy and probability of these cells are denoted by {E k , p k } in which E k (W) is a function of W. Different choices of {p k } for the same set {m k , E k } describes different macrostates for a given W, one of which corresponding to p eq k uniquely specifies an EQ macrostate M eq ; all other states are called NEQ macrostates M. Among M are some special macrostates M ieq that are said to be in internal equilibrium (IEQ); the rest are nonIEQ macrostates M nieq . An arbitrary macrostate M arb refers to either an EQ or a NEQ macrostate.
We use a suffix 0 to denote all quantities pertaining to Σ 0 , a tilde ( ) for all quantities pertaining to Σ, and no suffix for all quantities pertaining to Σ even if it is isolated. Thus, the set of observables are denoted by X 0 , X and X, respectively, and the set of state variables by Z 0 , Z and Z, respectively, in the state space S Z ; the set of internal variables are ξ 0 , ξ and ξ, respectively. As Σ is taken to be in EQ, weakly interacting with and is extremely large compared to Σ, all its fields can be safely taken to be the fields associated with Σ 0 so can be denoted by using the suffix 0.
In the discrete approach, Σ and Σ are spatially disjoint so They are weakly interacting so that their energies are quasi-additive where E int is the weak interaction energy between Σ and Σ and can be neglected to a good approximation. We also take them to be quasi-independent [41] so that their entropies also become quasiadditive: here, S corr (t) is a negligible contribution to the entropy due to quasi-independence between Σ and Σ, and can also be neglected to a good approximation. The entropy S has no explicit time dependence as Σ is always assumed to be in equilibrium, and X 0 remains constant for the isolated system Σ 0 . The discussion of quasi-independence and its distinction from weak interaction has been carefully presented elsewhere ( [41] (S corr was called S int there; however, S corr seems to be more appropriate)) for the first time, which we summarize as follows. The concept of quasi-independence is determined by the thermodynamic concept of correlation length λ corr , which is a property of macrostates, and can be much larger than the interaction length between particles. A simple well-known example is of the correlation length of a nearest neighbor Ising model, which can be extremely large near a critical point than the nearest neighbor distance between the spins. This distinction is usually not made explicit in the literature. For quasi-independence between Σ and Σ, we require their sizes to be larger than λ corr . Throughout this review, we will think of the above approximate equalities as equalities to make the energies to be additive by neglecting the interaction energy between Σ and Σ, which is a standard practice in the field, but also assuming quasi-independence between them to make the entropies to be additive, which is not usually mentioned as a requirement in the literature. For a reversible process, the entropy of each macrostate M eq (t) ∈ S X of a body along the process is a state function of X(t), but not for an irreversible process for which M(t)/ ∈ S X . Their entropies are written as S(X(t),t) [51,52] with an explicit time dependence. In general [14,[51][52][53], S(X(t),t) ≤ S(X(t)); fixed X(t). ( The equilibrium values of various entropies are always denoted with no explicit time dependence such as by S 0 (X 0 ) for Σ 0 . These entropies represent the maximum possible values of the entropies of a body as it relaxes and comes to equilibrium for a given set of observables. Once in equilibrium, the body will have no memory of its original macrostate.
The set X 0 , which includes its energy E 0 among others, remains constant for Σ 0 as it relaxes. This notion is also extended to a body in internal equilibrium. Notation 1. We use modern notation [3,16] and its extension, see Figure 1, that will be extremely useful to understand the usefulness of our novel approach. Any infinitesimal and extensive systemintrinsic quantity dY(t) during an arbitrary process dP can be partitioned as where d e Y(t) is the change caused by exchange (e) with the medium and d i Y(t) is its change due to internal or irreversible (i) processes going on within the system.
Throughout the review, we assume that there is only one species of stable particles, whose number N is an observable, and is held fixed to fix the size of Σ. We can list N in X if we keep another observable such as V fixed to fix the size of the system. Here, we will keep N fixed for the size. If there are several species k = 1, 2, · · · , r of particles that undergo l distinct chemical reactions among themselves, then the individual numbers N k , k ∈ {1, 2, · · · , r} of the species are not constant, only their total N remains constant. In this case, we need distinct l . = l − 1 extents of reaction [3,16] as internal variables in Z as has been discussed later. If the species do not undergo chemical reactions among themselves, then N k 's are individually observables. In this case, we can choose l independent numbers that are contained in X. In this review, we only consider a single species for simplicity.

Some Definitions and New Concepts
Definition 1. Observables X = (E, V, N, · · · ) of a system are quantities that can be controlled from outside the system, and internal variables ξ = (ξ 1 , ξ 2 , ξ 3 , · · · ) are quantities that cannot be controlled. Their collection Z = X ∪ ξ is called the set of state variables in the state space S. Definition 2. A system-intrinsic quantity is a quantity that pertains to the system alone and can be used to characterize the system. A medium-intrinsic quantity is a quantity that is solely determined by the medium alone and can be used to characterize the exchange between the system and the medium.

Definition 3.
A macrostate in S X or S Z is a collection {m k , p k } of microstates m k and their probabilities p k , k = 1, 2, · · · . In general, p k are functions of X or Z, depending on the state space. They are implicit function of time t through them; they may also depend explicitly on time t if not unique in the state space.. For an EQ or an IEQ macrostate, p k have no explicit dependence on t. For EQ states, p k have no time-dependence. It is through the microstate probabilities that thermodynamics gets its stochastic nature. Definition 4. The collection {m k , p k } provides a complete microscopic or statistical mechanical description of thermodynamics for M arb in some state space S in which one deals with macroscopic or ensemble averages, see Definition 12, over {m k } of microstate variables. The same collection {m k , p k } also provides a microscopic description of a microstate and its probability in any arbitrary process.
Definition 5. The nonequilibrium macrostates can be classified into two classes: (a) Internal-equilibrium macrostates (IEQ): The nonequilibrium entropy S(X,t) for such a macrostate is a state function S(Z) in the larger nonequilibrium state space S Z spanned by Z; S X is a proper subspace of S Z : S X ⊂ S Z . As there is no explicit time dependence, there is no memory of the initial macrostate in IEQ macrostates. (b) Non-internal-equilibrium macrostates (NIEQ): The nonequilibrium entropy for such a macrostate is not a state function of the state variable Z. Accordingly, we denote it by S(Z, t) with an explicit time dependence. The explicit time dependence gives rise to memory effects in these NEQ macrostates that lie outside the nonequilibrium state space S Z . A NIEQ macrostate in S Z becomes an IEQ macrostate in a larger state space S Z , Z ⊃ Z, with a proper choice of Z . Definition 6. An arbitrary macrostate (ARB) of a system refers to all possible thermodynamic states, which include EQ macrostates, and NEQ macrostates with and without the memory of the initial macrostate. We denote an arbitrary macrostate by M arb , NEQ macrostates by M, EQ macrostates by M eq , and IEQ macrostates by M ieq .

Definition 7.
Thermodynamic entropy S is defined by the Gibbs fundamental relation for a macrostate.
Definition 8. Statistical entropy S for M arb is defined by its microstates by Gibbs formulation.

Definition 9.
Changes in quantities such as S, E, V, · · · in an infinitesimal processes δP are denoted by dS, dE, dV, · · · ; changes during a finite process P are denoted by ∆S, ∆E, ∆V, · · · . Definition 10. The path γ P of a macrostate M is the path it takes in S during a process P. The trajectory γ k is the trajectory a microstate m k takes in time in S during the process P.
As m k evolves due to Hamilton's equations of motion for given W, the variation of x k has no effect on E k . Therefore, we will no longer exhibit x and simply use H(W) for the Hamiltonian. The microenergy E k changes isentropically as W changes without changing p k [54]. Accordingly, the generalized macrowork dW does not generate any stochasticity. The latter is brought about by the generalized macroheat dQ, which changes p k but without changing E k . In the MNEQT, dQ ≡ TdS (5a) in terms of the temperature and dS of Σ. The Equation (5a) is a general result in the MNEQT. It is convenient to introduce ϕ = (S, Z) as the set of all thermodynamic macrovariables, which takes the microvalue ϕ k on m k . Definition 11. Macropartition: As suggested in Figure 1 and Notation 1, the change dϕ . =d e ϕ+d i ϕ (6) in the SI-macrovariable ϕ of Σ consists of two parts: the MI-change d e ϕ is the change due to exchange with Σ, and d i ϕ is the irreversible change occurring within Σ.
This is an extension of the standard partition for the entropy change [3,16] dS . =d e S+d i S.
For E and V, the partitions are for the simple reason that internal processes cannot change E and V, respectively. For N, the partition is dN . =d e N+d i N, with d i N present when there is chemical reaction. We will find the shorthand notation quite useful in the following for the various infinitesimal contributions. These linear operators satisfy Definition 12. Ensemble Average: In NEQT, any thermodynamic macroquantity ϕ is obtained by the instantaneous ensemble average where ϕ takes microvalues ϕ k on m k at that instant with probability p k .
We have used the standard convention to write ϕ for ϕ . For example, the internal energy E is given by while the statistical entropy, often called the Gibbs entropy, is given by where the microentropy S k is in terms of Gibbs' index of probability η k . = ln p k ( [19] (p. 16)).

Definition 13.
Micropartition:The macropartition in Equation (6) is extended to microvariable ' k : The micropartition also applies to dp k : dp k . =d e p k +d i p k , We define In a process, ϕ undergoes infinitesimal changes d α ϕ k at fixed p k , or infinitesimal changes d α p k at fixed φ k . The changes result in two distinct ensemble averages or process quantities.
at fixed {p k } so they are isentropic. We identify them as mechanical macroquantity and write it as d α ϕ m . Infinitesimal macroquantities that are ensemble averages involving {d α p k } are identified as stochastic macroquantities and written as d α ϕ s . Together, they determine the change d α ϕ: We must carefully distinguish d α ϕ and d α ϕ . For E, we will use instead the following notation: from which follows Using Equation (9) for d i E, we have the following thermodynamic identity: For d α = d, d e , we have the following SI-and MI-formulation of the first law: where we have used the identity dE = d e E. The top equation is also known as the Gibbs fundamental relation. We can use the operator identity in Equation (11) to introduce the following important identities following Notation 1 Manipulating w such as the "volume" V from the outside through Σ w requires some external "force" F w0 , such as the external pressure P 0 to do some "exchange macrowork" d W on Σ. We have d w = d e w = −d e w, and where F w0 = (P 0 , ..., A 0 = 0); see Figure 1. We use F w0 = (f w0 , A 0 = 0). In a NEQ system, the generalized force F w in Σ differs from F w0 . The resulting macrowork done by Σ is dW .
This is the SI-macrowork and differs from the MI-macrowork d W = −d e W. Here, see Figure 1. The SI-affinity A corresponding to ξ [16,50] is nonzero, except in EQ, when it vanishes: A eq ≡ A 0 = 0 = 0 [3,16]. The " SI-macrowork" dW ξ done by Σ as ξ varies is Even for an isolated NEQ system, dW ξ will not vanish; it vanishes only in EQ, since ξ does no work when A 0 = 0; however, F w0 , d W and d e W are unaffected by the presence of ξ. The macroforce imbalance is the difference In general, A controls the behavior of ξ in M [16,50] and vanishes when EQ is reached [3,16]. Here, we will take a more general view of A, and extend its definition to X also. In particular, ∆F h . = T 0 − T also plays the role of an affinity [55] so we can include it with ∆F w to form set of thermodynamic macroforces or of macroforce imbalance: The same reasoning also shows that ∆F plays the role of an activity.
For the sake of clarity, we will take V as a symbolic representation of X, and a single ξ as an internal variable in many examples. Then W = (V, ξ) is the macrowork parameter. In this case, we have The microanalogue of ∆F w is the internal microforce imbalance which determines the internal microwork as the exchange microwork is Remark 1. It should be warned that dQ in Equations (15) and (16) in [55] and Sec. IVB in [41] refers only to the exchange macroheat; recall Definition 15. Thus, the usage there is different from the generalized macroheat in the review.

Internal Variables
We should emphasize that the concept of internal variables and their usefulness in NEQT has a long history. We refer the reader to an excellent exposition of this topic in the monograph by Maugin ([40] (see Ch. 4)). We consider a few simple examples to justify why internal variables are needed to uniquely specify a M, and how to identify them for various systems.
It should be stated that in order to capture a NEQ process, internal variables are usually necessary. Another way to appreciate this fact is to realize that Remark 2. For an isolated system, all the observables in X 0 are fixed so if the entropy is a function of X 0 only, it cannot change [41,51,52,55]

even if the system is out of Equation
Thus, we need additional independent variables to ensure the law of increase of entropy for a NEQ isolated system. A point in S X represents M eq , but a point S Z represents M. In EQ, internal variables are no longer independent of the observables. Consequently, their affinities (see later) vanish in Equation It is common to define the internal variables so their EQ values vanish. We now discuss various scenarios where they are needed for a proper consideration.

A Two-Level System
Consider a NEQ system of N particles such as Ising spins, each of which can be in two levels, forming an isolated system Σ 0 of volume V. Let ρ l and e l (V), l = 1, 2 denote the probabilities and energies of the two levels of a particle in a NEQ macrostate so that ρ 1 , ρ 2 keep changing. We have assumed that e l (V) depends on the observable V only, which happens to be constant for Σ 0 . We have e = ρ 1 e 1 (V) + ρ 2 e 2 (V) for the average energy per particle, which is also a constant for Σ 0 , and dρ 1 + dρ 2 = 0 as a consequence of ρ 1 + ρ 2 = 1. Using de = 0, we get dρ 1 + dρ 2 e 2 /e 1 = 0, which, for e 1 = e 2 , is inconsistent with the first equation (unless dρ 1 = 0 = dρ 2 , which corresponds to EQ). Thus, e l (V) cannot be treated as constant in evaluating de. In other words, there must be an extra dependence in e l so that e 1 dρ 1 + dρ 2 e 2 + ρ 1 de 1 + ρ 2 de 2 = 0, and the inconsistency is removed. This extra dependence must be due to independent internal variables that are not controlled from the outside (isolated system) so they continue to relax in Σ 0 as it approaches Equation Let us imagine that there is a single internal variable ξ so that we can express e l as e l (V, ξ) in which ξ continues to change as the system comes to equilibrium. The above equation then relates dρ 1 and dξ; they both vanish simultaneously as EQ is reached. We also see that without any ξ, the isolated system cannot equilibrate; see Remark 2.

A Many-Level System
The above discussion is easily extended to a Σ with many energy levels of a particle with the same conclusion that at least a single internal variable is required to express e l = e l (V, ξ) for each level l. We can also visualize the above system in terms of microstates. A microstate m k refers to a particular distribution of the N particles in any of the levels with energy E k = ∑ l N l e l , where N l is the number of particles in the lth level, and is obviously a function of N, V, ξ so we will express it as E k (V, ξ); we suppress the dependence on N. This makes the average energy of the system also a function of V, ξ, which we express as E(V, ξ).

Disparate Degrees of Freedom
In classical statistical mechanics, the kinetic and potential energies K and U, respectively, are functions of independent variables. Only their sum K + U = E can be controlled from the outside, but not individually. Thus, one of them can be treated as an internal variable. In a NEQ macrostates, each term can have its own temperature. Only in EQ, do they have the same temperature.
This has an important consequence for glasses, where the vibrational degrees of freedom (dof v ) come to EQ with the heat bath at T 0 faster than the configurational degrees of freedom (dof c ), which have a different temperature than T 0 . The disparity in dof v and dof c cannot be controlled by the observer so it plays the role of an internal variable. A well-known equation, the Tool-Narayanaswamy equation is concerned with this disparity and is discussed in Section 11.
Consider a collection of semiflexible polymers in a solution on a lattice. The interaction energy E consists of several additive terms as discussed in ( [41], Equation (40)): the interaction energy E ps between the polymer and the solvent, the interaction energy E ss between the solvent, the interaction energy E pp between polymers. Only the total E can be controlled from the outside so the remaining terms determine several internal variables.
In the examples above, the internal variables are not due to spatial inhomogeneity. An EQ system is uniform. Thus, the presence of ξ suggests some sort of nonuniformity in the system. To appreciate its physics, we consider a slightly different situation below as a possible example of nonuniformity.

Nonuniformity
(a) We consider as a simple NEQ example a composite isolated system Σ, see Figure 3, consisting of two subsystems Σ 1 and Σ 2 of identical volumes and numbers of particles but at different temperatures T 1 and T 2 at any time t < τ eq before EQ is reached at t = τ eq so the subsystems have different time-dependent energies E 1 and E 2 , respectively. We assume a diathermal wall separating Σ 1 and Σ 2 . Treating each subsystem in EQ at each t, we write their entropies as S 1 (E 1 , V/2, N/2) and S 2 (E 2 , V/2, N/2), which we simply show as S 1 (E 1 ) and S 2 (E 2 ) as we will not let their volumes and particles numbers change. The entropy S . = S 1 (E 1 ) + S 2 (E 2 ) of Σ is a function of E 1 and E 2 . Obviously, Σ is in a NEQ macrostate at each t < τ eq . As E 1 and E 2 do not refer to Σ, we form two independent combinations from E 1 and E 2 that refer to Σ so that we can express the entropy as S(E, ξ) for Σ treated as a blackbox Σ B ; we do not need to know about its interior (its inhomogeneity) anymore. Here, ξ plays the role of an internal variable, which continues to relax towards zero as Σ approaches Equation For given E and ξ, S(E, ξ) has the maximum possible values since both S 1 and S 2 have their maximum value. As we will see below, this is the idea behind the concept of internal equilibrium in which S(E, ξ) is a state function of state variables and continues to increase as ξ decreases and vanishes in Equation In this macrostate, S(E, ξ = 0) has the maximum possible value for fixed E so it becomes a state function; see Definition 16. This case and its various extensions are investigated in MNEQT in Section 10.3. (b) We can easily extend the model to include four identical subsystems of fixed and identical volumes and numbers of particles, but of different energies E 1 , E 2 , E 3 , and E 4 . Instead of using these 4 independent variables, we can use the following four independent combinations to express the entropy of Σ as S(E, ξ, ξ , ξ ). The pattern of extension for this simple case of energy inhomogeneity. is evident.
(c) We make the model a bit more interesting by allowing the volumes V 1 and V 2 to also vary as Σ equilibrates. Apart from the internal variable ξ, we require another internal variable ξ to form two independent combinations so that we can use S(E, V, ξ, ξ ) . = S 1eq (E 1 , V 1 ) + S 2eq (E 2 , V 2 ) for the entropy of Σ in terms of the entropies of Σ 1 and Σ 2 .
(d) In the above examples, we have assumed the subsystems to be in Equation We now consider when the subsystems are in IEquation We consider the simple case of two subsystems Σ 1 and Σ 2 of identical volumes and numbers of particles. Each subsystem is in different IEQ macrostates described by E 1 , ξ 1 and E 2 , ξ 2 . We now construct four independent combinations which can be used to express the entropy of Σ as S(E, ξ, ξ , ξ ). (e) The example in (a) can be easily extended to the case of expansion and contraction by replacing E, E 1 , and E 2 by N, N L , and N R , see Figure 6, to describe the diffusion of particles [56]. The role of β and E, etc. are played by βµ and N, etc. A composite system Σ consisting of two identical subsystems Σ 1 at temperature T 1 and Σ 2 at temperature T 2 . It will be seen later in Section 10.3 that the thermodynamic temperature of Σ can be defined as T given by Equation (120a). The irreversibility in Σ requires one internal variable ξ given in Equation (36).

Relative Motion in Piston-Gas System
We now consider the motion of the piston in Figure 4a because of the pressure difference across it. The discussion also shows how the Hamiltonian becomes dependent on internal variables, and how the system is maintained stationary despite motion of its parts.
Let P p denote the momentum of the piston. The gas, the cylinder and the piston constitute the system Σ. We have a gas of mass M g in the cylindrical volume V g , the piston of mass M p , and the rigid cylinder (with its end opposite to the piston closed) of mass M c . However, we will consider the composite subsystem Σ gc = Σ g ∪ Σ c so that with Σ p it makes up Σ. The Hamiltonian H of the system is the sum of H gc of the gas and cylinder, H p of the piston, the interaction Hamiltonian H int between the two subsystems Σ gc and Σ p , and the interaction Hamiltonian H sm between Σ and Σ. As is customary, see the discussion in Section 2, we will neglect H sm here. We assume that the centers-of-mass of Σ gc and Σ p are moving with respect to the medium with linear momentum P gc and P p , respectively. We do not allow any rotation for simplicity. We assume that so that Σ is at rest with respect to the medium. Thus, where λ = gc, p, x λ = (r λ , p λ ) denotes a point in the phase space Γ λ of Σ λ ; V λ is the volume of Σ˘, and V = V gc + V p is the volume of Σ. We do not exhibit the number of particles N g , N c , N p as we keep them fixed. We let x denotes the collection (x gc , x p ). Thus, H( x|V, P gc , P p ) and the average energy E depend on the parameters V, P gc , P p . As the relative motion cannot be controlled from the outside, one of the momenta plays the role of an internal variable. We discuss the example of the spring in Figure 4b will be discussed in Section 13.
fluid Spring, F s piston P 0 P particle gas Figure 4. We schematically show a system of (a) gas in a cylinder with a movable piston under an external pressure P 0 controlling the volume V of the gas, and (b) a particle attached to a spring in a fluid being pulled by an external force F 0 , which causes the spring to stretch or compress depending on its direction. In an irreversible process, the internal pressure P (the spring force F s ) is different in magnitude from the external pressure P 0 (external force F 0 ).

Extended State Space
It should be clear from above that we can identify the entropy If we divide Σ into many subsystems {Σ i } so that they are all quasi-independent, then the entropy additivity gives As we will be dealing with the Hamiltonian of the system, it is useful to introduce the notation in Equation (1) with W = (w,ξ). Then, E and E k become a function of W as we will show in Section 5. Here, W appears as a parameter in the Hamiltonian, which we will write as H( x|W), where x is a point (collection of coordinates and momenta of the particles) in the phase space Γ(W) specified by W. As an example, V, P gc , P p are the parameters in Section 13. When the system moves about in the phase space Γ(W), x changes but W as a parameter remains fixed in a state subspace S W ⊂ S Z ; see the discussion of Equation (55a).
It is important to draw attention to the following important distinction between the Hamiltonian H and the ensemble average energy E; see Equation (44). While E accounts for the stochasticity through microstate probabilities, the use of the Hamiltonian is going to be restricted to a particular microstate. In other words, the Hamiltonian depends on x and W but the energy depends on the entropy S and W. The energy E k of m k , on the other hand, depends only on W and denotes the value of H for m k . In the following, we will always treat Hamiltonians and microstate energies as equivalent description, which does not depend on knowing {p k }; the average energies depend on {p k } for their definition; see Equation (13).

Determination of S
The uniqueness issue about the NEQ macrostate says nothing about the entropy of an arbitrary (so it may be nonunique) macrostate M : {m k , p k }, which is always given by the Gibbs entropy in Equation (14); see also [57]. The ensemble averaging implies that the entropy is a statistical concept, as is the energy E = E , Equation (13).
We now justify the Gibbs' statistical formulation of S for any arbitrary M in thermodynamics. The demonstration follows a very simple combinatorial argument [52] using Boltzmann concept of thermodynamic entropy. In the demonstration, M is not required to be uniquely identified. This entropy satisfies the law of increase of entropy as is easily seen by the discussion by Landau and Lifshitz for a NEQ ideal gas in S X to derive the equilibrium distribution [14] (Equation (7.9) here shows how this entropy formulation emerges in statistical physics. It is applicable to both EQ and NEQ macrostates as is clear from Section 40 (see Equation (40.7) in particular) dealing with NEQ ideal gas). Thus, the form in Equation (14) is not restricted to only uniquely identified M's. Hopefully, this will become clear below.

Proposition 1. The Second Law:
The NEQ Gibbs entropy S 0 (X 0 ,t) of an isolated system Σ 0 is bounded above by its equilibrium entropy S 0 (X 0 ) and continuously increases towards it so that [14] dS 0 (X 0 ,t)/dt ≥ 0.

General Formulation of the Statistical Entropy
We focus on a macrostate M(t) of some body Σ at a given instant t, which refers to the set m = {m k } of microstates and their probabilities p = {p k }. The microstates are specified by (E k (t), W(t)), and may not uniquely specify the macrostate M(t). Thus, even the set m need not be uniquely specified. In the following, we will use the set Z(t) = (E(t), W(t)) for the set m for simplicity. We will also denote Z(t) by Z so that we can separate out the explicit variation due to t. For simplicity, we suppress t in M in the following. For the computation of combinatorics, the probabilities are handled in the following abstract way. We consider a large number N = CW(Z) of independent replicas or samples of Σ, with C some large integer constant and W(Z) the number of distinct microstates m k . We will see that W(Z) is determined by m k 's having nonzero probabilities. We will call them available microstates. The samples should be thought of as identically prepared experimental samples [53].
Let Γ(Z) denote the sample space spanned by {m k }, and let N k (t) denote the number of kth samples (samples specified by m k ) so that The above sample space is a generalization of the ensemble introduced by Gibbs, except that the latter is restricted to an equilibrium body, whereas Γ(Z) refers to the body in any arbitrary macrostate so that p k may be time-dependent, and need not be unique. The ensemble average of some quantity Z over these samples is given by Equation (12). Thus, where Z k is the value of Z in m k . The samples are, by definition, independent of each other so that there are no correlations among them. Because of this, we can treat the samples {m k } to be the outcomes of some random variable, the macrostate M(t). This independence property of the outcomes is crucial in the following. They may be equiprobable but not necessarily. The number of ways W to arrange the N samples into W(Z) distinct microstates is Taking its natural log, as proposed by Boltzmann, to obtain an additive quantity per sample as and using Stirling's approximation, we see easily that it can be written as the average of the negative of Gibbs' index of probability: where we have also shown an explicit time-dependence, which merely reflects the fact that it is not a state function in S Z , a reflection of the fact that M is not uniquely specified in S Z . We have put t back above for clarity. Thus, Equation (47) is nothing but Equation (14) in form, and thus justifies it for an arbitrary M. The above derivation is based on fundamental principles and does not require the body to be in equilibrium; therefore, it is always applicable for any arbitrary macrostate M(t).
To the best of our knowledge, even though such an expression has been extensively used in the literature for NEQ entropy, it has been used by simply appealing to the information entropy [57].
The distinction between the Gibbs' statistical entropy S and the thermodynamic entropy S should be emphasized. The latter appears in the Gibbs fundamental relation that relates the energy change dE with the entropy change dS as is well known in classical thermodynamics, and as we will also demonstrate below; see also Equation (23a). The concept of microstates is irrelevant for this, which is a purely thermodynamic relation. On the other hand, S is solely determined by {m k } so its a statistical quantity. It then becomes imperative to show their equivalence, mainly because S is based on the Boltzmann idea. This equivalence has been justified elsewhere [51,52], and will be briefly summarized below.

Remark 3.
Because of this equivalence, we will no longer make any distinction between the statistical Gibbs entropy and the thermodynamic entropy and will use the standard notation S for both of them.

Remark 4. The Gibbs entropy S appears as an instantaneous ensemble average, see Definition 12.
This average should be contrasted with a temporal average in which a macroquantity ϕ is considered as the average over a long period τ 0 of time where ϕ(t) is the value of ϕ at time t [14]. For an EQ macrostate M eq , both definitions give the same result provided ergodicity holds. The physics of this average is that '(t) at t represents a microstate of M eq . As M eq is invariant in time, these microstates belong to M eq , and the time average is the same as the ensemble average if ergodicity holds. However, for a NEQ macrostate M(t), which continuously changes with time, the temporal average is not physically meaningful as the microstate at time t corresponds to M(t) and not to M(t = 0) in that the probabilities and Z are different in the two macrostates. Only the ensemble average makes any sense at any time t as was first pointed out in [58]. Because of this, we only consider ensemble averages in this review.
The maximum possible value of S(t) for given Z ∈ S Z occurs when m k are uniquely specified in S Z . This makes S(t) a state function of Z(t) with no explicit time dependence, which we write as S(Z). Thus, The simplest way to understand the physical meaning is as follows: Consider Z ∈ S Z at some time t. As S(t) may not be a unique function of Z, we look at all possible entropy functions for this Z. These entropies correspond to all possible sets of {p k (t)} for a fixed Z, and define different possible macrostates {M}. We pick that particular M ∈ {M} among these that has the maximum possible value of the entropy, which we denote by S(Z) or S(Z(t)) without any explicit t-dependence. This entropy is a state function S(Z). For a macroscopic system, this occurs when the corresponding microstate probabilities for M are so that We wish to point out the presence of nonzero probabilities in Equation (49a) that explains the comment above of available microstates. Including microstates with zero probabilities will not correcting account for the number of microstates with given Z.
There is an alternative to the above picture in which we can imagine the Σ for which Z has been fixed, which essentially "isolates" Σ and converts it into a Σ 0 . Then, as t varies, its entropy increases until it reaches its maximum value S(Z) in accordance with Proposition 1.

Remark 5.
We emphasize that Z = (E, W) so p k above in Equation (49a) is determined by the average energy E and not by the microstate energy E k as derived later in Section (8.2). The p k in Equation (49a) basically replaces the actual probability distribution in Equation (101) by a flat distribution of height 1/W(Z) and width W(Z), a common practice in the thermodynamic limit of statistical mechanics [14]. Despite this modification, the entropy has the same value for a macroscopic system, for which β and F w are given by Equations (72) and (73), respectively; see also Section 8.2.
Let us consider a different formulation of the entropy for a macrostateM(t) ∈ S X specified by some X = X(t)⊂ Z at some instance t. This macrostate provides a more incomplete specification than in S Z . Applying the above formulation toM ∈ S X , and consisting of microstates {m k }, forming the set m ≡ m(X), with probabilities {p k (t)}, we find that is the entropy ofM; here W(X) is the number of distinct microstates m k . It should be obvious that Again, under the equiprobable assumption Γ(X) denoting the sample space spanned by m = {m k }, the above entropy takes its maximum possible value which is the well-known value of the Boltzmann entropy for a body in equilibrium and provides a statistical definition of, and hence connects it with the, thermodynamic entropy of the body proposed by Boltzmann. The maximization again has the same implication as in Equation (48): For given X, we look for the maximum entropy at all possible times. It is evident that Thus, the NEQ entropy S(Z, t) as t → τ eq , the equilibration time, reduces to S(X) in EQ, as expected. Before equilibration, S(Z) in S Z remains a nonstate function S(X, t) in S X where we do not invoke ξ. It is the variation in ξ that is responsible for the time variation in S(X, t). A simple proof of this conclusion is given in Section 8.3; see Remark 15 also. We can summarize this conclusion as Conclusion 1. The variation in time in S(X, t) in S X is due to the missing set of internal variables ξ.
We now revert back to the standard use of X, and Z. Let us consider a body Σ, which we take to be isolated and out of equilibrium so that its macrostate M spontaneously relaxes towards M eq at fixed X. Its entropy S(X,t) in S X has an explicit time dependence, which continue to increase towards S(X). For such NEQ states, the explicit time dependence in S(X,t) is explained by introducing ξ to make their entropies a state function in an appropriately chosen larger state space S Z [41]. It is also shown there that a NIEQ macrostate with a nonstate function entropy S(Z,t) may be converted to an IEQ macrostate with a state function entropy S(Z ) by going to an appropriately chosen larger state space S Z spanned by Z with S Z its proper subspace. Therefore, in most cases of interest here, we would be dealing with a state function and usually write it as S(Z), unless a choice for Z has been made based on the experimental setup. In that case, we must deal with a pre-determined state space S Z so that some NEQ states that lie outside S Z can become a state function in some S Z ⊃ S Z .
We have discussed above that the explicit time dependence in a NEQ macrostate with a nonstate function entropy S neq (t) . = S(X,t) is due to additional state variables in¸and that this NEQ macrostate may be converted into an IEQ macrostate with a macrostate function entropy S ieq (Z) by going from S X to an appropriately chosen larger state space S Z . Similarly, it has been shown [41] that a NIEQ macrostate M nieq in S Z with a nonstate function entropy S nieq (t) . = S(Z,t) may be converted to an IEQ macrostate M ieq in an appropriately chosen larger state space S Z with a state function entropy S ieq (Z ).The additional internal variables¸ that are over and above¸in Z give rise to additional entropy generation as they relax for fixed Z. This results in the following inequality: However, if the choice for Z has been made based on the experimental setup and the observation time τ obs , see Section 8.1, we must restrict our discussion to S Z so that we must consider M nieq in S Z the following. This will be done in Section 8.3; see Remarks 13 and 15.

A Proof of the Second Law
The second law has been proven so far under different assumptions ( [53,[58][59][60][61], (among others)). Here, we provide a simple proof of it based on the postulate of the flat distribution; see Remark 5. The current proof is an extension of the proof given earlier see also ([53] (Theorem 4)). We consider an isolated system Σ 0 for which the second law is expressed by Equation (42). However, for simplicity, we will suppress the subscript 0 from all the quantities in this section. As the law requires considering the instantaneous entropy as a function of time, we need to focus on the sample space at each instant to determine its entropy S as a function of time. At each instance, it is an ensemble average over the instantaneous sample space Γ(t) formed by the instantaneous set m(t) of available microstates, see Equations (14) or (47). We will use the flat distributions for the microstates at each instance, see Remark 5, so that the entropy is given by Equation (49b).
To prove the second law, see Proposition 1, we proceed in steps by considering a sequence of sample spaces belonging to Γ as follows [53,58]. At a given instant, a system happens to be in some microstate. We start at t = t 1 = 0, at which time Σ happens to be in a microstate, which we label m 1 . It forms a sample space Γ 1 containing m 1 with probability p (1) 1 = 1, with the superscript denoting the sample space. We have S (1) = 0. At some t = t 2 , the sample space is enlarged from Γ 1 to Γ 2 , which contains m 1 and m 2 , with probabilities p (2) 1 and p (2) 2 . Using the flat distribution, the entropy is now S 2 = ln 2. We just follow the system in a sequence of time so that at t = t n , we have a sample space Γ n with m 1 , m 2 , · · · , m n so that S n = ln n. Continuing this until all microstates in Γ have appeared, we have S max = ln W.
Thus, we have proven that the entropy continues to increase until it reaches its maximum in accordance with Proposition 1.

Generalized Microforce and Microwork for Σ
Traditional formulation of statistical thermodynamics [14,19,53] takes a mechanical approach in which m k follows its classical or quantum mechanical evolution dictated by its SI-Hamiltonian H( x|W). The quantum microstates are specified by a set of good quantum numbers, which we have denoted by k above as a single quantum number for simplicity; we take k ∈ N, N denoting the set of natural numbers. We will see below that k does not change as W changes. In the classical case, we use a small cell δx k around x k = x as discussed above as the microstate m k . The Hamiltonian gives rise to a purely mechanical evolution of individual m k 's, which we will call the Hamiltonian evolution, and suffices to provide their mechanical description. The change in H( x|W) in a process is The first term on the right vanishes identically due to Hamilton's equations of motion for any m k . Thus, for fixed W, the energy E k = H k . = H( x k |W) remains constant as m k moves about in Γ(W). Only the variation dW in S Z generates any change in E k . Consequently, we do not worry about how x k changes in H( x|W) in the phase space, and focus, instead, on the state space S Z , in which can write where dW k denotes the generalized microwork produced by the generalized microforce F wk : For the case W = (V, ξ), the corresponding microforce F wk is (P k , A k ), where The corresponding microwork is

Statistical Significance of dW and dQ
Before proceeding further, let us see how the generalized macrowork and macroheat could be understood from a statistical point of view so that we can identify them using the Hamiltonian. Once W has been identified, the Hamiltonian must be expressed in terms of it. Thus, m k and E k are functions of W in S Z . We now prove

Theorem 2. E(t) is a function of W(t) and S(t) for any
Proof. We consider the differential As p k (t)'s are unchanged in the first sum, this sum is evaluated at constant entropy so this is purely mechanical macroquantity dE m ; see Equation (20). This sum is a function of W(t) as is seen clearly in Equation (55b). The second contribution is at fixed microstate energies E k so W(t) is held fixed, but require changes in the probabilities so it is the stochastic contribution dE s , see Equation (55b). The changes {dp k (t)} result in is dS. As dE s and dS = −∑ k (η k (t) + 1)dp k (t) = −∑ k η k (t)dp k (t) (59) are both extensive, they must be linearly related with an intensive constant of proportionality. This proves that E(t) is a function of S(t) and W(t) in general for any M arb .
Note that we have used the identity ∑ k dp k = 0 above; see also Equation (108). We introduce a special process, to be called a generalized isometric process, which is a process at fixed W(t) and is a generalization of an isochoric process. In this process, the work done by each mechanical variables in W(t) remains zero so dE m ≡ 0. We now prove the following theorem that establishes the physical significance of the two contributions. Theorem 3. The isentropic contribution represents the generalized macrowork dW(t) and the stochastic contribution represents the generalized macroheat dQ(t) for any M arb .
Proof. We follow Landau and Lifshitz [14] and rewrite the first term in Equation (58) as where we have used Equation (55c). The use of Equations (64a) and (64b) proves that is the isentropic contribution, making macrowork a mechanical concept as we have already pointed out. This identification then also proves that the macroheat in the first law, see Equation (23a), must be properly identified with dQ(t). Accordingly, is purely stochastic.
The linear proportionality between dQ = dE s and dS mentioned above in the proof of Theorem 2 results in which is a statistical proof of the identity in Equation (5a) relating dQ(t) and dS(t) for any M arb . We also note that the ratio T arb (t) is related to the ratio of two SI-macroquantities. Thus, it can be used to characterize the instantaneous macrostate M arb . This should be contrasted with theMNEQT, in which the ratio does not characterize the instantaneous macrostate M arb . In Equation (104), we provide a general procedure for a thermodynamic identification of T arb .

Remark 6.
It is worth emphasizing that dQ(t) and dS(t) in Equation (61)-(59) are defined as instantaneous quantities in terms of the instantaneous changes {dp k (t)}, regardless of the speed of the segmental process dP arb . = dP (t), and instantaneous values {E k (t)} and {p k (t)}. Therefore, the generalized macroheat and entropy change are defined regardless of the speed of the arbitrary process. As dE(t) in Equation (58) is also defined instantaneously, it is clear from Equation (23a) that the generalized work dW is also defined instantaneously regardless of the speed of the arbitrary process. This is consistent with our above derivation of dW in terms of generalized forces. The observation is very important as it shows that the existence of all SI-quantities does not depend on the speed of the arbitrary process dP arb . However, see also Section 8.1 further clarification on the importance of τ obs . From now onward, we will not make a distinction between T and T arb .
We should point out that, as W(t) is a parameter, dW(t) is the same for all microstates. The statistical nature of dE m is reflected in the statistical nature of F w (t), such as P(t) and A(t), of the system. Thus, the SI-fields F wk (t) are fluctuating quantities from microstate to microstate as expected in any averaging process.
We can now identify W as the macrowork parameter, and the variation dZ(t) . = (dE(t), dW(t)) in S Z defines not only the microwork {dW k }, but also a thermodynamic process P. The trajectory γ k in S Z followed by m k as a function of time will be called the Hamiltonian trajectory during which W varies from its initial (in) value W in to its final (fin) value W fin during P, the the path γ P denotes the path the macrostate follows during this process; see Definition 10. The variation produces the generalized microwork dW k . As p k plays no role in dW k , its determination is simplifies in the MNEQT. The microwork dW k also does not change the index k of m k as said above. The ensemble average of F wk is F w , see Equation (28), that of dW k is dW given by as given earlier in Equation (27). It is based on using the mechanical definition (force X displacement) of work. The macroforce corresponding to W = (V, ξ) is F w = (P, A), where P = P , and A = A . The corresponding SI-macrowork is given earlier in Equation (32a).
The above discussion proves that the definition of macroheat and macrowork is valid for any M arb . It is useful to compare the above approach with the traditional formulation of the first law in terms of d e Q(t) and d e W(t): both formulations are valid in all cases. It should be mentioned that the above identification is well known in equilibrium statistical mechanics, but its extension to irreversible processes and our interpretation is, to the best of our knowledge, novel. While the instantaneous average F w (t) such as the pressure P(t) is mechanically defined under all circumstances, it will only be identified with the thermodynamic definition of the instantaneous pressure for a uniquely identified macrostate in S Z . Being purely mechanical in nature, a trajectory is completely deterministic and cannot describe the evolution of a macrostate M during P unless supplemented by thermodynamic stochasticity, which requires p k (M) as discussed above [14]. Thermodynamics emerges when quantities pertaining to the trajectories are averaged over the trajectory ensemble {γ k } with appropriate probabilities that will usually change during the process.

Conclusion 4.
The change dE consists of two independent contributions-an isentropic change dE m = −dW, and an stochastic change dE s = T arb dS. On the other hand, the MI-macroheat and the MI-macrowork suffer from ambiguity; see, for example, Kestin [12].

Remark 7.
It is clear from the above discussion that it is the macroheat and not the macrowork that causes p k (t), and therefore the entropy to change. This is the essence of the common wisdom that heat is random motion. But we now have a mathematical definition: macroheat is the isometric part of dE(t) that is directly related to the change in the entropy through changes in p k (t). Macrowork is that part of the energy change caused by isentropic variations in the "mechanical" state variables W(t). This is true no matter how far the system is from equilibrium. Thus, our formulation of the first law and the identification of the two terms is the most general one, and applicable to any M arb .

Remark 8.
The relationship between the macroheat and the entropy becomes simple only when M happens to be in internal equilibrium, see Section 6.1, in which case T arb (t) is replaced by T(t), which has a thermodynamic significance; see Equation (72) and we have the thermodynamic identity, called the Clausius Equality in Equation (5a) dQ(t) = T(t)dS(t) for M ieq , which is very interesting in that it turns the well-known Clausius inequality d e Q = T 0 d e S ≤ T 0 dS into an equality.
For the sake of completeness, we briefly discuss the various attempts to the study of the microanalogs dW k and dQ k of the dW and dQ, respectively, that has flourished into an active field in diverse branches of NEQT at diverse length scales from mesoscopic to macroscopic lengths [33,34,[36][37][38][62][63][64][65][66]; see also some recent reviews [67][68][69]. Unfortunately, this endeavor is apparently far from complete [12,33,34,36,37,. This is because of the confusion about the meaning of macrowork and macroheat even in classical NEQT [9,12] involving SI-or MI-description, which has only recently been clarified [32,41,51,52,55,91,92] in the MNEQT, where a clear distinction is made between the generalized macrowork (macroheat) dW (dQ) and the exchange macrowork (macroheat) d e W (d e Q). In an EQ process, both macroworks (macroheats) have the same magnitude, but not in a NEQ process, where the difference determines It is important to draw attention to the following important fact. We first recognize that the first law in Equation (23b) refers to the change in the energy caused by exchange quantities. Therefore, dE on the left truly represents d e E. Accordingly, we write Equation (23b) as which justifies Equation (21) for d e . Subtracting this equation from Equation (23a), we obtain the identity which not only justifies Equation (21) for d i but also Equation (22) for which we have used Equation (9).

Remark 9.
The above analysis demonstrates the important fact that the first law can be applied either to the exchange process (d e ) or to the interior process (d i ). The last formulation is also applicable to an isolated system.

Medium Σ
The above discussion can be easily extended to the medium (the suffix k denotes its microstates) with the following results where all the quantities including k refer to the medium, except d e W and d e Q, and have their standard meaning. The analog of Equation (62) is d Q/d S = T 0 as expected; see Equation (63). We clearly see that such as when mechanical equilibrium is not present. In this case, we also have with dW 0 = dQ 0 in view of Equation (22). In a finite process P, all infinitesimal quantities are replaced by their net changes where ∆ i W is obtained by integrating d i W in Equation (77c) over P; the result is given in Equation (82), where it is discussed.

Irreversible Macrowork and Macroheat
We can now identify d i W(t) and d i Q(t) : satisfying Equation (22), which follows from d i E = 0; see Equation (9). It is easy to see that d i W(t) reproduces Equation (31), where we must use d w = −d e w, and dw =d e w+d i w.

Internal Equilibrium
We now revert back to the original notation X and Z. We will refer to S(Z(t)) in terms of microstate number W(Z(t)) in Equation (49b) as the time-dependent Boltzmann formulation of the entropy or simply the Boltzmann entropy [65], whereas S(X) in Equation (51) represents the equilibrium (Boltzmann) entropy. It is evident that the Gibbs formulation in Equations (47) and (50) supersedes the Boltzmann formulation in Equations (48) and (51), respectively, as the former contains the latter as a special limit. However, it should be also noted that there are competing views on which entropy is more general [65,93]. We believe that the above derivation, being general, makes the Gibbs formulation more fundamental. The continuity of S(Z, t) follows directly from the continuity of p k (t). Its existence follows from the observation that it is bounded above by ln W(Z) and bounded below by 0, see Equation (49b).
We now introduce the central concept of the MNEQT, which is based on the existence of S(Z) above; see Definition 5, which we now expand.

Definition 16.
A NEQ macrostate M whose entropy is a state function S(Z) in S Z is said to be an internal equilibrium (IEQ) macrostate M ieq [41,55]; if not, its entropy S(Z, t) is an explicit function of time t in S Z . An IEQ-macrostate in S Z is a unique macrostate in S Z .
We clarify this point. If we do not use ξ for M, which is not unique in S X , then its entropy cannot be a state function in S X , and must be expressed as S(X, t). Thus, the importance of ξ is to be able to deal with a state function entropy S(Z) by choosing an appropriate number of internal variables. Throughout this work, we will only deal with IEQ macrostates. However, as we will see, our discussion of NEQ macrowork will cover all states.
Being a state function, S(Z) shares many of the properties of EQ entropy S(X), see Definition 5:

1.
Maximum: S(Z) is the maximum possible value of the NEQ entropy in S Z for a given Z [41].

2.
No memory -Its value also does not depend on how the system arrives in M ieq ≡ M(Z), i.e., whether it arrives there from another IEQ macrostate or a non-IEQ macrostate [41]. Thus, it has no memory of the earlier macrostate.
There are some macrostates that emerge in fast changing processes such as the free expansion that possess memory of the initial states so that their entropy will no longer be a state function in S X . In this case, we need to enlarge the state space to S Z by including internal variables as done in Section 14.

Remark 10.
It may appear to a reader that the concept of entropy being a state function is very restrictive. This is not the case as this concept, although not recognized by several workers, is implicit in the literature where the relationship of the thermodynamic entropy with state variables is investigated. To appreciate this, we observe that the entropy of a body in internal equilibrium [41,55] is given by the Boltzmann formula in Equation (49b) in terms of the number of microstates corresponding to Z(t). In classical nonequilibrium thermodynamics [3], the entropy is always taken to be a state function. In the Edwards approach [94] for granular materials, all microstates are equally probable as is required for the above Boltzmann formula. Bouchbinder and Langer [42,43] assume that the nonequilibrium entropy is given by Equation (49b). Lebowitz [65] also takes the above formulation for his definition of the nonequilibrium entropy. As a matter of fact, we are not aware of any work dealing with entropy computation that does not assume the nonequilibrium entropy to be a state function. This does not, of course, mean that all states of a system are internal equilibrium states. For states that are not in internal equilibrium, the entropy is not a state function so that it will have an explicit time dependence. But, as shown elsewhere, Ref. [41] this can be avoided by enlarging the space of internal variables. The choice of how many internal variables are needed will depend on experimental time scales and cannot be answered in generality just as is the case in EQ thermodynamics for the number of observables; the latter depends on the experimental setup. A detailed discussion is offered elsewhere [45].

Gibbs Fundamental Relation
Being a state function, S(Z) in S Z for M ieq results in the following Gibbs fundamental relation for the entropy which can be inverted to express the Gibbs fundamental relation for the energy as where we have introduced as the inverse temperature of the system (we set the Boltzmann constant k B = 1 throughout the review), and have used Equation (28) for the generalized macroforce F w . Recalling Equation (64b), we see that the second term in Equation (71b) is nothing but the SI-macrowork dW. Comparing Equation (71b) with Equation (23a), we can identify the generalized macroheat dQ with TdS, which then proves Equation (5a).
It should be stated here that the choice and the number of state variables included in X or Z is not so trivial and must be determined by the nature of the experiments [40]. We will simply assume here that they have been specified. Just as S = S(X) is a state function of X for M eq in S X , there are M ieq in S Z for which S(Z) is a state function of Z.
The possibility of a Gibbs fundamental relation for M nieq is deferred to Section 8.3.

A Digression on the NEQ-Temperature
While the concept of the macrowork is quite familiar from mechanics, the concept of the macroheat is peculiar to thermodynamics in view of Equation (5a). In EQ thermodynamics, the macroheat dQ is directly proportional to the change dS, and the constant of proportionality determines the EQ temperature T. Indeed, the concepts of entropy and of temperature are unique to thermodynamics and are well established in EQ thermodynamics. A Σ in thermal equilibrium with a Σ at T 0 obviously has the same temperature T 0 . The temperature for an isolated system in equilibrium is also well defined; its inverse is identified with the energy derivative of the equilibrium entropy [14]. The definition is valid for all EQ systems, even those containing gravitational interaction. This is confirmed by the fact that Bekenstein used it to identify the temperature of an isolated black hole [95,96]. The formulation is valid both classically and quantum mechanically [14].
The EQ definition of the temperature is formally identical to that in Equation (72), which is valid in NEQT [41,[51][52][53]55,91,92]. In this, we have a general thermodynamic definition of a temperature for any M. It is important to realize that the notion of a NEQ temperature is an absolute necessity for the Clausius statement of the second law that the exchanged macroheat flows spontaneously from hot to cold to be meaningful.
It is clear from the above discussion that macrowork is the isentropic change in the energy, while macroheat is the energy change due to the entropy change. This is not as surprising a statement as it appears, since a mechanical system is usually thought of as a system for which the entropy concept is not meaningful. A different way to state this is that the entropy remains constant (isentropic) in any mechanical process as we have done above. Planck [97] had already suggested that the temperature should be defined for NEQ macrostates just as the entropy should be defined for them if we need to carry out a thermodynamic investigation of a NEQ system. Such a temperature was apparently first introduced by Landau [98] for partial set of the degrees of freedom (dof). This then allows the possibility that the notion of temperature can be separately applied, for example, to vibrational and configurational dof in glasses that are known to be out of equilibrium with each other [46] in that they are ascribed different temperatures. This means that macroheat would be exchanged between them until they come to equilibrium, but this is internally exchanged. But there seems to be a lot of confusion about the meaning of the entropy and temperature in NEQT ( [8,24,40,93,[99][100][101][102][103][104][105] (for example)), where different definitions lead to different results. In contrast, the meaning of entropy and fields in equilibrium thermodynamics has no such problem.
We agree with Planck and believe that there must exist a unifying approach to identify the temperature for M arb ; see Definition 6, with or without memory effects in S Z . The inverse temperature defined above in Equation (72) is not directly applicable to nonIEQmacrostates in S Z for which S is not a state function, but can be extended to them so as to accommodate memory effects as we do in Section 8.3. However, we will not consider them in detail in this review.

Criterion 5.
The identification of temperature in M arb must satisfy some stringent but obvious criteria: C1 It must be intensive and must reduce to the temperature determined by Equation (72) for M eq and M ieq even for an isolated system. C2 It must cover negative temperatures [106] that are commonly observed for some dof such as nuclear spins in a system. As these dof are not involved in any macroscopic motion ( [14] (Section 73)), there is no kinetic energy involved. Most common occurrence of a negative temperature is when the above spin dof are out of equilibrium with the other dof such as lattice vibrations in the system. C3 It must satisfy the Clausius statement that macroheat between two objects always flows spontaneously from hot to cold for positive temperatures. When negative temperatures are considered, macroheat must flow from a system at a negative temperature to a system at a positive temperature. C4 It must be a global rather than a local property of the system so that we can differentiate hot and cold between two different systems.
The first criterion ensures that the new temperature is an extension of the conventional notion of the temperature that is valid when the entropy is a state function. This means that the new notion of temperature is valid for any arbitrary macrostate. In addition, it must exist even for an isolated system. The second criterion ensures that our formalism includes negative temperatures that may occur in a lattice system. The third criterion ensures compliance with the second law for interacting systems. This is a very important criterion, which every notion of temperature must satisfy. We will come back to this issue again in Section 6.5 where we prove it in the MNEQT. The last criterion ensures that the temperature is associated with the entire system, whether the system is homogeneous or not. This will be explained by direct calculations of inhomogeneous systems in Section 10. By extension, the concept of a NEQ temperature can be also applied to different dof of a system such as a glass under the assumption that they are weakly interacting in accordance with the approach taken by Landau [98]. This results in the Tool-Narayanaswamy relation derived in Section 11.
Before we close this discussion, we wish to point out major differences between the NEQ temperature T in the MNEQT and its other definitions. We first consider theMNEQT. The most important theories belonging to this class are the classical local irreversible thermodynamics (LNEQT) [3], the rational thermodynamics (RNEQT) [107], and the extended irreversible thermodynamics (ENEQT) [104] as we had mentioned earlier. We refer the reader to [40,104] for excellent reviews on these theories that use local densities of energy e and entropy s. They are continuum theories, and can all be classified as continuum MNEQT to be denoted by the CNEQT here. We consider them critically later in Section 15. They differ in the choice of their state spaces. Considering the local entropy and energy densities s and e, the inverse local temperature is defined as ∂s/∂e, and differs from the global temperature in the MNEQT.

1.
In the LNEQT, each local volume element is in EQ so the local temperature is the EQ temperature of the volume element, and differs from T, which is a global temperature.

2.
In the RNEQT, the temperature is taken as a primitive quantity along with the entropy. Because of the memory effect, the temperature at any time depends on the entire history. Thus, it is a local analog of the global temperature of M nieq in the MNEQT, but the latter is defined thermodynamically.

3.
In the ENEQT, the fluxes are part of the state variables so the local temperature also depends on them. Assuming the total entropy to also depend on the fluxes ( [20], (see Equation (5.66), for example)), one can identify the global analog of the temperature in the ENEQT. However, as fluxes are MI-quantities, this temperature cannot be compared with the SI-temperature in the MNEQT.
There is a recent attempt [108] to introduce another NEQ temperature by using fluctuation theorems to determine the entropy generation, which is then related to the Gouy-Stodola theorem derived later (see Equation (84b)). It is limited to a interacting Σ in a medium Σ so does not apply to an isolated system. In addition, its validity is limited to the situation when the Gouy-Stodola theorem is valid as seen from the derivation of Equation (84b).

Uniqueness of S ieq (Z) and T
We now give an alternative demonstration of the uniqueness of the entropy of M ieq in S Z , which is based on the discussion of the internal variables in Section 3. Let us assume that we divide Σ into a finite number of nonoverlapping EQ subsystems {Σ i } such that ∪ i Σ i = Σ. Without loss of generality, we assume that the subsystems are not in EQ with each other (their fields are not identical) so that Σ is in a NEQ macrostate. Let λ (i) corr denote the correlation length of Σ i , and we define λ corr = max λ (i) corr to denote the maximum correlation length determining quasi-independence required for entropy additivity as discussed in Section 2; see Equation (2). For this, we need to take the linear size ∆l i λ corr of Σ i . The EQ microstate M (i) eq of Σ i is uniquely described in S X . The additivity of entropy gives S ieq that must be a function of {X i }. Moreover, since each M (i) eq has a unique entropy S i (X i ), S ieq also has a unique value As we need to express S ieq in terms of X(t) = ∑ i X i (t), we need additional independent linear combinations ξ(t) = ∪ i ξ i (t) made from the set {X i } as already discussed in Section 3 to ensure that S(Z(t)) depends on the same number n * of state variables as there are in S ieq ({X i (t)}). This uniquely defines in S Z in terms of the unique values S i (X i (t)). It is a mathematical identity between the left side for Σ B and the right side for Σ C . We can also take Σ i 's to be in M iieq 's in S Z i 's so that S i (Z i (t)) are also uniquely defined. Then, the same reasoning as above also proves that is unique by ensuring that the number of arguments n * are the same on both sides between the entropies for Σ B and Σ C . We now prove the following central theorem on the existence of NEQ entropy for any M ieq with n * independent state variables. Theorem 6. Existence: The SI-entropy S(Z(t)) for any M ieq exists, has a unique thermodynamic temperature T, and is additive in S Z .
Proof. According to the postulates of classical thermodynamics, EQ entropies exist in S X and are continuous. Therefore, Equation (74a) proves the existence of the entropy S(Z(t)) for any M ieq in the state space S Z , and is continuous. It follows from the existence of S(Z(t)) that M ieq has a unique thermodynamic temperature T. In addition, S(Z(t)) is also additive as follows from Equation (74c). This proves the theorem. Corollary 1. The state space S Z contains S X as a proper subspace because of the presence of the internal variables, except when Σ is in EQ, when they become the same.
Proof. For any M ieq , S Z contains all possible linear combinations of ξ(t) made from the set {X i }. Hence, it contains S X as a proper subspace. In EQ, internal variables become superfluous as they are no longer independent so their affinity vanishes. Thus, S Z reduces to S X in Equation

Irreversibility Inequalities in M ieq
We consider the Hamiltonian H( x|w, ξ) in S Z . We only consider the case of extensive macrowork parameters. As m k evolves under the variation in W, its energy E k changes by dE k = −dW k without changing p k ; see Equation (55b). The change determines the isentropic generalized macrowork dW = F w · dW = −dE m . The stochasticity appears from the generalized macroheat dQ = dE s = TdS. Recalling that for Σ, T = T 0 , f w0 = (P 0 , · · · ), A 0 = 0, we have in general, where the missing terms in the top equation refires to other elements in w. The irreversible macrowork d i W . = dW − d e W due to the thermodynamic macroforce ∆F w has been given in Equation (31).
Using d e Q in dQ, we find Equating this with d i W from Equation (31), we obtain for the irreversible entropy generation see Equation (31) for ∆F w · dW. Each term on the right side must be nonnegative for the second law to be valid. Thus, in terms of ∆F h = T 0 − T, we see that the first term in the first equation, which proves the Clausius statement of the macroheat flow from "hot" to "cold," thus making sure that T indeed can be thought of as a "thermodynamic temperature" of the entire system, even if the latter is inhomogeneous. This is the requirement C4 for a thermodynamic temperature. Another important consequence of the second law comes from the first term in the second equation [55]: Similarly, the second term results in the inequality due to macroforce imbalance, and consists of three separate inequalities This thus proves the inequality for d i W in Equation (31). Using the inequality for d i W in d i Q = d i W also proves the inequality for d i Q in Equation (76a). All these inequalities help drive the system towards EQ in accordance with the second law. We summarize the result in the following corollary.

Corollary 2. The irreversible macrowork d i W(t) or macroheat d i Q(t) is nonnegative.
Proof. From Equation (77c), we find that in accordance with the second law.
For example, if d i W corresponds to the irreversible macrowork done by pressure imbalance only (so that we omit the last term in d i W in Equation (32b)), then If the system's pressure P(t) > P 0 , the pressure of the medium, the volume of the system increases so that dV(t) > 0. In the opposite case, dV(t) < 0. In both cases, d i W(t) > 0 out of equilibrium. When d i W(t) consists of several independent contributions, each contribution must be nonnegative in accordance with the second law and Corollary 2. The significance of the irreversible macrowork in Equation (79) has been discussed in Refs [91,92], where it is shown that this macrowork results in raising the kinetic energy of the center-of-mass of the surface separating Σ and Σ by dK S and overcoming macrowork dW fr done by all sorts of viscous or frictional drag. Because of the stochasticity associated with any statistical system, both energies dissipate among the particles in the system and appear in the form of macroheat d i Q(t).
In the absence of any heat exchange (d e S = 0) or for an isothermal system (T = T 0 ), we have where d i W is given by Equation (31).

Internal Variables and the Isolated System
The above formulation of MNEQT is perfectly suited for considering an isolated system Σ (d e W = d e Q ≡ 0) so that Equation (22) or d i E = 0 in Equation (9) becomes the most important thermodynamic equality. For an isolated system, dX = 0 so that Theorem 7. The irreversible entropy generated within an isolated system is still related to the dissipated macrowork performed by the internal variables.
Proof. As E remains fixed for an isolated system (dQ = Td i S), we have from Equation (23a) in accordance with the second law.
Note that the above equation, though it is identical to Equation (80) in form, is very different in that d i W here is simply A · dξ. Same conclusion is also obtained when we apply Equation (76b) to an isolated system.

Corollary 3.
Neither the entropy can increase nor will there be any dissipated work unless some internal variables are present in an isolated system. If no internal variables are used to describe an isolated system, then thermodynamics requires it to be in Equation

Dissipation and Thermodynamic Forces
As the inequality d i W ≥ 0, see Equations (31) and (77c), or ∆ i W ≥ 0, see (69c), for the irreversible macrowork for M ieq in S Z follows from the second law, it is natural to identify it as the dissipation or the dissipated work; recall that ∆ i W is obtained by integrating d i W in Equation (31) over P Definition 17. The irreversible macrowork d i W ≥ 0 or ∆ i W ≥ 0 for M ieq belonging to S Z along P, is identified as the dissipation or the dissipated work in the MNEQT.
The definition is applicable regardless of Z, and has contributions from macroforce imbalance in S Z as given in Equation (30a) at each point in P. All microstates along the path γ P of P denote IEQ-macrostates M ieq belonging to S Z . In this sense, the definition is a generalization of the definition of the lost work ∆W lost in theMNEQT [11,12,14,16,25,26] in an irreversible process P between EQ macrostates A eq and B eq to any process P containing M ieq between A ieq and B ieq . The overbar in P is for EQ macrostates A eq and B eq . The lost work is well known in theMNEQT; see for example, p. 12 in Woods [11] or Section 20 in Landau and Lifshitz [14]. As ∆ i S does not directly appear in theMNEQT, ∆W lost , which is given by where (∆ e W) rev is the exchange work during the reversible process P rev associated with P, is used to determine ∆ i S indirectly as we now explain. We take Σ = Σ ∪ Σ w , where Σ at constant T 0 , P 0 is thermally insulated from another working medium Σ w , with Σ 0 = Σ ∪ Σ.
Let ∆ e Q and ∆ e W be the exchange macroquantities from Σ , which are well defined, and ∆ e W = −∆ e W the exchange macrowork from Σ w . We will closely follow Landau and Lifshitz ( [14] (where ∆ e W is denoted by R and d e W by dR)). We first consider an infinitesimal process δP. In theMNEQT, from which we obtain for P which is the generalization of the known result in [14] to an arbitrary process in S X . For fixed and constant T 0 and P 0 , the first two integrals vanish and the third integral reduces to T 0 ∆ i S over P. Thus, as the minimum of ∆ e W is given by ∆G, we derive the result in [14]: Using ∆ e W = −(∆ e W + ∆ e W ), and recognizing that (∆ e W) min = (∆ e W) rev = −∆F, we have proved not only Equation (83) but also We now show that we obtain the same result in the MNEQT, where we assume that the temperature of Σ remains equal to T 0 as assumed by Landau and Lifshitz [14], use dE = T 0 dS − dW, and recognize that d e W = d e W + d e W . Comparing it with the dE in theMNEQT above, we immediately obtain Thus, both theories give the same result in this simple example. But our general expression for d i W or ∆ i W is not restricted to EQ terminal macrostates A eq and B eq of P; they refer to any two end macrostates A ieq and B ieq of any arbitrary process P. The procedure described by Landau and Lifshitz [14] or by Woods [11] is not general enough to make ∆W lost useful in all cases.
We now turn to our approach and relate dissipation with the entropy generation d i S for Σ in Equation (76b). The strategy is simple. We use Equation (22) and express d i Q using Equation (76a). Let us use the top equation, which gives For W = (V, ξ), it reduces to see, for example, Ref. [16]. The first term in both equations is due to macroheat exchange d e Q with Σ at different temperatures, which is not considered part of dissipation as we have defined above. It is clear that the root cause of dissipation is a "force imbalance" P(t) − P 0 , A(t) − A 0 ≡ A(t), etc. [11,12,41,51,52,54,55,91,92] between the external and the internal forces performing macrowork, giving rise to an internal macrowork d i W due to all kinds of force imbalances in ∆F w , which is not properly captured by d W − dF in theMNEQT in all cases as discussed above. The force imbalance are commonly known as thermodynamic forces driving the system towards equilibrium.
The irreversible macrowork is present even if there is no temperature difference such as in an isothermal process as long as there exists some nonzero thermodynamic force. The resulting irreversible entropy generation is then given by Td i S = d i W ≥ 0; see Equation (76b). We summarize this as a conclusion [16]:

Conclusion 8.
To have dissipation, it is necessary and sufficient to have a nonzero thermodynamic force. In its absence, there can be no dissipation.
We now prove one of the central results in the MNEQT in the following theorem. Theorem 9. The proportionality parameter T in Equation (5a) or (62) satisfies all the criteria (C1-C4) of a sensible temperature. Therefore, we identify T as the temperature of the system in any arbitrary macrostate M arb .

Proof.
As dQ and dS scale the same way with the size of Σ, T is an intensive quantity. When the entropy is a state function in S Z or S Z ⊃ S Z , we have a Gibbs fundamental relation given in Equation (71a). So the temperature is defined by a derivative in S Z or S Z , the latter giving T arb . This shows that C1 is satisfied for any M arb . As we have not imposed any restrictions on the signs of dQ(t) and dS(t), the parameter T(t) can be of any sign, which shows that C2 is satisfied. To demonstrate consistency with the second law, we rewrite the top equation in Equation (76b) to express d i S as a sum of two independent contributions here, d i S Q (t) is generated solely by exchange macroheat d e Q(t) at different temperatures, and d i S W (t) by the irreversible macrowork or macroheat d i W(t) ≡ d i Q(t). The two contributions are independent of each other. Accordingly, both contributions individually must be nonnegative in accordance with the second law. In particular, the inequality For T(t) > T 0 , d e Q(t) < 0 so that the macroheat flows from the system to the medium. For T(t) < T 0 , d e Q(t) > 0 so that the macroheat flows from the medium to the system. This establishes that C3 is satisfied. As dQ(t) and dS(t) are global quantities, the parameter T(t) is also a global parameter, which means that C4 is also satisfied. This proves the theorem.
Because of the importance of C4, we give many example in Section 10 to justify that T acts as a global temperature of the system even if it is composite with different temperatures. These examples leave no doubt that C4 is satisfied.
We conclude this subsection by considering a special case, also studied by Landau and Lifshitz ( [14] (Section 13 and specifically Equation (13.4))): it deals with the irreversibility generated only by macroheat exchange at different temperatures but no internal (macrowork) dissipation. It follows from Equation (87) that d i W = 0 in this case, even though there is irreversibility (d i S(t) > 0) due to the macroheat exchange. If there are internal variables also, then A = A 0 = 0 to ensure d i W = 0. This example is important in that it shows that just because there is irreversibility in the system, we do not have d i W(t) ≡ d i Q(t) = 0. We see from Equation (87) a result also derived by Landau and Lifshitz; note that they use dQ for d e Q. For d i Q = 0, we have dQ(t) = d e Q(t) so that Equation (89) is consistent with Equation (5a), as it must.
In the presence of nonzero d i Q, Equation (89) gets modified: one must subtract d i Q from the right side.

Cyclic Process
For a general body that is not isolated, the concept of its internal equilibrium state plays a very important role in that the body can come back to this macrostate M ieq several times in a nonequilibrium process. In a cyclic nonequilibrium process, such a macrostate can repeat itself in time after some cycle time τ c so that all state variables and functions including the entropy repeat themselves:

This ensures
in a cyclic process. All that is required for the cyclic process to occur is that the body must start and end in the same internal equilibrium state; however, during the remainder of the cycle, the body need not be in internal equilibrium. The same argument also applies to a cyclic process that starts and returns to M eq after some cycle time τ c . However, the body need not be in EQ macrostates during the rest of the cycle. We will consider such a case when we consider a NEQ Carnot cycle in Section 12.

Steady State
Consider a system between two different media as shown in Figure 2. For example, we can consider Σ between two heat baths Σ h and Σ h replacing the two media in the figure. We will study this example in the MNEQT in Section 10.3 using a composite system Σ between the two heat sources. In the presence of two media, it is possible for Σ to reach a steady state, in which it satisfies conditions similar to that for a cyclic process above in terms of MI-macroquantities: where the changes are over the system Σ. The above conditions in the MNEQT lead to important relations between exchange and irreversible macroquantities: as usual, the irreversible contributions satisfy the second law inequalities. For E, we have from Equation (23a) dQ = dW = 0, which follows from dQ = TdS = 0 for M ieq in S Z or for M nieq in S Z . Therefore, in the MNEQT, As a consequence, d e Q = d e W ≤ 0, a result that cannot be derived in theMNEQT by using the first law in Equation (23b). It should be noted, as said earlier in Section 1, that the steady state occurs only over a short period τ ∼ τ st compared to the time τ EQ required for the two media to equilibrate with each other. The latter time period is extremely large compared to τ st because of their extreme sizes. For a time period longer than τ st , the steady state cannot be treated as steady as Σ will begin the equilibrium process between them so that eventually at τ EQ , d i S will vanish as d e Q → 0. We will not consider this possibility here, but can be studied in the MNEQT.

Intrinsic Adiabaticity Theorem
We now have a clear statement of the generalization of the adiabatic theorem [14] for nonequilibrium processes going on in a body in an arbitrary macrostate in terms of the intrinsic quantity dS. We will call it the intrinsic adiabatic theorem.

Definition 18. Intrinsic Adiabatic Process: An intrinsic adiabatic process is an isentropic process (dS(t) = 0 and not necessarily d e S(t) = 0).
Such a process also includes the stationary limit, i.e. the steady macrostate of a nonequilibrium process discussed in the previous section. However, the extension goes beyond the conventional notion of an adiabatic process commonly dealt with in theMNEQT, according to which an adiabatic process [14] is one for which d e Q(t) = 0, which is equivalent to d e S(t) = 0. If d i S(t) = 0, it also represents a reversible process in a thermally isolated system so that d e Q(t) = 0. One can also have dS(t) = 0 in an irreversible process during which as usual, Equation (22) always remains satisfied. If the system is in a M arb , then we must also have recall Equation (62) for a M arb .

Theorem 10.
In an intrinsic adiabatic process, the sets of microstates and of their probabilities p k do not change, but d e p k = −d i p k = 0 for all k.
Proof. In terms d e p k and d i p k , Equations (91) and (92) Recognizing that there is only macrowork in dE, which requires p k not to change, we conclude that dp k = 0 for ∀k in an adiabatic process. As d i S(t) does not vanish in an irreversible process, d i p k (t) cannot vanish. Accordingly, d e p k = −d i p k = 0, ∀k for an irreversible adiabatic process. The conditions in Equation (108) remain valid as expected. As p k 's do not change, no microstate can appear or disappear. This proves the theorem.

Clausius Equality
We recall that Equation (5a), which we call the Clausius equality, follows from the Gibbs fundamental equation for M ieq in S Z or M nieq in S Z , see Equation (71b). It is merely is a consequence of the state function S for a M ieq or M nieq in respective state spaces so the equality is also valid for any M arb , see Equation (62). Here, we are only concerned with some M ieq . The equality is very interesting, and should be contrasted with the Clausius inequality d e Q ≤ T 0 dS.
First, it follows from Equation (5a) that dQ/T is nothing but the exact differential dS for M ieq so that for any cyclic process; here we have added the time argument for clarity. It is only because of the use of dQ(t) in place of d e Q(t) that the Clausius inequality has become an equality. The equality should not be interpreted as the absence of irreversibility (∆ i S > 0) as is clear from Equation (96) obtained by using d i S(t) ≡ dS(t) − d e S(t) for a cyclic process taking time τ: which is the second law for a cyclic process, and represents the irreversible entropy generated in a cycle. This is the original Clausius inequality. The quantity N(t) is the uncompensated transformation of Clausius [16] that is directly related to d i S(t) [109]; in contrast, N 0 (t, τ) where we have used the fundamental identity in Equation (22), is determined by the irreversible macroheat d i Q(t) or the irreversible macrowork d i W(t), and represents a different quantity as is evident. In terms of the two macroheats, we have which results in a new Clausius inequality compare with the original Clausius inequality in Equation (96).

Choice of Z
We first discuss how to choose a particular state space for a unique description of a macrostate M depending on the experimental setup. To understand the procedure for this, we begin by considering a set ξ n of internal variables (ξ 1 , ξ 2 , · · · , ξ n ) and Z n . = X ∪ ξ n to form a sequence of state spaces S (n) Z . In general, one may need many internal variables, with the value of n increasing as M is more and more out of EQ [45] relative to M eq . We will take n * to be the maximum n in this study, even though n << n * needed for S (n) Z will usually be a small number in most cases. We refer to Section 6.4, where the choice of n * is determined by the mathematical identity in Equation (74b) in S (n * ) Z . The two most important but distinct time scales are τ obs , the time to make observations, and τ eq , the equilibration time for a macrostate M to turn into M eq . For τ obs < τ eq , the system will be in a NEQ macrostate. Let τ i denote the relaxation time of ξ i needed to come to its equilibrium value so that its affinity A i → 0 [3,16,45,[48][49][50]. For convenience, we order ξ i so that τ 1 > τ 2 > · · · ; we assume distinct τ i 's for simplicity without affecting our conclusions. For τ 1 < τ obs , all internal variables have equilibrated so they play no role in equilibration except thermodynamic forces T − T 0 , P − P 0 , etc. associated with X that still drive the system towards Equation We choose n satisfying τ n > τ obs > τ n+1 so that all of ξ 1 , ξ 2 , · · · , ξ n have not equilibrated (their affinities are nonzero). They play an important role in the NEQT, while ξ n+1 , ξ n+2 , · · · need not be considered as they have all equilibrated. This specify M uniquely in S (n) Z , which was earlier identified as in IEquation Note that NEQ macrostates with τ n+1 > τ obs > τ n+2 are not uniquely identifiable in S Z . Thus, given τ obs , we look for the window τ n > τ obs > τ n+1 to choose the particular value of n. This then determines S (n) Z in which the macrostates are in IEquation From now onward, we assume that n has been found and S (n) Z has been identified. We now suppress n and simply use S Z below. Remark 11. The linear sizes of various subsystems introduced in Section 6.4 must be larger than the correlation length λ corr as discussed elsewhere [41] for the first time, and briefly revisited in Section 2 to ensure entropy additivity; see also Section 15. Therefore, it is usually sufficient to take the linear size of Σ to be a small multiple (for example, 10 to 20) of the correlation length to obtain a proper thermodynamics, which is extensive. This means that we will usually need a theoretically manageable but small number of internal variables n.

Microstate Probabilities for M ieq
As M ieq is unique in S Z , we need to identify the unique set {p k }. If we keep W fixed in M ieq as the parameter, then F wk are fluctuating microforces in S Z as we have seen in Section 5.2. In additions, we have microstate energies E k also fluctuating. We need to maximize the entropy S(Z) at fixed by varying p k without changing {m k } , i.e. E k and F wk . This variation has nothing to do with dp k in a physical process. Using the Lagrange multiplier technique, it is easy to show that the condition for this in terms of three Lagrange multipliers with obvious definitions is from which follows the statistical entropy S = −(λ 1 + λ 2 E + λ 3 · F w ); we have reverted back to the original symbol for the statistical entropy here. It is now easy to identify λ 2 = −β, λ 3 = −βW by comparing dS with dS in Equation (71a) by varying E and W so we finally have where λ 1 = β G with G(t) is a normalization constant and defines a NEQ partition function It is easy to verify that so that if we neglect the fluctuations E k − E and F wk − F w and replace E k by E and F wk by F w , then p k reduces to the flat distribution p k = 1/W(E, W) = exp[β( G − E − W · F w )] = exp(−S) in Remark 5, which can be identified as the microstate probability in the NEQ microcanonical ensemble. It should be stressed that this is consistent with the well-known fact that thermodynamics does not describe fluctuations; the latter require using statistical mechanics [14]. It should be remarked that the Lagrange multipliers in p k are determined by comparing the resulting entropy to match exactly the Gibbs fundamental relation, a thermodynamic relation. This then proves that S is the same as the thermodynamic entropy S up to a constant [52], which can be fixed by appeals to the third law, according to which S vanishes at absolute zero. We avoid considering here the issue of a residual entropy, which is discussed elsewhere [45,58]. The p k above clearly shows the effect of irreversibility and is very different from its equilibrium analog p see Equation (28), obtained by replacing W by w, F wk by f w0k , and β by β 0 . The fluctuating E k , f wk satisfy The observation time τ obs is determined by the way T and W are changed during a process. Thus, during each change, τ obs must be compared with the time needed for Σ to come to the next IEQ macrostate, and for the microstate probabilities to be given by Equation (101) with the new values of T and W.

M nieq in S Z
We now focus on a non-unique macrostate M nieq in S Z . This will be needed if τ obs is reduced to make the process faster so that instead of falling in the window (τ n , τ n+1 ), it now falls in a higher window such as (τ n+1 , τ n+2 ). As said above, M can now be treated as a unique macrostate in a larger state space S Z ⊃ S Z . Let ξ (t) denote the set of additional internal variables needed over S Z so that The entropy S(Z (t)) = S(Z(t), t) for M ieq (t) in S Z satisfies the Gibbs fundamental relation where W is the work variable in S Z . Expressing the last term as we obtain the following generalization of the Gibbs fundamental relation for M nieq (t) in S Z : where ∂S ∂t In S Z , we can identify the temperature T as the thermodynamic temperature in S Z by the standard definition. But, it is clear from the above discussion that ∂S(Z (t))/∂E in S Z has the same value as ∂S(Z(t), t)/∂E in S Z . Therefore, we are now set to identify T arb in Equation (62) as a thermodynamic temperature. (62) in S Z is identified by the same derivative in the Gibbs fundamental relation in S Z as follows

Remark 12. T arb in Equation
Definition 19. As the presence of ∂S/∂t above in S Z is due to "hidden" internal variables in ξ , we will call it the hidden entropy generation rate, and the hidden entropy generation. It results in a hidden irreversible macrowork in S Z due to the hidden internal variable with affinity A .

Remark 13.
A macrostate M nieq (t) with S(Z(t), t) can be converted to M ieq (t) with a state function S(Z (t)) in an appropriately chosen state space S Z ⊃ S Z by finding the appropriate window in which τ obs lies. The needed additional internal variable ξ determines the hidden entropy generation rate ∂S/∂t in Equation (103b) due to the non-IEQ nature of M nieq (t) in S Z , and ensures validity of the Gibbs relation in Equation (103a) for it, thereby providing not only a new interpretation of the temporal variation of the entropy due to hidden variables but also extends the MNEQT to M nieq (t) in S Z .
The above discussion strongly points towards the possible.
Proposition 2. The MNEQT provides a very general framework to study any M nieq (t) in S Z , since it can be converted into a M ieq (t) in an appropriately chosen state space S Z , with d i S hid (t) originating from hidden internal variable ξ .

Remark 14.
In a process P resulting in M nieq (t) in S Z , it is natural to assume that the terminal macrostates in P are M ieq so the affinity corresponding to ξ must vanish in them.

Remark 15.
By replacing Z by X, and Z by Z, we can also express the Gibbs fundamental relation for any NEQ macrostate in S X as by treating M as M ieq in S Z . In a NEQ process P between two EQ macrostates but resulting in M ieq (t) between them in S Z , the affinity corresponding to ξ must vanish in the terminal EQ macrostates of P.
Equation (106) proves extremely useful to describe M in S X as it may not be easy to identify ξ in all cases.

Remark 16.
The explicit time dependence in the entropy for M neq in S X or M nieq (t) in S Z is solely due to the internal variables, which do not affect dQ = dE s , Equation (5a) remains valid, with T defined as the inverse of ∂S/∂E at fixed w, t or W, t in the two state spaces, respectively; see Equation (72).

External and Internal Variations of dp k (t)
We focus on N k in Section 4.2, and partition its change dN k in accordance with the micropartition rule; see Definition 11. We take N fixed. Then, the macropartition results in the partition for dp k given in Equation (17a), where d e p k is the change due to exchanges with the medium and d i p k the change due to internal processes. It follows from the partition that where we have replaced d by d α in Equation (61). As d α Q(t) are thermodynamic quantities, they must not change their values if we change E k by adding a constant to H. This requires and put a limitation on the possible variations d α p k . We will assume this to be true. Using this fact, we similarly have The relation d e Q(t) = T 0 d e S(t) can be expressed in terms of d e p k (t) Similarly, the relation d i Q(t) = T(t)dS(t) − T 0 d e S(t) can be written as which acts as a constraint on possible variations d i p k , given that dp k can be directly obtained from Equation (101).

A Model Entropy Calculation
We consider a gas of non-interacting identical structureless particles with no spin, each of mass m, in a fixed region confined by impenetrable walls (infinite potential well). Initially, the gas is in a NEQ macrostate, and is isolated in that region. In time, the gas will equilibrate and the microstate probabilities change in a way that the entropy increases. We wish to understand how the increase happens.

1-Dimensional Ideal Gas
In order to be able to carry out an exact calculation, we consider the gas in a 1-dimensional box of initial size L in . As there are no interactions between the particles, the wavefunction Ψ for the gas is a product of individual particle wavefunctions ψ. Thus, we can focus on a single particle to study the nonequilibrium behavior of the gas [110][111][112]. The simple model of a particle in a box has been extensively studied in the literature but with a very different emphasis. Refs. [113][114][115][116][117] The particle only has non-degenerate eigenstates whose energies are determined by L, and a quantum number k. We use the energy scale ε 1 = π 2h2 /2mL 2 in to measure the eigenstate energies, and α = L/L in so that ε k (L) = k 2 /α 2 ; (110) the corresponding eigenfunctions are given by The pressure generated by the eigenstate on the walls is given by [118] P k (L) ≡ −∂ε k /∂L = 2ε k (L)/L. (112) In terms of the eigenstate probability p k (t), the average energy and pressure are given by The entropy follows from Equation (47) and is given for the single particle case by The time dependence in ε(t) or P(t) is due to the time dependence in p k and ε k (L). Even for an isolated system, for which ε remains constant, p k cannot remain constant as follows directly from the second law [53] and creates a conceptual problem because the eigenstates are mutually orthogonal and there can be no transitions among them to allow for a change in p k .
As the gas is isolated, its energy, volume and the number of particles remain constant. As it is originally not in equilibrium, it will eventually reach equilibrium in which its entropy must increase. This requires the introduction of some internal variables even in this system whose variation will give rise to entropy generation by causing internal variations d i p k (t) in p k (t). Here, we will assume a single internal variable ξ(t). What is relevant is that the variation in ξ(t) is accompanied by changes dp k (t) occurring within the isolated system. According to our identification of heat with changes in p k (t), these variations must be associated with heat, which in this case will be associated with irreversible heat d i Q(t).

Chemical Reaction Approach
A way to change p k in an isolated system is to require the presence of some stochastic interactions, whose presence allows for transitions among eigenstates [51]. As these transitions are happening within the system, we can treat them as "chemical reactions" between different eigenstates [1,3,16] by treating each eigenstate k as a chemical species.
During the transition, these species undergo chemical reactions to allow for the changes in their probabilities.
We follow this analogy further and extend the traditional approach [1,3,16] to the present case. For the sake of simplicity, our discussion will be limited to the ideal gas in a box; the extension to any general system is trivial. Therefore, we will use microstates {m k } instead of eigenstates in the following to keep the discussion general. Let there be N k (t) particles in m k at some instant t so that at all times, and p k (t) = N k (t)/N. We will consider the general case that also includes the case in which final microstates refer to a box size L different from its initial value L. Let us use A k to denote the reactants (initial microstates) and A k to denote the products (final microstates). For the sake of simplicity of argument, we will assume that transitions between microstates is described by a single chemical reaction, which is expressed in stoichiometry form as Let N k and N k denote the population of A k and A k , respectively, so that N = ∑ k N k = ∑ k N k . Accordingly, p k (t) = N k (t)/N for the reactant and p k (t + dt) = N k (t)/N for the product. The single reaction is described by a single extent of reaction ξ and we have It is easy to see that the coefficients satisfy an important relation which reflects the fact that the change |dN| in the reactant microstates is the same as in the product microstates. The affinity in terms of the chemical potentials µ is given by and will vanish only in "equilibrium," i.e. only when p k ' s attain their equilibrium values. Otherwise, A(t) will remain non-zero. It acts as the thermodynamic force in driving the chemical reaction [1,3,16]. But we must wait long enough for the reaction to come to completion, which happens when A(t) and dξ/dt both vanish. The extent of reaction ξ is an example of an internal variable. There may be other internal variables depending on the initial NEQ macrostate. This will be discussed in the following section.

Isothermal Expansion
Let us first consider an isothermal expansion of an ideal gas in which the temperature T of the gas remains constant and equal to that of the medium T 0 . During an irreversible isothermal expansion, energy is pumped into the gas isothermally from outside so E(t) remains constant. The pumping of energy will result in the change d e p k (t). This will determine d e S(t) = d e Q(t)/T 0 . In addition, the gas may undergo transitions among various energy levels, as discussed in Section 9.2, without any external energy input, which will determine the change d i p k (t). From Equation (76a), we determine d i Q(t) = T 0 d i S(t), and consequently d i W(t). Thus, Such a calculation will not be possible using the first law in Equation (23b) in theMNEQT.

Intrinsic Adiabatic Expansion
In a nonequilibrium intrinsic adiabatic process, we have d i W(t) = − d e Q(t) so the heat exchange |d e Q(t)| = T 0 |d e S(t)| is converted into the irreversible work. We can use this to determine the work d i W ξ (t) due to the single internal variable The identification d i W(t) = − d e Q(t) and the calculation of A(t)dξ(t) and of d i S(t) cannot be done in the traditional formulation of the first law in theMNEQT, in which d e Q(t) = 0 for the traditional adiabatic process so that dE = −d e W(t).

Composite Σ with Temperature Inhomogeneity
Here, we will show by examples that the thermodynamic temperature T of Σ allows us to treat it as a "black box" Σ B without knowing its detailed internal structure such as its composition in terms of two subsystems Σ 1 and Σ 2 . Alternatively, we can treat Σ as a combination Σ C of Σ 1 at T 1 and Σ 2 at at T 2 < T 1 , and obtain same thermodynamics. Thus, both approaches are equivalent, which justifies the usefulness and uniqueness (see Theorem 6) of T as a thermodynamically appropriate global temperature.
In the following, we will consider various cases that can be obtained as special cases of the following general situation (2): Σ 1 in thermal contact with the medium Σ h1 at temperature T 01 , and Σ 2 in thermal contact with the medium Σ h2 at temperature T 02 , with the two media having no mutual interaction.
We will consider the two realizations for Σ: Σ B and Σ C to compare their predictions. As discussed for the case (b) in Section 3, Σ 1 and Σ 2 are always taken to be in EQ, but Σ in IEquation The entropies in the two realizations are S B (t) = S(E(t), ξ(t)); S C = S 1 (E 1 (t)) + S 2 (E 2 (t)), (115) and have the same value; recall that E(t) = E 1 (t) + E 2 (t), and ξ(t) = E 1 (t) − E 2 (t) for Σ(t); see Equation (36). For clarity, we will often use the argument t to emphasize the variations in time t in this section. In general, the irreversible entropy generation is given by where dS should be replaced by dS B or dS C as the case may be: where we are using the inverse temperatures for various bodies. Let d e Q l (t), l = 1, 2 be the energy or macroheat transferred to Σ l (t) from Σ (l) h , and dE in (t) = d e Q in (t) the energy or macroheat transferred from Σ 1 (t) to Σ 2 (t). We have, using δ 1 = +1 and δ 2 = −1, We see that dE(t) is unaffected by the internal energy transfer dE in (t), while is affected by the macroheat exchange disparity d e Q 1 (t) − d e Q 2 (t) along with dE in (t).
We finally have d i S(t) = −∑ l β 0l d e Q l (t) + dS.
We now consider various cases to make our point.

Isolated Σ
We first consider the realization Σ B . Using dE(t) = dE 1 (t) + dE 2 (t), dξ(t) = dE 1 (t) − dE 2 (t), see Equations (36) and (117) for dS B (t) above, we obtain This identifies T(t) in terms of T 1 (t) and T 2 (t). As EQ is attained, T(t) → T 0 , the EQ temperature between Σ 1 and Σ 2 , and A(t) → A 0 = 0 as expected. In the following, we will use A (t) for β(t)A(t) for simplicity. In terms of β and A , we also have We now justify that in this simple example, A (t)dξ(t) determines d i S(t) due to irreversibilty in Σ(t); see Equation (80). Setting dE(t) = 0 in dS B (t), we have by direct evaluation, The last equation follows from the general result in Equation (81). It should be emphasized that the existence of d i S(t) ≥ 0 due to ξ in M ieq is consistent with M ieq as a NEQ macrostate, even though its entropy is a state function in the extended state space.
We now consider Σ C , which is also very instructive to understand the origin of d i S(t) in a different way. Considering internal energy or macroheat transfer dE in (t) = d e Q in (t) between Σ 1 (t) and Σ 2 (t) at some instant t, we have due to this transfer. This results in since dξ(t) = dE 1 (t) − dE 2 (t) = 2dE in (t). Thus, the physical origin of d i S(t) is the internal entropy change of the subsystems.

Σ Interacting with Σ h
To further appreciate the physical significance of the NEQ T(t) of the above composite system Σ(t), we allow it to interact with Σ h , a heat bath, at the EQ temperature T 0 . For this, we take Σ h1 and Σ h2 at the same common temperature T 0 = T 01 = T 02 so that we can treat them as a single medium Σ h with macroheat exchange d e Q(t). We thus obtain from Equation (119) d i S(t) = −β 0 d e Q(t) + dS.
We will consider two different kinds of interaction below: (i) We first consider Σ B (t) in M ieq at T(t) so we use dS B (t) above. We thus have (using the identity d e S(t) = β 0 d e Q(t)) which is consistent with the general identity given by the top equation in Equation (76a), a result which was derived for a single system at temperature T(t). This confirms that the composite Σ C here can be treated as a noncomposite Σ B at T(t). To be convinced that the above d i S(t) includes the internally generated irreversibility in Equation (121) due to macroheat transfer between Σ 1 (t) and Σ 2 (t), we only have to set d e S(t) = 0 to ensure the isolation of Σ. We reproduce Equation (121) as d i Q(t) = d i W(t). The remaining source of irreversibility T(t)d i S Q (t) given by the first term above is due to external macroheat exchange between Σ and Σ h as expected; see the first term on the right in Equation (85b).
(ii) We take treat Σ(t) as Σ C (t) in contact with Σ h . We deal directly with the two macroheat exchanges d e Q l (t), l = 1, 2 to Σ l (t) from Σ h , and the internal energy transfer dE in (t). Using dE l (t) from Equation (118a) in dS C given in Equation (119), we find that Using Equation (120b) to express β l , we can rewrite the above equation as where we have used the identity and have found dξ = d e Q 1 − d e Q 2 + 2dE in (126) using its general definition dξ(t) = dE 1 (t) − dE 2 (t). We thus see that d i S(t) obtained by both realizations are the same as they must. However, the realization Σ C (t) allows us to also identify dξ. Each exchange generates irreversible entropy following Equation (124). Using , we find the generalization of Equation (123): It is easy to see that the last term above gives nothing but the sum of the irreversible entropies due to external exchanges of macroheat by Σ 1 (t) and Σ 2 (t) with Σ h : where is the external entropy exchange of Σ l (t) with Σ h . Thus, whether we treat Σ as a system Σ B at temperature T(t) or a collection Σ C of Σ 1 (t) and Σ 2 (t) at temperatures T 1 (t) and T 2 (t), respectively, we obtain the same irreversibility. In other words, T(t) is a sensible thermodynamic temperature even in the presence of inhomogeneity.

Σ Interacting with Σ h1 and Σ h2
We now consider our composite Σ in thermal contact with two distinct and mutually noninteracting stochastic media Σ h1 and Σ h2 at temperatures T 01 and T 02 . We will again discuss the two different realizations as above.
(i) We first consider Σ B (t) at temperature T(t), which interacts with the two Σ h 's, and use the general result in Equation (119). A simple calculation using dS B generalizes Equation (123) and yields since this reduces to that result when we set β 01 = β 02 = β 0 . As above, d i Q(t) = d i W(t) = A(t)dξ(t); see Equation (121), which gives rise to the last term above. Thus, setting d e Q l (t) = 0, l = 1, 2 to make Σ isolated, we retrieve d i S(t) in Equation (121) as expected. The first sum above gives the external entropy exchanges with the two stochastic media as above.
(ii) We now consider Σ C , and allow Σ h1 to directly interact with Σ 1 (t) at temperature T 1 (t) and Σ h2 to directly interact with Σ 2 (t) at temperature T 2 (t). Using dS C generalizes Equation (123) and yields Again using Equation (120b) to express β l , we can rewrite the above d i S(t) as the d i S(t) in Equation (130a) for Σ B , and also find that dξ is given by Equation (126).
It should be emphasized that the determination of d i S(t) in Equations (130a) and (130b) is valid for all cases of Σ interacting with Σ h1 and Σ h2 as we have not imposed any conditions on T 1 (t) and T 2 (t) with respect to T 01 and T 02 , respectively. Thus it is very general. The derivation also applies to the NEQ stationary state, which happens when T 1 (t) → T 01 and T 2 (t) → T 02 . For the stationary case, using Equation (130b), we have where all quantities on the right have their steady values. Thus, d i S st is only determined by the stationary value of the internal energy exchange dE in . The reader can easily verify that d i S(t) in Equation (130a) also reduces to the above result in the stationary limit. From the above examples, we see that we can consider Σ in any of the two realization Σ B and Σ C as we obtain the same thermodynamics in that d i S(t) is identical. We emphasize this important observation by summarizing it in the following conclusion.

Conclusion 11.
If we consider Σ(t) as a single system Σ B with an uniform temperature T(t) and with an internal variable ξ(t), we do not need to consider the energy transfer dE in (t) explicitly to obtain d i S(t). If we consider Σ(t) as a composite system Σ C formed of Σ 1 (t) and Σ 2 (t) at their specific temperatures, then we specifically need to consider the energy transfer dE in (t) to obtain d i S(t) but no internal variable.
This conclusion emphasizes the most important fact of the MNEQT that the homogeneous thermodynamic temperature T(t) of Σ B can also describe an inhomogeneous system Σ C . This observation justifies using the thermodynamic temperature T(t) for treating Σ(t) as a single system Σ B , a black box, without any need to consider the internal energy transfers.
The above discussion can be easily extended to also include inhomogeneities such as two different work media Σ w and Σ (2) w corresponding to different pressures P 01 and P 02 . We will not do that here.

Σ Interacting with Σ w and Σ h
In this case, Σ is specified by two observables E and V so to describe any inhomogeneity will require considering at least two subsystems Σ 1 and Σ 2 specified by E 1 , V 1 and E 2, V 2 , respectively. From these four observables, we construct the following four combinations to express the entropy of the system Note that we have assumed that Σ 1 and Σ 2 are in EQ (no internal variables for them). We now follow the procedure carried out in Section 10.3 to identify thermodynamic temperature T, pressure P, and affinities: All these quantities are SI-quantities and have the same values regardless of whether Σ is isolated or interacting. A more complicated inhomogeneities will require more internal variables.

Remark 17.
We now make an important remark about Equation (85b) that contains only a single internal variable. From what is said above, it must include at least two internal variables if Σ contains inhomogeneity. in both E and V. If it contains inhomogeneity. in only one variable, then and only then we will have at least one internal variable. Thus, either we will ξ E or ξ V as the case may be.

Tool-Narayanaswamy Equation
We consider a simple NEQ laboratory problem to model the situation in a glass [55]. It is a system consisting of two "interpenetrating" parts at different temperatures T 1 and T 2 > T 1 , but insulated from each other so that they cannot come to equilibrium. The two parts are like slow and fast motions in a glass, and the insulation allows us to treat them as independent, having different temperatures. This is a very simple model for a glass. A more detailed discussion is given elsewhere [55], where each part was assumed to be in EQ macrostates. Here, we go beyond the earlier discussion, and assume that the two parts are in some IEQ macrostates M 1 and M 2 with temperatures T 1 and T 2 , respectively; we have suppressed "ieq" in the subscripts for simplicity. Thus, there are irreversible processes going on within each part so that there are nonzero irreversible macroheat d i Q 1 and d i Q 2 generated within each part. We wish to identify the temperature of the system that we treat as a black box Σ B . This will require introducing its global temperature T. However, we also need to relate it to T 1 and T 2 so that we need to treat Σ as Σ C . We now imagine that each part is added a certain infinitesimal amount of exchange macroheat from outside, which we denote by d e Q 1 and d e Q 2 so that dQ 1 = d e Q 1 + d i Q 1 and dQ 2 = d e Q 2 + d i Q 2 . This does not affect their temperatures. We assume the entropy changes to be dS 1 and dS 2 . Then, we have for the net macroheat and entropy change We introduce the temperature T by dQ = TdS. This makes it a thermodynamic temperature of the black box. Using dQ 1 = T 1 dS 1 , dQ 2 = T 2 dS 2 , we immediately find By introducing x = dQ 1 /dQ, which is determined by the setup, we find that T is given by 1 As x is between 0 and 1, it is clear that T lies between T 1 and T 2 depending on the value of x. For x = 1/2, this heuristic model calculation reduces to that in Equation (120a) as expected. The derivation also shows that the thermodynamic temperature T is not affected by having two nonoverlapping parts or overlapping parts. A similar relation also exists for the pressure P of a composite system; see Equation (156).
If the insulation between the parts is not perfect, there is going to be some energy transfer between the two parts, which would result in maximizing the entropy of the system. As a consequence, their temperatures will eventually become the same. During this period, T will also change until all the three temperatures become equal. This will require additional internal variable or variables as in Section 10.3.

Irreversible Carnot Cycle
Let us consider an "irreversible" Carnot engine running between two heat sources Σ h1 and Σ h2 as shown in Figure 5 that are always maintained at fixed temperatures T 01 and T 02 , respectively, during each cyclic process P cyc . As Σ needs to perform work, we also need to consider it to be in constant with a work source Σ w . We first observe the following features of a reversible Carnot cycle. The system, which we take to be formed by an ideal gas, starts in thermal contact with Σ h1 in A eq = M eq (T 01 , V 1 ) as it expands to V 2 > V 1 , and ends in M eq (T 01 , V 2 ) through an isothermal process P 1eq resulting in ∆ e Q 1eq = ∆ e W 1eq > 0. It is then detached from Σ h1 so no heat is exchanged (∆ e Q 2eq = 0) but exchanges work ∆ e W 2eq > 0 during the process P 2eq as it expands to V 3 and ends in M eq (T 02 , V 3 ) at temperature T 02 . The system is brought in thermal contact with Σ h2 now, and the volume is compressed to V 4 isothermally during the process P 3eq and ends in M eq (T 02 , V 4 ). During P 3eq , ∆ e Q 3eq = ∆ e W 3eq < 0. The choice of V 4 is chosen so that Σ comes back to A eq = M eq (T 01 , V 1 ) along a process P 4eq after detaching it from Σ h2 during which ∆ e Q 4eq = 0, but ∆ e W 4eq < 0. The four segments bring back Σ to its starting state A eq , and form a cycle P eq,cyc . It is well known that the EQ efficiency eq of the Carnot cycle is so that ∆ e W eq = eq ∆ e Q 1 , the equilibrium macrowork obtained from the cycle for a given ∆ e Q 1 .
We now consider an irreversible cyclic process P, which consists of the same four segments except that some or all may be irreversible. We have discussed such a process in Section 6.8. However, to have a cyclic process, the system must start and end in M eq (T 01 , V 1 ), which does not require any internal variable. Being an irreversible process, there is no guarantee that Σ would be in EQ macrostates at the end of P 1 , P 2 , and P 3 ; P 4 must bring Σ to the EQ initial macrostate M eq (T 01 , V 1 ). However, we will simplify the calculation here by assuming that the end states in P 1 , P 2 , and P 3 are M eq (T 01 , V 2 ), M eq (T 02 , V 3 ), and M eq (T 02 , V 4 ), respectively. However, relaxing this condition does not change the results below.
Being a cyclic process, we have over P. Thus, over P, In the MNEQT, we also have over P, Let ∆ e Q 1 = T 01 ∆ e S 1 and ∆ e Q 3 = T 02 ∆ e S 3 be the macroheat exchanges during P 1 and P 3 , and ∆ e Q = ∆ e Q 1 + ∆ e Q 3 . Similarly, let ∆ e W l be the macrowork exchanges during P l , l = 1, 2, 3, 4, and ∆ e W = ∑ l ∆ e W l , the net exchange macrowork. From ∆ c S = 0 follows ∆ e Q 1 /T 01 + ∆ e Q 3 /T 02 + ∆ i S = 0, which can be rewritten by simple manipulation as where we have used the identity in Equation (135b). We can also express it as The efficiency of the irreversible Carnot cycle is given by We remark that irr above is similar to the result obtained by Eu ([109] (see Equation (7.139))) in which the numerator of the last term is identified as "the total dissipation" by Eu; however, the analysis is tedious compared to the one given here.
The determination of ∆ i S requires the extended state space S Z needed for the four process segments. We will focus on Equation (85b). Let T l (t) and P l (t) be the temperature and pressure of Σ along P l , respectively, with l = 1, · · · , 4 for P l . As seen from Equation (132), we need at least two internal variables ξ El and ξ Vl along P l that are usually different along the four segments. The corresponding affinities must vanish at the end points of each segment because they are EQ macrostates. We will assume this to be the case, and introduce for each segment. Then, where d e Q l (t) = 0 for l = 2, 4, and where P 0l is the external pressures of Σ w along P l and must be the same as for the reversible Carnot engine. This then determines ∆ i S so that irr is determined.
Recognizing that d e S l (t) is nonzero only for l = 1, 3, we can also rewritten ∆ i W as It should be noted that nowhere did we use the vanishing of the affinities in the EQ states at the end of P 1 , P 2 , and P 3 so the calculation above is not limited by this requirement. Thus, the results in this section are general.

Origin of Friction and Brownian Motion
It is well known, see for example Kestin ([12] Sections 4.7 and 5.12), that there are several ways to incorporate friction in a system in thermodynamics. This has to do with the difficulties in making an unambiguous distinction between various possibilities of exchange macroheat in a process P. We overcome this problem by using the MNEQT in which this is not an issue as both dQ and d e Q are uniquely defined. We identify the origin of friction in our approach [41,51,52,91,92] by considering relative motion between parts of a system or between the system and the medium; see also [14,32]. Such a situation arises during sudden mixing of fluids or in a Couette flow or when friction is involved between two bodies. The origin of friction is also applicable to NEQ terminal states of the process in the MNEQT.

Piston-Gas System
We consider the piston gas system in Figure 4a. As discussed in Section 3.5, the system entropy in M ieq is S(E, V, P gc , P p ). Hence, the corresponding Gibbs fundamental relation becomes where we have used the conventional conjugate fields as shown by Landau and Lifshitz [119] and by us elsewhere ( [41] and references theirin). Using Equation (40), we can rewrite this equation as in terms of the relative velocity, also known as the drift velocity V . = V p − V gc of the piston with respect to Σ gc . We can cast the drift velocity term as V·dP p ≡ F p ·dR, where F p . = dP p /dt is the force (a macroforce in nature) and dR = Vdt is the relative displacement of the piston.
The internal motions of Σ gc and Σ p is not controlled by any external agent so the relative motion described by the relative displacement R represents an internal variable [12] so that the corresponding affinity F p0 = 0 for Σ. Because of this, the first law dE = T 0 d e S − P 0 dV as given in Equation (23b) does not involve the relative displacement R. We now support this claim using our approach in the following. This also shows how H( x|V, P gc , P p ) develops a dependence on the internal variable R. We manipulate dS in Equation (142) by using the above first law for dE so that This equation expresses the irreversible entropy generation as sum of three distinct and independent irreversible entropy generations. To comply with the second law, we conclude that for T 0 > 0, which shows that each of the components of d i S is nonnegative. In equilibrium, each irreversible component vanishes, which happens when T → T 0 , P → P 0 , and V → 0 or F p → 0.
The inequality F p ·dR ≤0 shows that F p and dR are antiparallel, which is what is expected of a frictional force F fr . Thus, we can identify F p with F fr , and the irreversible frictional macrowork d i W fr done during this motion by This macrowork, which appears as part of d i W in our approach, vanishes as the motion ceases so that the equilibrium value V 0 of V(t) is V 0 = 0 just as the equilibrium affinity A 0 = 0 for¸. This causes the piston to finally come to rest. As F fr and V vanish together, we can express this force as where µ > 0 and f is an even function of V. The medium Σ is specified by T = T 0 , P = P 0 and V 0 = 0 or F p = 0. We will take F fr and dR to be colinear and replace F fr ·dR by −F fr dx (F fr dx ≥ 0), where dx is the magnitude of the relative displacement dR. The sign convention is that F fr and increasing x point in the same direction. We can invert Equation (142) to obtain in which dQ = TdS from our general result in Equation (5a). Comparing the above equation with the first law in Equation (23a), we conclude that The important point to note is that the friction term F fr dx properly belongs to dW. As d e W = P 0 dV, we have Both contributions in d i W are separately nonnegative. We can determine the exchange macroheat It should be emphasized that in the above discussion, we have not considered any other internal motion such as between different parts of the gas besides the relative motion between Σ gc and Σ p . These internal motions within Σ g can be considered by following the approach outlined elsewhere [41]. We will not consider such a complication here.

Particle-Spring-Fluid System
It should be evident that by treating the piston as a mesoscopic particle such as a pollen or a colloid, we can treat its thermodynamics using the above procedure. This allows us to finally make a connection with the system depicted in Figure 4b in which the particle (a pollen or a colloid) is manipulated by an external force F 0 . We need to also consider two additional forces F s and F fr , both pointing in the same direction as increasing x; the latter is the frictional force induced by the presence of the fluid in which the particle is moving around. The analog of Equation (149) for this case becomes where F t = F s + F 0 + F fr is the net force. The other two macroworks are dW = (F s + F fr )dx and d W = F 0 dx = −d e W. In EQ, F fr = 0 and F s + F 0 = 0 (F 0 = 0) to ensure d i W = 0.

Particle-Fluid System
In the absence of a spring in the previous subsection, we must set F s = 0 so In EQ, F 0 + F fr = 0 so that F fr = −F 0 . This means that in EQ, the particle's nonzero terminal velocity is determined by F 0 as expected.

Free Expansion
What makes NEQ thermodynamics complicated than EQ thermodynamics is the evaluation of nonzero irreversible entropy generation d i S(t) ≥ 0. As d i S Q (t) and d i S W (t) are independent contributions, it is simpler to consider an isolated system for which d i S Q (t) ≡ 0 so that we only deal with d i S W (t) in Equation (87). Then the use of Equation (81) allows us to determine the temperature of the system in any arbitrary macrostate. In free expansion, there is no exchange of any kind so d = d i . This simplifies our notation as we do not need to use d i when referring to Σ, which we will do in this section.

Classical Free Expansion in S Z
The gas, which forms Σ, expands freely in a vacuum ( Σ) from V in , the volume of the left chamber, to V fin = 2V in , the volume of Σ 0 ; the volume of the right chamber is V fin − V in = V in . The initial and final macrostate are denoted by A eq and B eq . The vacuum exerts no pressure ( P = P vacuum = 0). The left (L) and right (R) chambers are initially separated by an impenetrable partition, shown by the solid partition in Figure 6a, to ensure that they are thermodynamically independent regions, with all the N particles of Σ in the left chamber, which are initially in an EQ macrostate A eq with entropy S in . For ideal gas, we have [14] S(E, V) = N ln(eV/N) where N is kept as a suffix for a reason that will become evident below. The initial pressure and temperature of the gas prior to expansion in A eq at time t = 0 are P in and T in = T 0 , respectively, that are related to E 0 = E in and V in by its EQ equation of state. A similar set of quantities also pertain to B eq . As Σ 0 is isolated, the expansion occurs at constant energy E 0 , which is also the energy of Σ.  Figure 6. Free expansion of a gas. The gas is confined to the left chamber, which is separated by a hard partition (shown by a solid black vertical line) from the vacuum in the right chamber as shown in (a). At time t = 0, the partition is removed abruptly as shown by the broken line in its original place in (b). The gas expands in the empty space, devoid of matter and radiation, on the right but the expansion is gradual as shown by the solid front, which separates it from the vacuum on its right. We can also think of the hard partition in (a) as a piston, which maintains the volume of the gas on its left. The piston can be moved slowly or rapidly to the right within the right chamber with a pressure P 0 < P to change this volume. The free expansion occurs when the piston moves extremely (infinitely) fast by letting P 0 → 0.
It should be stated, which is also evident from Figure 6b, that while the removal of the partition is instantaneous, the actual process of gas expanding in the right chamber is continuous and gradually fills it. This is obviously a very complex internal process in a highly inhomogeneous macrostate. As thus, it will require many internal variables to describe different number of particles, different energies, different pressures, different flow pattern which may be even chaotic, etc. in each of the chambers. For example, we can divide the volume V fin into many layers of volume parallel to the partition, each layer in equilibrium with itself but need not be with others; see the example in Section 3. As our aim is to show the feasibility of the MNEQT in this investigation, we will simplify the situation by limiting to two internal variables. The first internal variable ξ N ξ N .
is obtained by considering only two layers to describe different numbers N L = (1 − ξ N )N particles to left and N R = Nξ N particles to the right of the chamber partition in Figure 6a as a function of time. Initially, ξ N = 0 and finally at EQ, ξ N = 1/2. At each instant, we imagine a front of the expanding gas shown by the solid vertical line in Figure 6b containing all the particles to its left. We denote this volume by a time-dependent V = V(t) to the right of which exists a vacuum. This means that at each instant when there is a vacuum to the right of this front, the gas is expanding against zero pressure so that d e W = 0. Since we have a NEQ expansion, dW > 0. As V(t) cannot be controlled externally, it can be used to determine another internal variable by using V = V − V in : Initially, ξ V = 0 and finally at EQ, ξ V = 1/2. The choice of the two internal variables ξ N (t) and ξ V (t) follows the procedure in Section 11 for two subsystems of different sizes, and allow us to distinguish between P and P as we will see below. We assume that the expansion is isothermal (which it need not be) so there is no additional internal variable associated with temperature variation. As dQ = dW > 0, the expansion is irreversible so the entropy continues to increase. At t = 0, the partition is suddenly removed, shown by the broken partition in Figure 6b and the gas expands freely to the final volume V(t ) = V fin at time t < τ eq during P . At t , the free expansion stops but there is no reason a priori for ξ N = 0 so the gas is still inhomogeneous (ξ N = 0). This is in a NEQ macrostate until ξ N achieves its EQ value ξ N = 0 during P , at the end of which at t = τ eq the gas eventually comes into B eq isoenergetically. The complete process is P = P ∪ P between A eq and B eq . We briefly review this expansion in the MNEQT [92].
We work in the extended state space with the two internal variables, which we denote simply by S here. Using Equation (23a), we have Setting P 0 = 0 in Equation (32b), we have here, we have used the fact that V(t) does not change for τ < t ≤ τ eq . Thus, the last equation is the fundamental identity in Equation (22). The irreversible entropy change ∆S from EQ macrostate from A eq to B eq is the EQ entropy change ∆ i S is and can be directly obtained since the EQ entropy S(E, V) is known. The above analysis is also valid for any arbitrary free expansion process P and not just P as we have not used any information yet about A eq to B eq . For V fin = 2V in , ∆ i S = N ln 2, a well-known result [16]. Here, we provide a more general result for the entropy for t ≤ t , which can be trivially determined: Thus, for arbitrary ξ V and ξ N , we have ∆ i S(ξ V , ξ N ) = S(ξ V , ξ N ) − S in . We can determine the two affinities. A simple calculation gives We see that A V does not vanish when V = V fin as discussed above. It is easy to verify that A vanish in B eq . The pressure of the expanding gas is obtained by using the derivative ∂S/∂V as usual. A simple calculation yields The last expression for pressure has a close similarity with the Toll-Narayanaswamy Equation (133), which should not be surprising. Before expansion, we have βP in = N/V in in A eq and βP fin = N/V fin in B eq as expected. At EQ in B eq , the entropy is given by S fin = N ln(2eV in /N), which gives ∆ i S = N ln 2, as expected. We can also take the initial macrostate to be not an EQ one in P by using one or more additional internal variables. Thus, the approach is very general.

Quantum Free Expansion
The sudden expansion has been studied [110,111,113] quantum mechanically (without any ξ N ) as a particle in an isolated box Σ 0 of length L fin , which we restrict to 2L in here, with rigid, insulating walls. We briefly revisit this study and expand on it by introducing a ξ N to parallel the study of the classical expansion above but using the µNEQT. Thus, we will closely follow the microstates and follow Ref. [111] closely.
We make the very simplifying assumptions in the previous section to introduce ξ N . At time t = 0, all the N particles (or their wavefunctions) are confined in EQ in the left chamber of length L in so that N L = N initially. We can think of an intermediate length L fin ≥ L(t) > L in , in analogy with V(t) in the previous section, so that N R = N − N L particles are simultaneously confined in the intermediate chamber of size L(t), while N L particles are still confined in the left chamber for all t > 0. This is slightly different from what we did in the previous section. Eventually, at t = τ eq , all the N R = N particles are confined in the larger chamber of size L fin so that there are no particles are confined in the initial chamber. We let ξ N = N R /N, which gradually increases from ξ N = 0 to ξ N = 1. Note that this definition is different from the previous section but we make this choice for the sake of simplicity. At some intermediate time τ < τ eq that identifies P , L(t) = L fin , but N R is still not equal to N (ξ N = 0). We then follow its equilibration during P as the gas come to EQ in the larger chamber at the end of P when ξ N = 1. Again, there are two internal variables L and ξ N . The expansion is isoenergetic at each instant. As we will see below, this means that it is also isothermal. However, dQ = dW = 0 ensuring a irreversible process so the microstate probabilities continue to change.
Since we are dealing with an ideal gas, we can focus on a single particle whose energy levels are in appropriate units E k = k 2 /l 2 , where l is the length of the chamber confining it. The single-particle partition function for arbitrary l and inverse temperature β = 1/T is given by Z(β, l) = ∑ k e −βE k (l) , from which we find that the single particle free energy is F = −(T/2) ln(πTl 2 /4) and the average single particle energy is E = 1/2β, which depends only on β but not on l.
Assuming that the gas is in IEQ so that the particles in each of the two chambers are in EQ (see the second example in Section 3) at inverse temperatures β L and β, we find that the N-particle partition function is given by . As this must equal N/2β 0 for all values of L and ξ N , it is clear that β L = β = β 0 , which proves the above assertion of an isothermal free expansion at T 0 .
To determine ∆W k , we merely have to determine the microenergy change ∆E k = E k,fin − E k,in [54,111].
Below we will show that the quantum calculation here deals with an irreversible P. The single-particle energy change ∆E k is The micropressure P k = −∂E k /∂L = 2E k /L = 0 (157) determines the microwork It is easy to see that this microwork is precisely equal to (−∆E k ) as expected. It is also evident from Equation (157) that for each L between L in and L fin , We can use this average pressure to calculate the thermodynamic macrowork as expected. As ∆E = 0, this means that the irreversible macroheat and macrowork are nonnegative and equal: ∆Q = ∆W > 0. This establishes that the expansion we are studying is irreversible.
We now turn to the entire system in which the work is done by N R particles occupying the larger box. We need to think of the microstate index k as an N-component vector k = {k i } denoting the indices for the single-particle microstates. For a given ξ N , we have ∆W k (L, ξ N ) = −∑ i ∆E k i , where i runs over the N R particles. We can compute the macrowork, which turns out to be ∆W N (ξ N ) = Nξ N ∆W > 0. The corresponding change in the free energy is which is consistent with Equation (84a) for an isolated system for any ξ N .
At the end of P 0 , ∆W N (0) = N∆W > 0, and ∆F N (0) = N[F(β 0 , L fin ) − F(β 0 , L in )]. We find that for the isothermal expansion after using Equation (81). The same result is also obtained from the classical isothermal expansion; see Equation (84b). All this is in accordance with Theorem 7 in the MNEQT, as expected.

Discussion and Conclusions
As we noted in Section 1, thermodynamics is a science of entropy and temperature. As these macroquantities should uniquely describe the system, we have required them to SI-quantities in developing the new NEQT, called the MNEQT, to go beyond the EQ thermodynamics. We will now briefly summarize and discuss our conclusions form this thermodynamics. We will consider them separately.

Unique NEQ S in S Z
We first point out the important consequence of the restriction imposed by quasiindependence discussed in Sections 2 and 6.4. By always dealing with the SI-entropy S, which we have shown to be identical to the statistical quantity S in all cases, we can appreciate the concept of quasi-independence by considering p k that appears in Equation (47). Considering Σ to consist of two subsystems Σ 1 and Σ 2 , which are in macrostates M 1 . = m k 1 , p k 1 and M 2 . = m k 2 , p k 2 . If M 1 and M 2 are quasi-independent and form M for Σ, then p k p k 1 p k 2 .
As a consequence, the entropy additivity S(X(t),t) S 1 (X 1 (t),t) + S 2 (X 2 (t),t) is approximately satisfied. This has a generalization to many subsystems {Σ i } given in Equations (74a)-(74c) so that they are all quasi-independent. In terms of the volume ∆V i of Σ i so that V = ∑ i ∆V i , the generalization can be simply written in the form of the entropy additivity requirement over ∆V i in accordance with quasi-independence. The requirement of quasi-independence forces the linear size ∆l i of Σ i to be not less than the correlation length λ corr as discussed in Sections 2 and 6.4; see also [41]. Thus, there will be no nonlocal effects ( [120,121] (for example)) to consider in the MNEQT as they are subsumed within each subsystem. Each subsystem has its own Hamiltonian H containing all the information regarding interactions between its constituent particles and internal variables (see how H in Section ) so its microstates will contain the effects of all the interactions in {E k }. By a proper choice of S Z , S(X(t),t) can be replaced by a unique state function S(Z(t)). Similarly, by a proper choice of S Z i , a subspace of S Z , S i (X i (t),t) can be replaced by a state function S i (Z i (t)) in S Z i . By matching the number of independent variables n * on both sides in Equation (160a) as discussed in Section 6.4, we ensures that S(Z(t)) is uniquely determined as a sum of S i (Z i (t)) in accordance with Equation (74c). By replacing S Z i by S X , ∀i, and using Theorem 6 and Corollary 1, we know that S(Z(t)) uniquely exists in the MNEQT so there is no freedom to choose any other variables on which S(Z(t)) can depend on. But the actual choice of n << n * for a given M ieq is determined by the experimental setup. It is this n > n obs that is physically relevant for M ieq unless we are dealing with a M eq , where n obs is the number of independent variables in X. The remaining n * − n internal variables have equilibrated so their affinities vanish.
We turn back to S(X(t),t) and S i (X i (t),t). If ∆l i is less than the correlation length, then Equation (160a) must be replaced by due to the correlations present among various Σ i 's; cf. Equation (2). In a continuum NEQT introduced as CNEQT in Section 6.3, we are in the limit of "infinitesimal volume element" over which S i (X i (t),t) can be expressed as s(r | x(r,t),t)dr; here, x(r,t) is the local analog of X i (t) over this volume element. In this limit, Equation (160b) reduces to S(X(t),t) = s(r | x(r,t),t)dr + S corr (X(t),t), where S corr cannot be converted to a volume integral as it is a nonlocal quantity over at least the correlation length. Unfortunately, S corr is almost invariably overlooked in the CNEQT [20,40], which allows the function s(r | x(r,t),t) to be commonly identified as the entropy density. This is most probably a misleading nomenclature as S corr (X(t),t) has been neglected. Even in EQ, the correct entropy density should be precisely S(X(t),t)/V(t), which is not s(r | x(r,t),t). With this approximation, the SI-entropy is replaced by S CT (X(t),t) given by the integral on the right side (CT for the CNEQT), the questionmark is because it is hard to estimate the error due to the neglect of S corr . Thus, the additivity of s in the integral is not the postulated additivity of S even in EQ thermodynamics. To ensure that s satisfies the second law, it is postulated that s shares this property [20]. Because of these issues, we do not focus on s in this review as the volume elements are not usually quasi-independent unless we are at high enough temperatures so that the correlation lengths become small enough to make them quasi-independent. The above limitations also distinguish the MNEQT with all CNEQT theories, which fall under the category of theMNEQT. Here, we will briefly comment on two successful theories.
The first one is the extended irreversible thermodynamics (ENEQT) [20], a well-known CNEQT, which also neglects S corr but treats the corresponding entropy density s ET (ET for the ENEQT) as a state function involving various dissipative fluxes such as the heat flux. As said above, one needs to be careful to incorporate nonlocal effects ( [120,121], (for example.)) in the CNEQT. In addition, the total entropy S ET ( [20] (see Equation (5.66) and the discussion thereafter)) is also a state function involving the same fluxes for Σ, which violates Corollary 1 about requiring a larger state space relative to s ET : Both S ET and s ET cannot have the same state space for the additivity of entropy to be an identity; see also Remark 11. As the fluxes determine MI-macroquantities d e Q and d e W, S ET is not a SI-entropy as S is in the MNEQT.
The second one is the MNET [122] that is based on the idea of internal dof (dof in ) proposed by Prigogine and Mazur [123] for a Σ in contact with a Σ. The authors provide a very good comparison of the MNET with other important theories to which we direct the reader. Here, we only compare it with the MNEQT. The emphasis in the MNET is to study slow relaxation in Σ (cf. Section 11) caused by the dof, that we denote here by dof slow or by observables X slow , and the corresponding part of Σ by Σ slow ; the remainder of the system is denoted by Σ fast with observables X fast . In addition to Σ, Σ slow is also allowed to interact with another work medium, which we denote by Σ (w) with an extra prime, with which it exchanges macrowork only; see ( [14] (Section 20)). This makes As is well-known from the Tool-Narayanaswamy equation, see Equation (133), and other works [41][42][43]124,125], Σ slow and Σ fast usually have different temperatures, see Equation (133), pressures, see for example Equation (132), etc. and they need not be equal to those of Σ. This is not considered in the MNET, where it is assumed that T = T 0 , P = P 0 , etc. so Σ is assumed to be in EQ with Σ, so there cannot be any internal exchanges between Σ slow and Σ fast . The main focus in the MNET is only on Σ slow and not the entire Σ. This makes Σ as the realization Σ C ; see Section 10. The entropy in the MNET in our discrete notation is given by where H(X slow , t) is the net contribution from X slow ( [122] (Equation (7))); here, P k (t) is the probability of m c k , the microstate in the internal configurational space (c) formed by dof slow [123], with X slowk denoting its configuration. As Σ slow equilibrates with Σ , P k (t) → P eq k so that H(t) → 0. Consequently, S MNET (X, t) → S eq (X) so that S MNET (X, t) − S eq (X) = −H(X slow , t) is the contribution from the NEQ dof slow [126]. The presence of P eq k , which surely depends on the conjugate fields of the medium Σ slow controlling X slow , makes S MNET (X, t) an MI-quantity. Thus, it is different from our SI-entropy S(X, t). Moreover, as Σ slow interacts with Σ (w) , there is an exchange work ∆ W = −∆ e W slow done by Σ (w) [14]. As X slow in the MNET is controlled externally, it does not represent an internal variable in the sense used in the MNEQT, which explains the use of X slow and not ξ to represent dof slow . This is also consistent with Conclusion 11 since there is no need to consider any internal variable for the realization Σ C . This is further clarified in the next paragraph. It is easy to see that ∆ e W slow satisfies Equation (23b): see ( [14] (see the derivation leading to Equation (20.1))). Thus, MNET belongs to the MNEQT as pointed out above. A configuration temperature for m c k is also introduced in the MNET by using s ck = − ln P k (t), which is not considered in the MNEQT, where only a global thermodynamic temperature is defined.
As the examples in Section 10.3 have revealed, we can treat Σ either as Σ B or Σ C . We need internal variables to specify Σ B that help to describe whatever is going on within Σ without knowing these processes. While we do not need internal variables to specify Σ C , we need to know internal processes such as the internal transfer dE in (t) = d e Q in (t). Both realizations are equivalent in the MNEQT. As the entropy is a unique function in S Z , there is no room for any extra dependence such as external fluxes in either realization; see Theorem 6. The internal fluxes such as dE in (t) are needed for Σ C , but they are not controlled by the medium (they are present even if Σ is isolated). Thus, the MNEQT always deals with a SI-entropy.
Thus, the two entropies, S ET and S, are very distinct in many ways, and cannot be compared as their predictions will be very different.
We now turn to the significance of the new NEQT (MNEQT) in the enlarged state space, which is a SI-thermodynamics. As macroheat and macrowork are two independent quantities in the MNEQT, it is clear that the notion of temperature can be understood by merely focusing of the relationship between dQ and dS for any arbitrary process; dW plays no role in it. This is what makes the MNEQT a very useful thermodynamic approach. It should be stressed that the generalized macrowork dW (the generalized macroheat dQ) is not the same as the exchanged macrowork d e W (exchanged macroheat d e Q) with the medium unless d i W = 0 (d i Q = 0), i.e., unless there is no internal irreversibility caused by internal processes.
Thus, any deviation of dW from d e W or dQ from d e Q in a process is the result of irreversibility due to internal processes alone. Indeed, d i W is the macrowork done internally by the system against all dissipative forces within the system, see Equation (82), which explains why d i W is a measure of dissipative irreversibility (Definition 17) within the system. In a similar manner, d i Q is the macroheat generated internally by the system, which from d i Q = d i W is also due to all dissipative forces within the system. It must be emphasized that irreversible macroheat transfer due to temperature difference between a system and a medium does not affect d i W = d i Q; see Equation (86). On the other hand, irreversible macroheat transfer between different internal parts of Σ will be part of d i W = d i Q as seen from the discussion of Σ C in Section 10.
The use of SI-quantities to specify a macrostate and microstates of a system allows us to determine a statistical definition of the entropy of any M arb in Section 4, which is based on the ideas of Boltzmann. Using the flatness hypothesis, see Remark 5, known to be valid for macroscopic systems, we provide a simple proof of the second law in Section 4.3; see also [53] (Theorem 4).

Unique NEQ T in S Z
As dQ and dS are SI-macroquantities, their extensivity requires a linear relation between them for any M arb as discussed in Section 5.2; see Equation (62). The proportionality parameter is identified as the temperature T in Equation (104). With this extension to deal with M nieq in S Z ⊃ S Z , the definition is applicable to any M arb . Thus, there is no need to differentiate between T arb and T in the MNEQT as said earlier. The same definition also applies to an isolated system in an arbitrary macrostate. Determining other fields related to dW such as the pressure do not pose any new complications in the new approach as they are mechanical in nature as discussed in Section 6.2. We have thus proposed a novel approach to define the unique temperature (see Theorem 6) that is applicable to any M arb by selecting the particular S Z where M nieq is convert to M ieq . Then the changes in {dp k } and {E k } identify dS, dQ and dW for given T and W in S Z . All these SI-macroquantities have the same values also in S Z for M nieq . All of this strongly supports Proposition 2 as the fundamental axiom of the MNEQT that can explain the behavior of any M arb .
It should be pointed out that the statistical definition of temperature in Equations (5a) or (81) is not limited to extensive systems only. The discussion and the conclusions are also valid for systems for which dQ and dS scale the same way with N. We have only considered a linear scaling between the two SI-macroquantities in this work. It should be pointed out that our concept of temperature has some similarity with the idea of a contact temperature for a system in thermal contact with a medium. The latter is introduced [23,100,127] by the inequality in Equation (88) for a system in thermal contact with a medium (but not when the system is isolated). We, instead, define the temperature as an equality in Equation (5a) for any arbitrary macrostate, which works even for an isolated system. Equation (88) is a consequence of our definition.
We have seen that this definition of T satisfies the four requirements, see Criterion 5, listed in Section 6. This thus solves the dreams of Planck and Landau [97,98]. For example, we need to ensure that macroheat d e Q, if it is transferred at different temperatures, always flows from hot to cold. Indeed, this is a fundamental requirement for a consistent notion of temperature due to the second law; see Criterion C3. To the best of our knowledge, this question has not been answered satisfactorily [93,99,100,[103][104][105] for an arbitrary nonequilibrium macrostate. The question is not purely academic as it arises in various contexts of current interest in applying nonequilibrium thermodynamics to various fields such as the Szilard engine [128][129][130][131], Jarzynski process [34], stochastic thermodynamics [36], Maxwell's demon [132,133], thermogalvanic cells, corrosion, chemical reactions, biological systems [134][135][136], etc. to name a few. Our approach thus finally solves the long-standing unsolved problem of defining the temperature for an arbitrary macrostate in a consistent way that satisfy the stringent criteria C1-C4 as proven in Theorem 9. Thus, T must be treated as a genuine unique temperature of the system in any macrostate M.
Our definition of the temperature in Equations (5a) and (81) introduces T(t) as a global quantity, see C4 in Criterion 5, for the entire system and should not be confused as a local quantity, which varies from region to region within the system. This is true even if the system is inhomogeneous. Recall that we have not imposed any requirement for the system to be homogeneous in our discussion in Section 6. One may wonder if it makes any sense to call T(t) the temperature of the system even if it is inhomogeneous. It is possible to think of an inhomogeneous system to be composed of a number of homogeneous subsystems Σ 1 , Σ 2 , · · · , each macroscopic in its own right. In that case, we can assign a temperature T 1 (t), T 2 (t), · · · to Σ 1 , Σ 2 , · · · , respectively. It is then possible to relate T(t) to T 1 (t), T 2 (t), · · · . We have explicitly shown this here by considering only two subsystems in Section 10 when they are of identical sizes, and Section 11 when they are of different sizes, and treating the system as Σ B ; see Equations (120a) and (133), respectively. For example, we can divide Σ into four subsystems Σ 1 , Σ 2 , Σ 3 , and Σ 4 of equal volumes and numbers of particles, but of different energies. We can assume them in their own EQ macrostate M i (E i , V/4, N/4) at temperature T i . Then, we will obtain for Σ = Σ B β(t) = [β 1 (t) + β 2 (t) + β 3 (t) + β 4 (t)]/4, which will require three internal variables as shown in Equation (37). It is easy to generalize the above relation to many subsystems and allowing the possibility of different sizes. We can also allow for volumes to be different for different subsystems as was done in deriving Equation (132).
The possibility to study the formation of internal structures in Σ i in a NEQ Σ should prove very useful to understand what drives their formation. A very simple example of this is the pattern formation of Rayleigh-Bérnard cells and their competition [137] in a fluid system. This pattern formation has received a lot of attention recently ( [138,139] (for example)), where stable cells are studied in nonturbulent convection in steady state. It is found that each cell can be described in one of its EQ macrostate to a very good approximation with its own temperature T i . What our approach shows is that the stable convection here can also be described by a thermodynamic constant (steady) temperature T associated with the steady macrostate of the entire fluid.
Having a global temperature for an inhomogeneous system does not mean that if we insert a thermometer in it anywhere, we will measure T. This is because the act of "inserting" a thermometer amounts to looking at the "internal" structure of the system, so we will be probing it as Σ C . Thus, if we insert it in Σ 1 , we will record T 1 ; and if we insert it in Σ 2 , we will record T 2 , and so on. This should not be a surprise. We refer the reader to an interesting discussion of this issue in [127].
As far as fields such as the pressure that are associated with dW are concerned, they do not pose the same kind of problem as they are purely mechanical. All one needs to do is to take their instantaneous averages over microstate probabilities for any arbitrary macrostate; see, for example, Equation (64a) involving such an average. This is possible because W is a parameter, which makes F wk fluctuating quantities over m k . This cannot be done for the temperature as E is not a parameter in the Hamiltonian. In this sense, we are considering a NEQ version of the canonical ensemble in the MNEQT, which makes E k fluctuating over m k . Thus, T plays the role of a "parameter." For this reason, there is no way to define a temperature T k for m k and then take its average. What we can do in the MNEQT is to use the temperature of various subsystems to obtain T as is done in Equations (120a) or (133).
We have shown that the definition of the irreversible macrowork d i W is always nonnegative as required by the second law; see Equation (77c). Various consequences of the second law are discussed in Section 6.5. We have shown that, once a model for a system is given, we can identify the required number and nature of internal variables as a computational scheme in Sections 3 and 10, and later sections in the second half of the review. These applications provide a clear strategy, once a model has been created, for computation for an arbitrary thermodynamic process and should prove useful in the field.
We have mostly alluded to M ieq 's above to highlight the importance of internal variables in S Z , and to M nieq 's for memory-effects with respect to M ieq 's in S Z . In the absence of a reliable model, finding S Z in many cases may not be easy to do. Compared to this, the identification of the state space S X is almost trivial based on the experimental setup. Therefore, it is much more convenient to work with S X , with respect to which all NEQ states possess memory. Thus, the novel approach we develop here is extremely useful as it does not require knowing the internal variables as discussed in Section 8.3. However, for completeness, we have developed the MNEQT in S Z , which can be easily adapted to S X by the procedure outlined in Remark 13.
It should be stressed, as noted in Remarks 6 and 16 that both dQ and dS exist, and so does their relation in Equation (5a), regardless of the speed of the arbitrary process P arb . This makes the Clausius equality extremely important and useful as there is no restriction on its validity. It is a genuine equality even in the presence of irreversibility without any restriction on the process. This should be contrasted with the conventional form of Clausius's inequality in Equation (94); the equality here holds only in the absence of irreversibility.
The existence of a unique T also appears in the microstate probabilities, see Section 8.2 that can be used to determine various fluctuations of interest. These probabilities for M ieq also give a generalization of the EQ partition function to a NEQ partition function in Equation (102a). Because of the space limitation, we did not cover its consequences.

Applications
We now come to the various applications of the MNEQT in the later half of the review. The main lesson here is that several applications cannot be carried out in the MNEQT. Apart from the many applications in Section 10 that we have already discussed above, we have applied it to glasses when we derive the famous Tool-Narayanaswamy equation in Section 11. It is a phenomenological equation for which we provide a theoretical justification within the MNEQT. We study an irreversible Carnot cycle in Section 12 and derive its efficiency in terms of the entropy generation ∆ i S and show how it differs from the that of a reversible Carnot cycle. We also show how to compute ∆ i S for a simple case in which each segment is irreversible but between EQ macrostates; see Equation (138).
The next important application is about friction and the Brownian motion in Section 13. By considering the relative motion between Σ and Σ, we theoretically predict the well-know empirical fact that friction is caused by the relative motion. We apply the approach to a system of piston in a cylinder, a moving particle-spring system in a fluid, and just a particle fluid system.
The last application is on free expansion in Section 14. Here, we consider classical and quantum expansion. In both cases, we make a simple model of the process and show how it can used to determine ∆ i S between not only two M eq macrostates but also between two M nieq ; the latter cannot be determined in theMNEQT.

Summary
To summarize, we have given a detailed review of the MNEQT in an extended state space that was initiated a while back [41,52,92]. Its main attraction is the variety of new applications, many of which cannot be investigated in theMNEQT in which internal variables play no direct role. The approach is applicable to a system in any arbitrary macrostate M arb and is used to provide a unique but very sensible definition of the temperature, which satisfies all of its important requirements. The useful aspect of the statistical approach needed for the MNEQT is that it provides a unique definition of generalized macroheat and macrowork dQ and dW, respectively, that are independent contributions in the generalized first law in Equation (23a); both quantities are system intrinsic and obey the conventional partitioning in Equation (4) valid for any process. These macroquantities differ from the exchange macroheat and macrowork d e Q and d e W, respectively. Therefore, the MNEQT directly considers the irreversible components d i Q and d i W that originate from all internal dissipation within the system and satisfy an important identity d i Q ≡ d i W > 0, see Corollary 2, for any arbitrary irreversible process. The irreversible macroquantities vanish for a reversible process. The identification of a global and unique temperature T is the most significant aspect of the MNEQT in that it allows us to deal with Σ as a blackbox so that we do not need to know its interior. This requires a certain number of internal variables, which explains the extended state space. We similarly define other fields like the pressure, etc. statistically in terms of generalized "mechanical" forces; these also include generalized forces for internal variables. All these definitions are instantaneous and are not affected by how slow or fast any arbitrary process is. The latter only determines the time window of relaxations of the internal processes, and the choice of the state space. We believe that our novel approach provides a first-ever definition of the temperature, pressure, etc. and of dQ and dW for any arbitrary macrostate, whether the system is isolated on in a medium. Our approach is also valid to investigate nonequilibrium macrostates with respect to S X , which brings memory effects in the investigation. Thus, the approach is applicable in a wide variety of situations, and fulfils Planck's dream.
Funding: This research received no external funding.
Institutional Review Board Statement: Not applicable.