*Article* **Chemical and Mechanical Aspect of Entropy-Exergy Relationship**

**Pierfrancesco Palazzo**

Technip Energies, 00148 Roma, Italy; pierfrancesco.palazzo@technipenergies.com or pierfrancesco.palazzo@gmail.com

**Abstract:** The present research focuses the chemical aspect of entropy and exergy properties. This research represents the complement of a previous treatise already published and constitutes a set of concepts and definitions relating to the entropy–exergy relationship overarching thermal, chemical and mechanical aspects. The extended perspective here proposed aims at embracing physical and chemical disciplines, describing macroscopic or microscopic systems characterized in the domain of industrial engineering and biotechnologies. The definition of chemical exergy, based on the Carnot chemical cycle, is complementary to the definition of thermal exergy expressed by means of the Carnot thermal cycle. These properties further prove that the mechanical exergy is an additional contribution to the generalized exergy to be accounted for in any equilibrium or non-equilibrium phenomena. The objective is to evaluate all interactions between the internal system and external environment, as well as performances in energy transduction processes.

**Keywords:** Carnot cycle; Carnot efficiency; thermal entropy; chemical entropy; mechanical entropy; thermal exergy; chemical exergy; mechanical exergy; metabolic reactions

#### **1. Introduction**

The research here present follows, and is complementary to, a previous treatise already published and entitled "Thermal and Mechanical Aspect of Entropy-Exergy Relationship" [1]. The purpose is to further extend the perspective already adopted to provide an overarching generalization to include chemical systems and phenomena: in particular, an extension to biological molecules, and molecular aggregates, represents the basis to demonstrate the rigorous and reliable analysis of the relationship between entropy and exergy properties and their applications to chemical non-living and living systems. The interest of such an extension relies in the fact that design and experimental analyses and verifications in different fields of application require implementation of extrema principles based on entropy and exergy as non-conservative and additive state properties. Indeed, in non-equilibrium phenomena, maximum or minimum entropy generation (at macroscopic level) or production (at microscopic level) constitute a methodological paradigm implied in the exergy property founded on the very entropy–exergy relationship. Though, exergy property provides a more complete evaluation of processes since it accounts for: (i) reversible non-dissipative conversions among different forms of energy; and (ii) irreversible dissipative conversions determining entropy creation and related exergy destruction. This dual meaning completeness of the exergy property suggests the research of extrema principles in terms of maximum or minimum exergy disgregation (at macroscopic level) and maximum or minimum exergy degradation (at microscopic level). This extension in turn requests a generalization of properties and processes to chemical internal energy in addition to thermal internal energy usually focused to provide demonstrations and applications of exergy property definitions and exergy method applications. Specific reference is made to the school of thought developed at MIT and reported in publications, textbooks and papers, duly mentioned to describe the paradigm of the methodology as well as the conceptual framework of thermodynamics foundations [2].

**Citation:** Palazzo, P. Chemical and Mechanical Aspect of Entropy-Exergy Relationship. *Entropy* **2021**, *23*, 972. https://doi.org/10.3390/e23080972

Academic Editor: Michel Feidt

Received: 23 June 2021 Accepted: 19 July 2021 Published: 28 July 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

As it is used in many different contexts and dissertations, it is worth clarifying that the term "generalized" is here used to refer to thermal, chemical and mechanical (and electro-magnetic) aspects of systems and phenomena pertaining to the domain of physical, chemical and biological foundations and applications [3,4].

Moreover, it is worth positing a caveat relating to the concept of heat, mass and work interactions characterizing processes among systems. Indeed, heat, mass and work represent thermal, chemical and mechanical energy transfer and the use of this concept introduces a logical loop in the definition of thermodynamic properties that has been overcome by means of a different set of definitions, assumptions and theorems [5,6]. Despite the use of terms such as "heat or mass or work interaction" should be avoided for this reason, though it is adopted here only to address thermal, chemical and mechanical energy flows and exchanges among systems. In particular, the mass interaction is the homology of heat interaction, whereby particles' potential energy, in terms of chemical potential, is transmitted between two interacting systems, instead of particles' kinetic energy transmitted in the form of heat interaction. In finite terms, the mass interaction occurs through mass entering and exiting the system at constant overall mass, implying that chemical potential is the driving force moving chemical energy associated to chemical entropy fluxes. Nevertheless, mass interaction can be obtained with no bulk-flow through the system and by means of stereochemical variations characterized by isomerization of molecules and polymers.

The interest in developing exergy property and the exergetic method has been highlighted in different domains, spreading from industry, ecology, biology, as reported in the literature [7]. In exergo-economic applications, exergy has even become the central quantity of a theory of exergetic cost [8].

#### **2. Assumptions and Methods**

The dualism consisting of the chemical and mechanical aspects of thermodynamic systems and phenomena represents the chemical–mechanical perspective complementary to the thermal–mechanical one. This conceptual symmetry is further analyzed to provide a definition of the components of entropy and exergy properties relating to mass interactions, typically characterizing chemical processes and chemical internal energy transfer, and work interactions, always occurring along the interaction of any system with a thermal–chemical–mechanical reservoir. Again, in this framework the correlation of chemical potential *μ* (corresponding to temperature) with respect to chemical internal energy *UC*, and the correlation of pressure *P* with respect to mechanical internal energy *UM*, constitute an axiomatic schema. This very schema allows to achieve an extended definition of chemical exergy determined by both chemical potential and pressure, both accounted for in terms of difference with respect to the stable equilibrium state of the external reference system (reservoir) state, is considered. A reservoir is posited to be characterized as behaving at constant chemical potentials and constant pressure (in addition to constant temperature) moving along stable equilibrium states [2].

#### **3. Chemical and Mechanical Components of Entropy Property**

As a logical implication of the second law, stated in terms of existence and uniqueness of the stable equilibrium state of a system, the definition of entropy property is proved by using the non-existence of perpetual motion machines of the second kind (PMM2) [2]; the definition of entropy is expressed through the difference between energy and available energy, or exergy, times a parameter characterizing the reservoir [2]. This inferential method is valid for both thermal and chemical components contributing to the entropy balance of any system in any state. Hence, chemical entropy *SC*, in addition to thermal entropy *ST*, constitutes a property determining the overall internal energy content according to the Euler relation as reported in the literature [2]:

$$\mathcal{U} = \mathcal{U}^T + \mathcal{U}^C + \mathcal{U}^M = TS + \sum\_{i=1}^r \mu\_i n\_i - PV \tag{1}$$

where *μ<sup>i</sup>* and *ni* are the chemical potential and the number of moles, respectively, of the *i*-th chemical species for substances composed by *r* chemical species; this relation, applicable to closed or open systems, hence accounting for "permanent" internal system (non-flow) or "transit" external system (bulk-flow) interactions, can be used to argue for a confrontation between two canonical thermodynamic processes, namely, isothermal and isopotential, as described hereafter. The validity of the phase rule is duly considered since it governs the number of independent intensive quantities determining the thermodynamic state of any system: *F* = *C* − *P* + 2, where *F* is the degree of freedom, *C* is the number of components, or chemical constituents, and *P* is the number of phases (solid, liquid, vapor, gas).

In case of isothermal reversible or irreversible processes, the temperature is assumed to remain constant while the system undergoes heat interactions and work interactions simultaneously so that *δQ* = *δW* ⇒ *dU* = 0; in the general case of systems undergoing physical operations or chemical reactions, the chemical potential may change along the isothermal process; this is the case of physical operations, such as phase changes (liquidto-vapor evaporation of vapor-to-liquid condensation), or direct and inverse chemical or stereochemical reactions in which constitutional, conformational or configurational molecular changes occur. In all those different types of isothermal processes, the only result is that heat interaction is transformed into work interaction, or vice versa; hence, in general, the system undergoes chemical potential variations, even though no mass interactions occur and contribute, with interactions intensity and system density, to determine the pressure of the system in addition to the temperature that, instead, remains constant as assumed to characterize the process.

In cases where an isopotential reversible or irreversible process of open systems is analyzed, chemical potentials are assumed to remain constant within the internal system. Notwithstanding both physical operations or chemical reactions may occur, the system undergoes mass interaction and work interaction simultaneously so that *δM* = *δW* ⇒ *dU* = 0. Indeed, high chemical potential mass input is compensated for by low chemical potential mass output to ensure no variation of the total mass constituting the system and no variation of chemical potential while a portion of input mass chemical potential is transformed into pressure to allow work interaction. Along an isopotential process, the system may undergo temperature variations (e.g., due to compression or expansion of vapors or gases) even though no heat interactions occur; the temperature contributes towards determining the internal pressure of the system; on this basis, the internal energy variation is formulated by means of the total differential of Euler relation and is expressed, in the specific case of isopotential processes, in the following terms:

$$d\mathcal{U} = d\mathcal{U}^C + d\mathcal{U}^M = d\left(\sum\_{i=1}^r \mu\_i n\_i\right) - d(PV) = \delta M + \delta \mathcal{W} = 0 \tag{2}$$

as far as the mechanical term appearing in this relation is concerned, it is null because the isopotential process at constant mass implies that the mechanical internal energy of the whole system remains constant:

$$-d(PV) = -P dV - V dP = 0\tag{3}$$

where, for the general case of an open system undergoing an isopotential process, the equality *PdV* = −*VdP* applies.

Without limiting the generality of this approach, the system considered can be an ideal gas and the thermal form of state equation *PV* = *RT* applies; though, considering the chemical aspect of the internal system, reference can be made to the chemical form of the state equation that is expressed by means of the chemical potential in lieu of temperature [3]; hence the chemical form of state equation *PV* = *Rμ* [9] is used to infer that, at constant chemical potential *dU<sup>M</sup>* = −*d*(*PV*) = 0 as a consequence of the definition of isopotential process, and Equation (2) becomes:

$$d\mathcal{U} = d\mathcal{U}^{\mathbb{C}} = d\left(\sum\_{i=1}^{r} \mu\_i n\_i\right) = 0 \tag{4}$$

The chemical energy can also be expressed by means of a formulation relating to the chemical potential and the chemical entropy in the same form of thermal energy, that is:

$$\sum\_{i=1}^{r} \mu\_i n\_i = \sum\_{i=1}^{r} \mu\_i S\_i^{\mathbb{C}} \tag{5}$$

Besides an equivalence factor, the chemical entropy is directly related to the number of molecules, or moles, of any chemical species constituting the internal system; hence, the total differential is:

$$d\left(\sum\_{i=1}^{r} \mu\_i S\_i^{\mathbb{C}}\right) = \sum\_{i=1}^{r} \mu\_i dS\_i^{\mathbb{C}} + \sum\_{i=1}^{r} S\_i^{\mathbb{C}} d\mu\_i \tag{6}$$

However, as the process is isopotential, thus behaving at constant *μi*, then the above equation becomes:

$$d\mathcal{U} = d\mathcal{U}^{\mathbb{C}} = \sum\_{i=1}^{r} \mu\_i dS\_i^{\mathbb{C}} = 0 \text{ that requires } dS\_i^{\mathbb{C}} = 0 \tag{7}$$

The mass interaction occurring along an isopotential process can be realized by means of the addition or subtraction of mass determining the total mass variation of the internal system under consideration; in such a process, both physical operations and chemical reactions are allowed to occur: *dS<sup>C</sup> <sup>i</sup>* = 0 implies *dni* = 0 that is valid if, and only if, the total mass remains constant but, on the other side, the total mass itself has to change due to mass interaction characterizing the assumed isopotential process; hence, the total mass should remain constant and should change at the same time along the same isopotential process, thus representing an apparent contradiction. The resolution of this contradiction relies in the physical meaning of chemical entropy that, instead, is to be considered as a total entropy (of chemical origin), including chemical and mechanical contributions due to mass interaction related to chemical potential, and work interaction related to pressure.

In this regard, as far as the mechanical aspect of the isopotential process is concerned, a further argument relates to the adiabatic reversible process (non-heat and non-mass interactions with external system) that, hence, is accomplished at constant chemical entropy and constant thermal entropy while chemical potential and pressure change along the process; according to the following equations:

$$\begin{aligned} S^{\mathbb{C}}(\mu, V) - S\_0^{\mathbb{C}} &= \mathbb{C}\_n \ln \frac{\mu}{\mu\_0} + \mathbb{R} \ln \frac{V}{V\_0} \\ S^{\mathbb{C}}(\mu, P) - S\_0^{\mathbb{C}} &= \mathbb{C}\_P \ln \frac{\mu}{\mu\_0} - \mathbb{R} \ln \frac{P}{P\_0} \end{aligned} \tag{8}$$

The above expressions are obtained from the homologous ones depending on temperatures of the system; the first term of the second member relates to the chemical potential variation due to chemical reactions occurring in the internal system (with inter-particle potential energy variation and no inter-particle kinetic energy variation), and the second term of the second member relates to the mechanical potential, that is to say, pressure variation due to (internal) work interaction; hence, it can be inferred that the chemical entropy variation, associated to mass interaction, is null by definition of non-mass interaction process; therefore, the way chemical entropy remains constant is because of a compensation effect due to the combination of increasing chemical potential and decreasing pressure, or vice versa, in the internal system.

The specific case of an isopotential reversible or irreversible process is typically representative of a system interaction at constant chemical internal energy. This process requires that both chemical internal energy and chemical entropy remain constant since a mass-to-work or work-to-mass conversion occurs isopotentially by definition, i.e., at constant chemical potential (and constant or variable temperature). This operation is determined by equal quantities of mass input and work output, or work input and mass output. Nevertheless, the mass input or output is associated with a transfer of chemical entropy between internal and external system: hence, a transfer of entropy under "chemical" form requires an entropy transformation into "mechanical" form in order to close the total balance of entropy components to zero, as required by Equation (7), reported here again: *dU* = *dU<sup>C</sup>* = ∑*<sup>r</sup> <sup>i</sup>*=<sup>1</sup> *μidS<sup>C</sup> <sup>i</sup>* = 0 that implies *dS<sup>C</sup> <sup>i</sup>* = 0; as mechanical internal energy does not undergo any variation as assumed, this mechanical form of entropy is correlated to work output or input and is determined by pressure and volume variations. In this regard, mechanical entropy is an additional component, and is consistent with, the canonical formulation of entropy calculated for any process, including isopotential, implying that chemical entropy is determined solely by the mass interaction. This conclusion is in compliance with the result provided with the same rationale as for an isothermal reversible process and is described in the process reported in the homologous procedure already mentioned [1].

The analysis described above demonstrates that entropy, in its more general meaning and characterizing internal energy, is constituted by two different and independent components; the first one is the "chemical entropy" that remains constant along an adiabatic reversible process (usually termed as isoentropic), where, instead, only work interaction occurs; the second one is the "mechanical entropy" that remains constant along an isovolumic reversible process where mass interaction (or heat interaction) only occurs. In addition, it can be posited that entropy property *S*, appearing in the expression of internal energy *U* = *TS* + ∑*<sup>r</sup> <sup>i</sup>*=<sup>1</sup> *μini* − *PV*, specifically represents the thermal component, or thermal entropy, out of the overall contribution that, nevertheless, remains consistent with, and does not disprove, the above analysis. From a methodological standpoint, the relationship between entropy and exergy properties represents the basis for assuming and proving that chemical and mechanical components set forth for entropy remain valid for chemical exergy and mechanical exergy, respectively.

#### **4. Chemical Exergy Derived from Carnot Chemical Direct Cycle**

The definition of chemical exergy analyzed here, among others reported in the literature [10], is based on mass and work interactions and addresses the chemical aspect as a symmetric concept with respect to thermal aspects in the consideration of internal energy contributions. In terms of interactions with the reservoir, the chemical exergy is formulated as the maximum theoretical net useful work withdrawn as a portion of the internal energy of the system, constituting the available energy, along a process leading the system-reservoir composite to the stable equilibrium state. This useful work is calculated on the basis of thermodynamic efficiency of the Carnot chemical direct cycle operating between the variable chemical potential *μ* of a system *A*, and the constant chemical potential *μ<sup>R</sup>* of a reservoir *R* assumed as the external reference system:

$$dEX^{\mathbb{C}} = \delta \mathcal{W}\_{REV}^{NET} = \delta \mathcal{W}\_{REV}^{CONVER} + \delta \mathcal{W}\_{REV}^{TRANSF} \tag{9}$$

where the differential form of chemical exergy is expressed by means of the sum of two terms: (i) a first contribution *δWCONVER REV* deriving from the conversion of mass interaction into work interaction through a mass-to-work Carnot chemical direct cyclic process [11,12] converting the chemical energy, available at higher chemical potential *μHC*, by means of an ideal cyclic machinery operating between *μHC* and the reservoir at *μLC R* ; (ii) a second contribution *δWTRANSF REV* deriving from the transfer of mechanical energy by means of work interaction through a cyclic process resulting from system volume variation by means of an ideal machinery operating between *PHP* and the reservoir at *PLP <sup>R</sup>* ; for sake of generality, mass and work interactions can occur either sequentially in different processes or concurrently within the same process; both result from the generalized available energy of a simple system as defined in the approach by Gyftopoulos and Beretta [2].

The rationale to define chemical exergy is based on the confrontation of thermal and chemical aspect of cyclic processes. Usually, temperature is the intensive property determining the Carnot cycle representing the highest efficiency cyclic process and constituting the consequence of the non-existence of perpetual motion machine of the second kind (PMM2) [13]. However, if the same Carnot cycle is regarded as characterized by the chemical potential as an intensive property, instead of temperature, then the Carnot chemical cycle constitutes the symmetric process of a Carnot thermal cycle, considering pressure as the common reference [13]. Hence, based on the chemical potential, a chemical machine model can be described in terms of a chemical conversion cyclic process as the homology of a thermal conversion cyclic process for which balances and efficiencies can be stated [11,12]. In this sense, the above equation, expressing the chemical exergy in differential terms, can be reformulated in the following form:

$$\begin{split}dEX^{\rm C} &= \delta \mathcal{W}\_{REV}^{\rm NET} = \eta\_{\rm id}^{\rm CART-CHEMICAL-DIRECT} \cdot \delta M^{\rm HC} + \delta \mathcal{W}\_{REV}^{\rm TRANSF} \\ &= \frac{\delta \mathcal{W}}{\delta M\_{ISOOTENTAL}^{\rm NET}} \cdot \delta M^{\rm HC} - PdV + P\_{\rm R}dV \\ &= \left(1 - \frac{\mu\_{\rm R}}{\mu}\right) \cdot \delta M^{\rm HC} + \left(1 - \frac{P\_{\rm R}}{P}\right) \cdot \delta W^{\rm IP} \end{split} \tag{10}$$

where *δMHC ISOPOTENT IAL* represents the infinitesimal mass interaction along the process at higher chemical potential *μ* different from the chemical potential *μ<sup>R</sup>* of the reservoir; *δMHC* represents the infinitesimal mass interaction along any process for which chemical exergy is calculated; *δWHP* is the infinitesimal work interaction at (variable) high pressure *P* alongside the process, higher (or lower) with respect to the reservoir (constant) pressure *PR*; and the two terms in the last member of the above equation are the consequence of the role of pressure corresponding to the role of chemical potential with respect to mass in chemical exergy.

The above equation is similar to the already known canonical definition of physical exergy [14–16]; this expression is used to define the exergy that is identified by the superscript "C", standing for "Chemical", according to the definition reported in the literature [13] as pointed out above.

In finite terms, considering that *<sup>δ</sup>WHP* = −*PdV*:

$$\begin{split} EX^{\mathbb{C}} &= \mathcal{W}\_{10} \\ &= \int\_{0}^{1} \left( 1 - \frac{\mu\_{\mathbb{R}}}{\mu} \right) \cdot \delta M^{HC} + \int\_{0}^{1} \left( 1 - \frac{p\_{\mathbb{R}}}{P} \right) \cdot \delta \mathcal{W}^{HP} \\ &= M\_{10}^{HC} - \mu\_{\mathbb{R}} \int\_{0}^{1} \frac{d\mu^{HC}}{\mu^{HC}} + \mathcal{W}\_{10}^{HP} + P\_{\mathbb{R}} \cdot (V\_{1} - V\_{0}) \end{split} \tag{11}$$

where *W*<sup>10</sup> is the maximum theoretical net useful work output extracted from the generalized available energy as results from the interaction between system and reservoir; *MHC* <sup>10</sup> is the mass interaction alongside the process from the higher isopotential process at *μ* to the lower isopotential process at *μ<sup>R</sup>* (as a particular case, mass interaction can occur alongside an isopotential process); and *WHP* <sup>10</sup> is again the work interaction from the higher isopotential process at *μ* to the lower isopotential process at *μR*. This equation expresses the chemical exergy *EX<sup>C</sup>* in finite terms as the sum of contributions deriving from cyclic processes where the first one is a mass-to-work ideal cyclic conversion and the second one is an HP-work-to-LP-work ideal cyclic transformation.

The sum of *MHC* <sup>10</sup> and *<sup>W</sup>HP* <sup>10</sup> can also be expressed by integrating the Equation (2):

$$M\_{10}^{HC} + W\_{10}^{HP} = \mathcal{U}\_1 - \mathcal{U}\_0 = M\_V \cdot (\mu\_1 - \mu\_0) \tag{12}$$

where the equivalence represents the amount of mass interaction only in the isovolumic processes connecting two states at different chemical potentials. Therefore, chemical exergy can also be associated to sequential isovolumic-isopotential processes connecting any state 1 with a different state 0 of the system. The integral operation results in the expression of chemical exergy, Equation (11). In infinitesimal terms, it constitutes the definition of entropy according to the canonical formulation or, as here proposed, the chemical component of entropy property identified by the superscript "chemical"; the expression in finite terms becomes:

$$EX^{\mathbb{C}} = \mathcal{W}\_{10} = (\mathcal{U}\_1 - \mathcal{U}\_0) - \mu\_R \cdot \left(S\_1^{\mathbb{C}} - S\_0^{\mathbb{C}}\right) + P\_R \cdot \left(V\_1 - V\_0\right) \tag{13}$$

where the system-reservoir composite interaction at constant chemical potential *μ<sup>R</sup>* and constant pressure *PR* of the reservoir results. This formulation does not contradict the homologous one, proposed by Gyftopoulos and Beretta, deduced from the definition of generalized available energy with respect to an external reference system at constant chemical potential *μ<sup>R</sup>* and constant pressure *PR* behaving as a reference external system.

#### **5. Mechanical Exergy Derived from Carnot Chemical Inverse Cycle**

The correlation between chemical entropy and chemical exergy clarified in the previous sections is the basis to analyze the entropy–exergy relationship. This analysis is carried out starting from a mechanical standpoint to develop the concept of exergy related, in this case, to work and pressure. To do so, the existence of the mechanical component of entropy already proved is taken into consideration. This different standpoint is viable because the equality of pressure between system and reservoir is an additional condition of the existence and uniqueness of stable equilibrium states of the system-reservoir composite, other than the equality of chemical potential. Indeed, both pressure and chemical potential are thermodynamic potentials driving any equilibrium or non-equilibrium process in the direction of stable equilibrium.

The definition of exergy formulated by the Carnot chemical direct cycle consists of chemical exergy which highlights the role of chemical potential in mass-to-work conversions. On this basis, the research for a definition of mechanical exergy expressed by the inverse cycle is the logical consequence. The objective becomes the physical meaning of the pressure in the opposite process, that is work-to-mass conversion. For the mechanical standpoint too, the general formulation of exergy, in infinitesimal terms, derives from the relationship founded on the Carnot chemical (inverse) cycle and the related expression of thermodynamic efficiency determined by chemical potentials of system and reservoir.

As far as the Carnot cycle is concerned, the usual expression of its performance in terms of thermodynamic efficiency is related to high temperature and low temperature isothermal processes through heat interactions with two reservoirs. Though, the thermodynamic potential constituted by the temperature, or by the inter-particle kinetic energy within the internal system, is continuously transformed into inter-particle potential energy constituting the chemical potential of molecules. In turn, the chemical potential constitutes a thermodynamic potential determining the performance of such a chemical cyclic process. Focusing the performance of chemical cyclic process, it is expressed by means of homologous expression as thermal cyclic processes. Hence, if reference is made to high and low chemical potentials defined as *μHC* and *μLC* characterizing isopotential processes of the "Carnot chemical cycle", then the formulation of ideal cycle efficiency *η<sup>C</sup> id* is stated as:

$$
\eta\_{\rm id}^{\rm C} = 1 - \frac{\mu^{\rm LC}}{\mu^{\rm HC}} \tag{14}
$$

These isopotential processes are intended to be characterized by mass interaction input and work interaction output, and vice versa, while the chemical potential of the mass constituting the system remains constant: this means that entering mass implies reducing chemical potential due to chemical reactions occurring at constant temperature while work is exiting the system.

The chemical Carnot cycle considered here will be used to define chemical exergy on the basis of its homology with the canonical thermal Carnot cycle usually referred to in the literature. This chemical cycle, elaborated through ideal processes, is symmetric because it consists of four elaborations, each pair of which is of the same type (isodiabatic), as represented in Figure 1. In case the operating internal system is a perfect gas as assumed, the alternating polytropic processes (two adiabatic and two isopotential), behave according to the following property:

$$\frac{V\_1}{V\_0} = \frac{V\_{1\text{C}}}{V\_{0\text{C}}} ; \frac{P\_1}{P\_0} = \frac{P\_{1\text{C}}}{P\_{0\text{C}}} ; \frac{\mu\_1}{\mu\_0} = \frac{\mu\_{1\text{C}}}{\mu\_{0\text{C}}} \tag{15}$$

where the meaning of these ratios is that properties at the end of isodiabatic processes are proportional, therefore the amount of work interaction between internal and external system is the same for both adiabatic compression from 0 to 1 and expansion from 1C to 0C processes; this amount of work interaction is calculated by means of the following expression:

$$\mathcal{W} = \frac{1}{K - 1} P\_0 V\_0 \left[ \left( \frac{P\_1}{P\_0} \right)^{\frac{K - 1}{K}} - 1 \right] \tag{16}$$

where this depends on the equality *<sup>P</sup>*<sup>1</sup> *<sup>P</sup>*<sup>0</sup> <sup>=</sup> *<sup>P</sup>*1*<sup>C</sup> <sup>P</sup>*0*<sup>C</sup>* and therefore input and output *W* (with different sign) is equal for the two adiabatic reversible processes. The resulting work interaction balance along the whole cycle accounts for the algebraic sum of work interaction contributions due to both isopotential processes only where mass and work interactions are exchanged simultaneously in directly proportional and equal amounts. This property enables expression of the thermodynamic efficiency of the Carnot chemical cycle of an open bulk-flow system both in terms of mass interaction or work interaction. That thermodynamic efficiency can be expressed either in terms of mass interaction only or in terms of work interaction only due to the equality of mass-work input-output, or vice versa, alongside the isopotential processes as represented in Figure 1:

$$\eta\_{id}^{\mathbb{C}-DIR} = \frac{\mathcal{W}}{M^{\mathrm{HC}}} = \frac{\mathcal{W}^{\mathrm{HP}} - \mathcal{W}^{\mathrm{LP}}}{M^{\mathrm{HC}}} = \frac{\mathcal{W}^{\mathrm{HP}} - \mathcal{W}^{\mathrm{LP}}}{\mathcal{W}^{\mathrm{HP}}} = \frac{M^{\mathrm{HC}} - M^{\mathrm{LC}}}{M^{\mathrm{HC}}} \tag{17}$$

**Figure 1.** Carnot Chemical Cycle.

As far as the inverse cycle is concerned, if the role of used mass interaction at high chemical potential *MHC* and utilized total work interaction *MHC* are replaced by used work interaction *WHP* and utilized total mass interaction *M*, the following expression applies:

$$\eta\_{id}^{\mathbb{C}-INV} = \frac{M}{W^{HP}} = \frac{M^{HC} - M^{LC}}{W^{HP}} = \frac{M^{HC} - M^{LC}}{M^{HC}} = \frac{W^{HP} - W^{LP}}{W^{HP}} = \eta\_{id}^{\mathbb{C}-DIR} \tag{18}$$

where this equation, for a Carnot chemical inverse cycle, is obtained by assuming the meaning of used and utilized interactions with proper input and output: used mass *MHC* in the direct cycle corresponds to the used work *WHP* in the inverse cycle; moreover, the utilized total work *W* in the direct cycle corresponds to the utilized total mass *M* in the inverse cycle; as a consequence, the efficiency of a Carnot chemical direct cycle, depending on isopotential processes only, remains unchanged if the Carnot chemical inverse cycle is considered with the corresponding opposite processes; hence the following equality is demonstrated:

$$
\eta\_{id}^{\mathbb{C}-INV} = \frac{\mathcal{M}}{\mathcal{W}^{\text{HP}}} = \frac{\mathcal{W}}{\mathcal{W}^{\text{HC}}} = 1 - \frac{\mu^{\text{LC}}}{\mu^{\text{HC}}} = \eta\_{id}^{\mathbb{C}-DIR} \tag{19}
$$

It is noteworthy that this approach focuses the concept of exergy and its definitions in terms of used and utilized quantities; thus, it is different from the concept of coefficient of performance (CoP) adopted for refrigeration and cryogenic processes for which used and utilized flows are different and in compliance with operative performances in applications in machinery and plants.

The definition of exergy based on the direct cycle as chemical exergy which is determined by chemical potential in mass-to-work conversion, can be complemented by the symmetric definition of mechanical exergy founded on the inverse cycle; in this case, the physical meaning of pressure in the opposite work-to-mass conversion, determines the pressure level of work interactions alongside the higher chemical potential, and higher pressure, isopotential processes of the Carnot chemical inverse cycle.

The concept of equivalence and interconvertibility, demonstrated by Gaggioli [14–16], can be stated in different terms: "useful work is not better than useful mass, and the available energy results in maximum net useful mass or, equivalently, maximum net useful work, or the combination of both." Thus, the definition of mechanical exergy representing, in this case, the maximum net useful mass withdrawable from the available energy, in infinitesimal terms, can be expressed as:

$$dXX^{M} = \delta M\_{REV}^{NET} = \delta M\_{REV}^{CONVER} + \delta M\_{REV}^{TRANSF} \tag{20}$$

where the first term of the last member *δMCONVER REV* is the net amount of mass interaction resulting from the balance of a Carnot chemical inverse cycle converting the available work at pressure *P* into mass through the interaction with a reservoir at constant pressure *PR*; the second term of the last member *δMTRANSF REV* is the net amount of available energy transferred from the external to the internal system by means of mass interaction alongside a non-cyclic or cyclic process; mass and work interactions are accounted for occurring either successively or simultaneously, and both derive from the generalized available energy of a simple system as defined by Gyftopoulos and Beretta [2]. Hence, in differential terms:

$$dEX^M = \delta M\_{REV}^{NET} = \eta\_{id}^{CHEMICAL - CARNOT - INVERSE} \cdot \delta W^{HP} + \delta M\_{REV}^{TRANSF} \tag{21}$$

On the basis of Equation (15):

$$\begin{split}dEX^{M} &= \frac{\delta M}{\delta W^{HP}\_{ISOTHERMAL}} \cdot \delta W^{HP} + \mu dS^{C} - \mu\_{R} dS^{C} \\ &= \frac{\delta M}{\delta W^{HP}\_{ISOTHERMAL}} \cdot \delta W^{HP} + (\mu - \mu\_{R}) dS^{C} \\ &= \left(1 - \frac{\mu\_{R}}{\mu}\right) \cdot \delta W^{HP} + \left(1 - \frac{\mu\_{R}}{\mu}\right) dM^{HC} \end{split} \tag{22}$$

The formulation of chemical exergy is now reversed to define the mechanical exergy, identified by the superscript "*M*", that is not related to exergy associated to center-of-mass macroscopic kinetic and potential energy, already termed as "kinetic exergy" and "potential exergy" according to the literature.

After replacing work with mass, the mechanical exergy in finite terms is formulated as:

$$\begin{split} EX^{M} &= M\_{10} = \int\_{0}^{1} \left( 1 - \frac{\mu\_{R}}{\mu} \right) \cdot \delta \mathcal{W}^{HP} + \int\_{0}^{1} (\mu - \mu\_{R}) \cdot dS^{C} \\ &= \mathcal{W}\_{10}^{HP} - \mu\_{R} \int\_{0}^{1} \frac{\delta \mathcal{W}^{HP}}{\mu} + \mathcal{M}\_{10}^{HC} - \mu\_{R} \left( S\_{1}^{C} - S\_{0}^{C} \right) \end{split} \tag{23}$$

where *M*<sup>10</sup> is the maximum theoretical net useful mass output obtained by means of the generalized available energy resulting from the interaction process between system and reservoir; *WHP* <sup>10</sup> is the work interaction from higher isopotential curve at *μ* and corresponds with the state at pressure *P* to lower isopotential curve at *μR*; as a particular case, the work interaction can occur alongside an adiabatic reversible process; the sum of terms *WHP* <sup>10</sup> and *MHC* <sup>10</sup> in the last member of previous equation can also be expressed as:

$$\mathcal{W}\_{10}^{HP} + \mathcal{M}\_{10}^{HC} = \mathcal{U}\_1 - \mathcal{U}\_0 = \mathcal{C}\_V(\mu\_1 - \mu\_0) \tag{24}$$

This equation expresses the equivalence with the sole amount of work interaction in a chemical (and thermal) isoentropic process (where work interaction only occurs), between two different chemical potentials. Hence, the mechanical exergy characterizes an isoentropic-isopotential sequential process connecting the generic state 1 with the stable equilibrium state 0 of the system–reservoir composite. If the chemical state equation *PV* = *Rμ* is adopted and used in the expression of mechanical exergy, then:

$$EX^M = Q\_{10} = (\mathcal{U}\_1 - \mathcal{U}\_0) - \overline{\mathcal{R}}\mu\_R \int\_0^1 \frac{\delta \mathcal{W}^{HP}}{PV} - \mu\_R \left(S\_1^\mathbb{C} - S\_0^\mathbb{C}\right) \tag{25}$$

The integrand term *<sup>δ</sup>WHP PV* of the above equation is formally homologous of the integrand term *dMHC <sup>μ</sup>* representing the very definition of chemical entropy according to the concept and the definition of entropy property as per Clausius formulation; on the basis of this formal homology extended to work interaction and the mechanical internal energy, the definition of mechanical entropy is derived and formulated as:

$$dS^M = \frac{\delta \mathcal{W}^{HP}}{PV} \tag{26}$$

where the factor 1/*PV* is the integrating factor of the infinitesimal work interaction *δWHP* that changes the integrand function into an exact differential function; indeed, assuming the expression of mechanical exergy previously reported as Equation (22), and considering that *<sup>δ</sup>WHP* = −*PdV* then it is allowed to differently express the mechanical exergy (of chemical origin) as:

$$\begin{split} EX^{M} &= M\_{10} \\ &= \left( \mathcal{U}\_{1} - \mathcal{U}\_{0} \right) - \overline{\mathcal{R}} \mu\_{R} \int\_{0}^{1} \frac{\delta W^{\text{HP}}}{\mathcal{V}\mathcal{V}} - \mu\_{R} \left( S\_{1}^{\mathbb{C}} - S\_{0}^{\mathbb{C}} \right) \\ &= \left( \mathcal{U}\_{1} - \mathcal{U}\_{0} \right) + \mu\_{R} \int\_{0}^{1} \overline{\mathcal{R}} \frac{\delta V}{\mathcal{V}} - \mu\_{R} \left( S\_{1}^{\mathbb{C}} - S\_{0}^{\mathbb{C}} \right) \\ &= \left( \mathcal{U}\_{1} - \mathcal{U}\_{0} \right) + \mu\_{R} \left( \overline{\mathcal{R}} \ln V\_{1} - \overline{\mathcal{R}} \ln V\_{0} \right) - \mu\_{R} \left( S\_{1}^{\mathbb{C}} - S\_{0}^{\mathbb{C}} \right) \end{split} \tag{27}$$

where it relates to the work interaction with the environmental system represented by the mechanical reservoir; therefore, considering that the chemical state equation *PV* = *Rμ* applies, then:

$$EX^M = M\_{10} = (\mathcal{U}\_1 - \mathcal{U}\_0) + P\_R V\_R (\ln V\_1 - \ln V\_0) - \mu\_R \left( S\_1^C - S\_0^C \right) \tag{28}$$

where the homology with the expression of chemical exergy (and thermal exergy) demonstrates the common origin of all exergy components deriving from conversion processes from one energy form to a different one characterized by entropy variations occurring along those processes; to complete this homology, the integrating factors included in the integration function are similar:

$$dS^T = \frac{\delta Q^{HT}}{T} \text{ similar to } dS^C = \frac{\delta M^{HC}}{\mu} \text{ similar to } dS^M = \frac{\overline{R}dV}{V} \tag{29}$$

where the last differential is integrated, the equation in finite terms becomes:

$$S^M = \overline{\mathcal{R}} \ln V + \mathcal{C} \tag{30}$$

Hence, *dS<sup>M</sup>* being an exact differential function, then *S<sup>M</sup>* is a state property depending on the state parameter volume and can be adopted as the formal definition of mechanical entropy; moreover, as volume is additive, the mechanical entropy is an additive property. As far as the dimensional analysis is concerned, since the logarithmic function is dimensionless, then the dimension of mechanical entropy is related to *R* having dimensions <sup>J</sup>·kg−1·K−<sup>1</sup> or <sup>J</sup>·mol−1·K−<sup>1</sup> that are identical to the chemical entropy and thermal entropy dimensions. In this regard, the relationship between mechanical exergy and volume, and pressure as a consequence, constitutes the rationale for considering the equality of pressure between system and reservoir, as an additional condition of mutual stable equilibrium to be accounted for in the definitions of available energy and exergy, and hence in the definition of entropy property related to, and derived from, energy and available energy or exergy according to the proof method demonstrated and reported in the literature. The physical meaning of mechanical exergy can be ascribed to the combination of pressure characterizing the mechanical internal energy of the system, and the pressure of work interaction occurring between system and reservoir. It is noteworthy that the demonstration procedure described here is, in its rationale, identical to the one stated to achieve the mechanical entropy definition based on thermal entropy using the corresponding quantities to replicate the proof.

#### **6. Generalized Chemical Exergy Related to Chemical-Mechanical Reservoir**

The definition of chemical entropy and mechanical entropy, derived and expressed from chemical exergy and mechanical exergy, respectively, is accounted for here to generalize the conceptual definition of chemical exergy including mass interaction, in addition to work interaction, characterizing interaction processes occurring between system and reservoir. On the basis of equivalence and interconvertibility proposed by Gaggioli et al. [9,10] for thermal and mechanical aspect of interactions, and here mutuated for chemical and mechanical interactions, the exergy of a system interacting with a reservoir results in the following statements:


The generalization of chemical exergy proposed here is, for the above rationale, implicated with the chemical exergy underpinned by the Carnot chemical direct cycle efficiency and the high chemical potential mass interaction; chemical exergy additionally contributes to the mechanical exergy underpinned by the Carnot chemical inverse cycle efficiency and the high pressure work interaction; both exergies are defined considering a chemical–mechanical reservoir at constant chemical potential and constant pressure behaving at permanent stable equilibrium according to the canonical definition of reservoir. The generalized chemical exergy outlined above takes into account the implication of pressure in work interaction that generates different amounts of mass interaction depending

on different pressure values at which the work interaction occurs. In different terms, it can be stated that the same amount of available mechanical internal energy transferred by means of work interaction can be used at different pressure of the system with respect to the constant pressure of the (mechanical) reservoir, to be converted into mass interaction at different chemical potentials. Hence, the useful work, available in the form of mechanical available energy, is also evaluated in terms of the second law by means of the Carnot chemical inverse cycle, producing the mass interaction output: therefore, mass-to-work conversion and work-to-mass conversions are accounted for simultaneously—this implies that the generalized chemical exergy can be regarded in the perspective of an "exergy of exergy" that makes work interaction equivalent to, and interconvertible with, mass interaction, and vice versa.

Before achieving the formulation of the generalized chemical exergy, the differential form of internal energy in differential terms according to Gibbs' equation is considered:

$$d\mathcal{U} = \sum\_{i=1}^{r} \mu\_i dn\_i - PdV = \delta \mathcal{M} + \delta \mathcal{W} \tag{31}$$

This can be reformulated in different terms by adopting the chemical entropy and the mechanical entropy previously defined and specified for all chemical substances constituting the internal system; this reformulation is a crucial step in the direction of a generalized Gibbs equation that, in this perspective, is modified into the following:

$$dUI = \sum\_{i=1}^{r} \mu\_i dS\_i^{\mathbb{C}} - \sum\_{i=1}^{r} \frac{P\_i V\_i}{\mathbb{R}} dS\_i^M = \delta M + \delta W \tag{32}$$

where, in turn, it can be expressed by means of the chemical state Equation [5]:

$$\begin{split} d\mathcal{U} &= \sum\_{i=1}^{r} \mu\_{i} dS\_{i}^{\mathbb{C}} - \sum\_{i=1}^{r} \mu\_{i} dS\_{i}^{M} \\ &= \sum\_{i=1}^{r} \mu\_{i} \left( dS\_{i}^{\mathbb{C}} - dS\_{i}^{M} \right) = \delta M + \delta W \end{split} \tag{33}$$

The term *dS<sup>C</sup> <sup>i</sup>* − *dS<sup>M</sup> i* represents the differential generalized entropy *dS<sup>G</sup> <sup>i</sup>* which, in finite terms, is *S<sup>G</sup> <sup>i</sup>* = *<sup>S</sup><sup>C</sup> <sup>i</sup>* − *<sup>S</sup><sup>M</sup> <sup>i</sup>* associated to, and depending on, the chemical potentials and is determined by mass interaction and work interaction contributing to the variation of the internal energy. Equation (33) above can be expressed as:

$$d\mathcal{U} = \sum\_{i=1}^{r} \mu\_i dS\_i^G = \delta \mathcal{M} + \delta \mathcal{W} \tag{34}$$

where, in finite terms, *U* being a state property determined by two independent variables, the following generalized Gibbs equation is deduced:

$$\mathcal{U}I = \mathcal{U}(S, V) = \sum\_{i=1}^{r} \mu\_i \Delta S^G = \mathcal{M} + \mathcal{W} \tag{35}$$

The generalized entropy is the result of the contribution of chemical and mechanical components and represents the rationale for resolving the apparent inconsistency expressed by the statement: *dU* = *dU<sup>C</sup>* = ∑*<sup>r</sup> <sup>i</sup>*=<sup>1</sup> *μidS<sup>C</sup> <sup>i</sup>* = 0 implying that *dS<sup>C</sup> <sup>i</sup>* = 0; indeed, the Gibbs equation is allowed to be null because of the two terms of *S<sup>G</sup> <sup>i</sup>* = *<sup>S</sup><sup>C</sup> <sup>i</sup>* − *<sup>S</sup><sup>M</sup> <sup>i</sup>* , which, in the special case of an isopotential process of a perfect and single-phase homogeneous gas describing the internal system, are expressed as:

$$
\Delta S\_{ISOPOTENTIAL}^{C} = C\_n \ln \frac{\mu}{\mu\_0} + \overline{R} \ln \frac{V}{V\_0} \tag{36}
$$

$$
\Delta S\_{ISOPOTENTIAL}^{M} = \mathbb{Z} \ln \frac{V}{V\_0} \tag{37}
$$

These two terms used to replace the corresponding ones in the *S<sup>G</sup> <sup>i</sup>* = *<sup>S</sup><sup>C</sup> <sup>i</sup>* − *<sup>S</sup><sup>M</sup> <sup>i</sup>* become:

$$
\Delta S\_{ISOPOTENTIAL}^{\mathbb{C}} = \Delta S\_{ISOPOTENTIAL}^{\mathbb{C}} - \Delta S\_{ISOPOTENTIAL}^{M} = \mathbb{C}\_{\mathbb{R}} \ln \frac{\mu}{\mu\_0} = 0 \tag{38}
$$

confirming thatΔ*U* = 0 for anisopotential reversible orirreversible process asΔ*S<sup>G</sup> ISOPOTENT IAL* = 0 as required to resolve the inconsistency of conditions *dU* = *dU<sup>C</sup>* = ∑*<sup>r</sup> <sup>i</sup>*=<sup>1</sup> *μidS<sup>C</sup> <sup>i</sup>* = 0 implying *dS<sup>C</sup> <sup>i</sup>* = 0 before positing.

As far as isovolumic processes are concerned, the same approach is applied by evaluating the two components of generalized entropy along the process:

$$
\Delta S\_{ISOVOLIMIC}^C = C\_n \ln \frac{\mu}{\mu\_0} \tag{39}
$$

$$
\Delta S\_{ISOVOLIMIC}^{M} = 0 \tag{40}
$$

Thus, the sum of the two contributions is:

$$
\Delta S\_{ISOVOLIMIC}^{G} = \Delta S\_{ISOVOLIMIC}^{C} - \Delta S\_{ISOVOLIMIC}^{M} = \mathcal{C}\_{\text{n}} \ln \frac{\mu}{\mu\_0} \tag{41}
$$

Therefore, the generalized entropy is identical to the chemical entropy, that confirming the dependence on the chemical potential as the overall and unique thermodynamic potential determining the state of the system.

In case of an isobaric process, the following applies:

$$
\Delta S\_{ISOBERIC}^{C} = C\_P \ln \frac{\mu}{\mu\_0} - \overline{\mathcal{R}} \ln \frac{P}{P\_0} \tag{42}
$$

$$
\Delta S\_{ISOBRIC}^{M} = \mathbb{Z} \ln \frac{V}{V\_0} \tag{43}
$$

Again, the sum of the two contributions is:

$$\begin{split} \Delta S\_{ISOBARIC}^{\mathbb{C}} &= \Delta S\_{ISOBARIC}^{\mathbb{C}} - \Delta S\_{ISOBARIC}^{M} \\ &= \mathbb{C}\_{P} \ln \frac{\mu}{\mu\_{0}} - \overline{\mathbb{R}} \ln \frac{P}{\overline{V\_{0}}} - \overline{\mathbb{R}} \ln \frac{V}{\overline{V\_{0}}} \\ &= \mathbb{C}\_{\mathbb{U}} \ln \frac{\mu}{\mu\_{0}} + \overline{\mathbb{R}} \ln \frac{V}{\overline{V\_{0}}} - \overline{\mathbb{R}} \ln \frac{V}{\overline{V\_{0}}} \\ &= \mathbb{C}\_{\mathbb{U}} \ln \frac{\mu}{\mu\_{0}} \end{split} \tag{44}$$

Finally, for an adiabatic reversible process:

$$
\Delta S\_{ADIABATIC}^{C} = 0 \tag{45}
$$

$$
\Delta S\_{ADIABATIC}^{M} = \overline{\mathcal{R}} \ln \frac{V}{V\_0} \tag{46}
$$

$$\begin{split} \Delta S^{\mathbb{G}}\_{ADIABATIC} &= \Delta S^{\mathbb{C}}\_{ADIABATIC} - \Delta S^{M}\_{ADIABATIC} = 0 - \Delta S^{M}\_{ADIABATIC} \\ &= -\overline{\mathbb{K}} \ln \frac{V}{V\_{0}} = \mathbb{C}\_{n} \ln \frac{\mu}{\mu\_{0}} \end{split} \tag{47}$$

hence demonstrating, by means of Equations (8), the existence of the relationship between pressure, that changes with volume, and the generalized entropy in the special case of absence of mass interaction determining chemical entropy null variations.

To summarize, a first outcome is that the method applied to explain the mechanical entropy contribution has led to resolve the apparent controversy already mentioned and provides a formal definition of mechanical entropy related to the pressure, with a direct implication with the definition of mechanical exergy property. A second outcome, deriving from the above method, concerns the dependence of the generalized chemical entropy solely on the chemical potential in all thermodynamic processes analyzed above; this outcome can be derived from the physical meaning of internal energy pertaining to a real, multi-phase, non-homogeneous, internal system characterized by atomic-molecular chemical bonds and interactions regardless of the thermal state and heat interactions between internal and external systems.

A caveat concerning the assumption that the canonical processes above are not limited to reversible conditions, irreversible processes are accounted for.

That said, on the basis of the relationship between generalized entropy and internal energy, if the external system behaves as a chemical and mechanical reservoir in stable equilibrium state at constant chemical potential and pressure, the internal energy balance of the system-reservoir composite is expressed as:

$$\begin{split} EX^{\mathbb{C}} &= -\left( W^{AR \leftarrow} \right) - \left( M^{AR \leftarrow} \right) \\ &= \Lambda U^{SYSTEM} + \Lambda U^{RESERVOIR} \\ &= \Lambda \mathsf{U}\_{W}^{SYSTEM} + \Lambda \mathsf{U}^{R,W} + \Lambda \mathsf{U}\_{M}^{SYSTEM} + \Lambda \mathsf{U}^{R,M} \end{split} \tag{48}$$

The conceptual meaning of this expression is that ΔU*SYSTEM <sup>W</sup>* + Δ*UR*,*<sup>W</sup>* equals the mechanical exergy converted into chemical exergy, and ΔU*SYSTEM <sup>M</sup>* + Δ*UR*,*<sup>M</sup>* equals the chemical exergy converted into mechanical exergy; in different terms:

$$EX^{\mathbb{C}} = -\left(W^{AR \leftarrow}\right) - \left(M^{AR \leftarrow}\right) = \left(\mathcal{U} - \mathcal{U}\_0\right) - M\_R - \mathcal{W}\_R \tag{49}$$

where *MR* is the minimum mass interaction representing the (minimum) mechanical exergy (Equation (28)) lost to the chemical reservoir and *WR* is the minimum work interaction representing the (minimum) chemical exergy (Equation (13)) lost to the mechanical reservoir. The symbol *EX<sup>C</sup>* (or, according to some authors, *XC*), in lieu of *M* and *W*, is adopted here to identify the chemical exergy generalized in its physical and chemical meaning as deriving from the combination of useful work and useful mass. The arrow in the superscript means that the interaction enters the system, according to the symbology adopted by Gyftopoulos and Beretta [2].

The Carnot cycle represented in Figure 1 constitutes the rationale for the generalized formulation of chemical exergy; indeed, the isopotential process verifies the equality *MAR* = *WAR* alongside both high and low chemical potential processes where, instead, the chemical potential is constant but the pressure is not; therefore, *WAR* at decreasing pressure constitutes an amount of (chemical) exergy that should be considered a loss of mechanical internal energy since it is released isopotentially to the reservoir while chemical internal energy is transferred from the reservoir to the system at stable equilibrium conditions; those isopotential processes are the result of chemical-to-mechanical and mechanical-tochemical internal energy transformations implying entropy transformation appearing in the equation of generalized chemical exergy:

$$\begin{aligned} EX^{G} &= -\left(W^{AR \leftarrow}\right) - \left(M^{AR \leftarrow}\right) = \Delta U^{SYSTEM} + \Delta U^{RESERVOIR} \\ &= \left(\mathcal{U}\_{1} - \mathcal{U}\_{0}\right) \quad \text{variation of internal energy of the system} \\ &- \sum\_{i=1}^{r} \mu\_{i} \Delta S\_{i}^{C} \quad \text{energy conversion within the system} \\ &- \sum\_{i=1}^{r} \mu\_{i} \Delta S\_{i}^{C,R} \quad \text{chemical energy transfer between system and reservoir} \\ &+ P\_{R} \Delta V^{R} \text{ mechanical energy transfer system} - \text{to} - \text{reservoir} \end{aligned} \tag{50}$$

It is of crucial importance highlighting that the concept of entropy conversion is inherent to the concept of energy conversion occurring in any cyclic process, and, for this very reason, intrinsic to the concept of exergy; hence, entropy conversion occurring along a cyclic process implies the additional term expressing the contribution of the mechanical component to the overall cycle entropy balance and the subsequent exergy balance representing the basis of a property's efficiency and, finally, the performance quantification. Replacing the expressions of chemical exergy *EX<sup>C</sup>* and mechanical exergy *EX<sup>M</sup>* in the above equation of generalized exergy *EXG*, the following equation is derived:

	- +*PR*Δ*VR* mechanical energy transformation loss released to reservoir (51)
	- +*PRVR*(ln *V*<sup>1</sup> − ln *V*0) mechanical energy conversion loss released to reservoir
	- <sup>−</sup> <sup>∑</sup>*<sup>r</sup> <sup>i</sup>*=<sup>1</sup> *<sup>μ</sup>i*,*R*Δ*S<sup>C</sup> <sup>i</sup>* chemical energy transformation loss released to reservoir

The term *PRVR*(ln *V*<sup>1</sup> − ln *V*0) constitutes the "entropic-mechanical" component taking into account the entropy conversion undergone by the system along the conversion cycle (and in particular due to adiabatic processes) and representing a contribution, in addition to the chemical entropy, to the overall cycle balance.

As all properties are additive, the generalized chemical exergy can be stated in the following explicit form:

$$EX^{G} = -\left(W^{AR\leftarrow}\right) - \left(M^{AR\leftarrow}\right)$$

$$+ \left[\left(\mathcal{U} - \mathcal{U}\_{0}\right) - \sum\_{i=1}^{r} \mu\_{i,R} \Delta S\_{i}^{C} + P\_{R} \Delta V\_{R}\right]^{\complement}\tag{52}$$

$$+ \left[\left(\mathcal{U} - \mathcal{U}\_{0}\right) + P\_{R}V\_{R}\left(\ln V\_{1} - \ln V\_{0}\right) - \sum\_{i=1}^{r} \mu\_{i,R} \Delta S\_{i}^{C}\right]^{M}$$

where: the first term, that is the first square parenthesis ("chemical") of the second member of Equation (52), is the contribution relating to the variation of internal energy due to the mass interaction corresponding to the chemical exergy; the second term, that is second square parenthesis ("mechanical") of the second member of Equation (52), is the contribution relating to the variation of internal energy due to the work interaction corresponding to the mechanical exergy; both chemical exergy and mechanical exergy constitute the two components of the generalized chemical exergy along any process. Indeed, as the internal energy is an additive state property, both contributions determined by mass interaction or work interaction with the external system (useful of reservoir), can occur sequentially or simultaneously to connect any pair of thermodynamic states. Hence, the first term constitutes the chemical exergy calculated alongside an isovolumic-isopotential process and the second term constitutes the mechanical exergy calculated alongside an isoentropic-isopotential process.

The meaning of the generalized chemical exergy is highlighted for an adiabatic and esoergonic reversible process for which work interaction only characterizes the thermodynamic state and no mass interaction and no heat interaction occur. This process is determined by absence of chemical entropy and thermal entropy variations (due to absence of mass interaction and heat interaction, respectively) and a non-null variation of mechanical entropy (due to occurring work interaction). As a consequence of the generalized formulation, if this adiabatic process is calculated in terms of exergy, the available energy (in the form of pressure mechanical energy withdrawable from the system) is accounted for in terms of its capability to be converted (and not directly transferred) into useful mass; the consequence is that the exergy analysis implies a lower amount if compared with the canonical method that identifies exergy exclusively with work interaction output conveyed to, and used by, the external system, as it is. In this regard, the entropic-mechanical addendum of the generalized chemical exergy, Equations (28) and (52), determines a reduction due to the work interaction undergoing the (reversible) entropy conversion that makes this work input not useful for a work-to-mass conversion into mass output.

#### **7. Outcomes and Applications**

The domain of applications of the generalized chemical exergy spreads to inorganic and organic chemistry including metabolic biological processes in living organisms. Metabolic processes determine morphological development and homeostasis as well as energetic transduction in living cells and are subdivided into two main categories: (i) catabolic

processes implying the demolition of molecule aggregates and (ii) anabolic processes aimed at building-up proteins, enzymes and other organic substances and precursors. In catabolic processes, such as glycolysis, the chemical energy of glucose is transformed into chemical energy in the form of free enthalpy of adenosine tri-phosphate (ATP) [17]. The glycolysis is subdivided in two phases: (i) storing phase and (ii) releasing phase. The ATP releases chemical energy to the D-glyceraldehide-3-phosphate and is stored in these molecules during the first phase in 5 steps; instead, during the 5 steps of the second phase of glycolysis, the same chemical energy is released back to ATP, NADH and pyruvate which are products of the whole glycolysis catabolic process. The complete glycolysis process encompasses chemical exergy storage and subsequent release and the corresponding mechanical exergy and chemical exergy characterize the bi-directional inverse and direct conversions. Three, out of ten, of these processes (1st, 3rd and 10th), are irreversible and govern the entire series of reactions. The pyruvate undergoes a subsequent aerobiotic oxidation process, followed by the Krebs cycle and ending with the oxidative phosphorylation characterized by the following final oxidation reaction: *NADH* <sup>+</sup> *<sup>H</sup>*<sup>+</sup> <sup>+</sup> 1/2 *<sup>O</sup>*<sup>2</sup> <sup>→</sup> *NAD*<sup>+</sup> <sup>+</sup> *<sup>H</sup>*2*O*. The ATP is used in multiple anabolic processes and the NADH and FADH2, reduced electron transporters, are involved in several metabolic processes [17]. In particular, the ATP is used by living organisms to release mechanical work interaction as chemical exergy output used for locomotion, for food, recovery, defense, reproduction and all other activities needed for life. Using the generalized chemical exergy provides a method to analyze aggregates, such as amino acids, proteins, enzymes and nucleic acids, constituting molecular machines, non-cyclic or cyclic, characterized by phenomena, balances and efficiencies governed by the microscopic thermodynamics at atomic and molecular level [18–21]. In this perspective, a contribution could arise in the direction of researches focusing metabolic paths and cell membrane role [22]. This approach is in use in various diseases already undergoing studies and experimental investigations [23–25].

#### **8. Conclusions**

The main outcome of the procedure described is that the generalized chemical exergy can be expressed by the sum of the two components defined as chemical exergy and mechanical exergy:

$$EX^{\text{CHEMICAL}} = EX^{\text{C}} + EX^{M} = \mathcal{W}^{\text{CONVER}}\_{\text{REV}} + \mathcal{W}^{\text{TRANSF}}\_{\text{REV}} + \mathcal{M}^{\text{CONVER}}\_{\text{REV}} + \mathcal{M}^{\text{TRANSF}}\_{\text{REV}} \tag{53}$$

This does not depend on a particular process adopted for its definition; thus, it can be considered as a general formulation which valid for any process, reversible or irreversible, connecting two different thermodynamic states.

Another outcome is that the generalized chemical exergy is determined by the equality of pressure, in addition to the equality of chemical potential, as a further condition of mutual stable equilibrium between system and reservoir. In the perspective of implications of this additional condition and the generalization to any system (large and small) in any state (equilibrium and non-equilibrium), the concept of generalized chemical exergy would require the reference to a mechanical reservoir behaving at constant pressure in addition to the chemical reservoir.

In the framework of the Gyftopoulos and Beretta perspective, the formulation of chemical entropy can be expressed in the following form adopting the symbol *E* to denote energy and Ω to denote available energy [2]:

$$\left(\left(S\_1 - S\_0\right)^C\right)^C = \frac{1}{\mu\_R} \left[\left(E\_1 - E\_0\right) - \left(\Omega\_1^R - \Omega\_0^R\right)\right]^C \tag{54}$$

where, if the concept of mechanical reservoir is introduced, and the equality of pressure between the system and the mechanical reservoir is considered as an additional condition for mutual stable equilibrium between system and reservoir, it remains valid. The additive property of entropy would lead to assuming that [2,13]:

$$(S\_1 - S\_0)^M = \frac{\overline{R}}{P\_{\mathbb{R}} V\_{\mathbb{R}}} [(E\_1 - E\_0) - \left(\Omega\_1^R - \Omega\_0^R\right)]^M \tag{55}$$

where the mechanical component of entropy would be defined with reference to a mechanical reservoir at constant pressure.

Finally, the additivity of entropy components allows stating the following:

$$\left(\left(\mathcal{S}\_1 - \mathcal{S}\_0\right)^{\mathcal{G}} = \left(\mathcal{S}\_1 - \mathcal{S}\_0\right)^{\mathcal{G}} + \left(\mathcal{S}\_1 - \mathcal{S}\_0\right)^M\tag{56}$$

This should be proved to complete the formulation of generalized entropy which takes into account the general definitions proposed for chemical entropy and mechanical entropy.

As a conclusion of the present research, the methodology adopted has achieved a result for the chemical aspect that can be considered homologous to the result in the procedure already adopted for the thermal aspect and mentioned at the outset of this treatise. The equality of chemical potentials, as a condition of mutual stable equilibrium in addition to the equality of temperature and pressure of the composite system-reservoir, is an important result. Hence, the set of all conditions of mutual stable equilibrium enables establishing a more complete formulation of generalized exergy with the contribution of chemical, thermal and mechanical exergy related to a 'thermo-chemical-mechanical' reservoir. As a consequence, the definition of chemical entropy has been derived in relation with the molecular geometry of any system in any state, including non-equilibrium. In consideration of the importance of thermodynamic methods in chemistry and biology [26–29], different studies and applications have been developed focusing extrema principles and constructal laws [30–32]. In this regard, it would be worth thinking and fostering a line of research aimed at building up a rational and systematic paradigm including thermodynamic and informational aspects both constituting of intrinsic fundamentals of systems and phenomena associated with life.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The author declares no conflict of interest.

#### **Nomenclature**



#### **References**


## *Article* **Simulating Finite-Time Isothermal Processes with Superconducting Quantum Circuits**

**Jin-Fu Chen 1,2, Ying Li <sup>2</sup> and Hui Dong 2,\***


**Abstract:** Finite-time isothermal processes are ubiquitous in quantum-heat-engine cycles, yet complicated due to the coexistence of the changing Hamiltonian and the interaction with the thermal bath. Such complexity prevents classical thermodynamic measurements of a performed work. In this paper, the isothermal process is decomposed into piecewise adiabatic and isochoric processes to measure the performed work as the internal energy change in adiabatic processes. The piecewise control scheme allows the direct simulation of the whole process on a universal quantum computer, which provides a new experimental platform to study quantum thermodynamics. We implement the simulation on ibmqx2 to show the 1/*τ* scaling of the extra work in finite-time isothermal processes.

**Keywords:** quantum thermodynamics; quantum circuit; open quantum system; isothermal process; IBM quantum computer

#### **1. Introduction**

Quantum thermodynamics, originally considered an extension of classical thermodynamics, has sharpened our understanding of the fundamental aspects of thermodynamics [1–6]. Along with the theoretical progress, experimental tests and validations of the principles are relevant in the realm. Simulation of the quantum thermodynamic phenomena [7–10], as one of the experimental efforts, has been intensively explored with specific systems, e.g., a single trapped particle for testing the Jarzynski equation [11,12], the trapped interacting Fermi gas for quantum work extraction [13,14], and the superconducting qubits for the shortcuts to adiabaticity [15,16]. These specific systems often have limited functions to test generic quantum thermodynamic properties. In quantum thermodynamics, the concerned system, as an open quantum system, generally evolves with the coupling to the environment. Simulations of open quantum systems have been proposed theoretically in terms of quantum channels [17–21], and realized experimentally on various systems, e.g., trapped ions [22], photons [23], nuclear spins [24], superconducting qubits [25], and IBM quantum computer recently[26,27]. The previous works mainly focus on simulating fixed open quantum systems, where the parameters of the systems are fixed with the evolution governed by a time-independent master equation. To devise a quantum heat engine, it is necessary to realize tuned open quantum systems to formulate finite-time isothermal processes.

Simulation with generic quantum computing systems shall offer a universal system to demonstrate essential quantum thermodynamic phenomena. Yet, simulation of a tuned open quantum system remains a challenge mainly due to the inability to physically tune the control parameters and the difficulty to measure the work extraction. In quantum thermodynamics, the work extraction, as a fundamental quantity [28–30], requires the tuning of the control parameters. Such requirement is achievable in the specifically designed system, e.g., the laser-induced force on the trapped ion [11], the trapped frequency of the Fermi gas [13,14], and the external field in the superconducting system [15,16]. However, on a

**Citation:** Chen, J.-F.; Li, Y.; Dong, H. Simulating Finite-Time Isothermal Processes with Superconducting Quantum Circuits. *Entropy* **2021**, *23*, 353. https://doi.org/10.3390/ e23030353

Academic Editor: Michel Feidt

Received: 9 February 2021 Accepted: 12 March 2021 Published: 16 March 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

universal quantum computer, e.g., IBM quantum computer (ibmqx2), the user is forbidden to tune the actual physical parameters since the parameters have been optimized to reduce errors. An additional problem is the measurement of the work extraction. In classical thermodynamics, it is obtained by recording the control parameters and measuring the conjugate quantities, but such measurement is not suitable in the quantum region [31].

In this paper, an experimental proposal is given to overcome the difficulty in simulating a finite-time isothermal process. We introduce a virtual way to tune the control parameters, i.e., without physically tuning the parameters. The dynamics are realized by quantum gates encoded the parameter change. As a demonstration, we realize the simulation of a two-level system on ibmqx2 [32] for the isothermal processes, which are fundamental to devise quantum heat engines, yet complicated due to the coexistence of the changing Hamiltonian and the interaction with the thermal bath.

To implement the simulation on a universal quantum computer, we adopt a discretestep method to approach the quantum isothermal process [33–38]: the isothermal process is divided into series of elementary processes, each consisting of an adiabatic process and an isochoric process. In the adiabatic process, the parameter tuning is performed virtually with the unitary evolution implemented by quantum gates. In the isochoric process, the dissipative evolution is carried out with quantum channel simulation [23,25,39–42] with ancillary qubits, which play the role of the environments[18,21,26]. With this approach, we achieve the simulation of the isothermal process on the generic quantum computing system without physically tuning the control parameters. The piecewise control scheme distinguishes work and heat, which are separately generated and measured as the internal energy change in the two processes. In the current simulation, the energy spacing of the two-level system is tuned with the unchanged ground and excited states. The tuning of the energy spacing is virtually performed via modulating the thermal transition rate in the isochoric process.

In our proposal, the simulation with a universal quantum computer brings clear advantages. First, *the arbitrary change of the control parameters* is archived by the virtual tuning via the simulation of corresponding dynamics, avoiding the difficulty in tuning the actual physical system. In turn, the parameters can be controlled to follow an arbitrary designed function. Second, we can realize *the immediate change of environmental parameters*, such as the temperature. The effect of the bath is reflected through the state of the auxiliary qubits, which can be controlled flexibly with quantum gates.

#### **2. Discrete-Step Method to Quantum Isothermal Process**

In quantum thermodynamics, the concerned system generally evolves under the changing Hamiltonian while in contact with a thermal bath. The interplay between quantum work and heat challenges to characterize the quantum thermodynamic cycle on the microscopic level, where the classical method to measure the work via force and distance, is not applicable [31]. For the timescale of the tuning far smaller than the thermal bath response time, the evolution is thermodynamic adiabatic, where the heat exchange with the thermal bath can be neglected, and the internal energy changes due to the performed work through the changing control field. The opposite extreme case with the unchanged control parameters is known as the isochoric process, where the internal energy changes are induced by the heat exchange with the thermal bath. Therefore, work and heat are separated clearly in the adiabatic and isochoric processes, and are obtained directly by measuring the internal energy change.

To simulate the general processes on a universal quantum computer, a piecewise control scheme is necessary to express the continuous non-unitary evolution in terms of quantum channels, where the evolution in each period is constructed by the simulations of open quantum systems [21]. To separate work and heat, we adopt the discrete-step method by dividing the whole process into series of piecewise adiabatic and isochoric processes [33–38]. In Figure 1, the discrete-step method is illustrated with the minimal quantum model, a two-level system with the energy spacing *ω*(*t*) between the ground state


**Figure 1.** Simulation of the isothermal process on the superconducting quantum computer. The finite-time isothermal process is divided into series of piecewise adiabatic and isochoric processes. In the adiabatic process, the energy of the two-level system is tuned with the switched-off interaction between the system and the thermal bath. In the isochoric process, the interaction is switched on with the unchanged energy spacing *ωj*. One qubit represents the simulated two-level system, and the ancillary qubits play the role of the thermal bath at the temperature *T*. After implementing the quantum circuit, the system qubit is measured to obtain the internal energy.

The state of the two-level system is represented by the density matrix *ρs*(*t*) of the system qubit, and the thermal bath is simulated by ancillary qubits. Initially, the system qubit is prepared to the thermal state *ρs*(0) at the temperature *T*. The evolution of the tuned open quantum system is implemented with single-qubit and two-qubit quantum gates. The internal energy of the two-level system is *E*(*t*) = *ω*(*t*)*pe*(*t*), where the energy of the ground state is assumed as zero, and the population in the ground (excited) state is *pg*(*t*) = *g*|*ρs*(*t*)|*g* (*pe*(*t*) = *e*|*ρs*(*t*)|*e*).

For the system to be simulated, we use the discrete-step method to approach the finite-time isothermal process for the two-level system. The discrete isothermal process contains *N* steps of elementary processes with the total operation time *τ* + *τ*adi, where *τ* (*τ*adi) denotes the operation time in the isochoric (adiabatic) process. Each elementary process is composed of an adiabatic and an isochoric processes. We set the equal operation time for every elementary process *δτ* = (*τ* + *τ*adi)/*N*, with the duration *τ*/*N* (*τ*adi/*N*) for each isochoric (adiabatic) process.

In the adiabatic process, the system is isolated from the thermal bath and evolves under the time-dependent Hamiltonian. Such a process is described by a unitary evolution with the time *τ*adi/*N*. The performed work is determined by the change of the internal energy at the initial and the final time. For a generic adiabatic process, the unitary evolution of the system can be simulated with the single-qubit gate acted on the system qubit. In this paper, we consider the adiabatic process as the quench with zero time *τ*adi = 0, occurred at time *tj*−<sup>1</sup> = (*j* − 1)*δτ*, *j* = 1, 2, ..., *N*. As the result of the quench, the energy spacing is shifted from *ωj*−<sup>1</sup> to *ωj*, while the density matrix *ρs*(*tj*−1) remains unchanged after the quench. At the initial time *t*<sup>0</sup> = 0, the energy is quenched from *ω*<sup>0</sup> to *ω*<sup>1</sup> after the initial preparation. The performed work for the quench at time *tj*−<sup>1</sup> reads

$$\mathcal{W}\_{\mathbf{j}} = (\omega\_{\mathbf{j}} - \omega\_{\mathbf{j}-1}) p\_{\mathfrak{e}}(\mathfrak{t}\_{\mathbf{j}-1}).\tag{1}$$

To obtain the performed work, we only need to measure the excited state population *pe*(*tj*−1) of the system qubit at the beginning of each isochoric process.

In the isochoric process of the *j*-th elementary process (*tj*−<sup>1</sup> < *t* ≤ *tj*), the two-level system is brought into contact with the thermal bath at the temperature *T*. The evolution is given by the master equation

$$\begin{aligned} \rho\_s &= -i[H\_{\dot{\prime}}, \rho\_s] + \gamma\_0 N\_{\dot{\prime}} \mathcal{E}^\circ(\sigma\_+) [\rho\_s] \\ &+ \gamma\_0 (N\_{\dot{\prime}} + 1) \mathcal{E}^\circ(\sigma\_-) [\rho\_s], \end{aligned} \tag{2}$$

with

$$
\mathcal{L}^{\rho}(\sigma)[\rho\_{\sf s}] = \sigma \rho\_{\sf s} \sigma^{\sf t} - \frac{1}{2} \sigma^{\sf t} \sigma \rho\_{\sf s} - \frac{1}{2} \rho\_{\sf s} \sigma^{\sf t} \sigma. \tag{3}
$$

Here, *Hj* = *ωj*|*ee*| is the Hamiltonian of the system during the period *tj*−<sup>1</sup> < *t* ≤ *tj*, *Nj* = 1/[exp(*βωj*) − 1] is the average photon number with the inverse temperature *β* = 1/(*k*B*T*), and *σ*<sup>+</sup> = |*eg*| (*σ*<sup>−</sup> = |*ge*|) is the transition operator. In this process, the change of the internal energy is induced by the heat exchange with the thermal bath, and no work is performed. During the whole discrete isothermal process, the work is only performed at the time *tj*.

We explicitly give the equations for each element of the density matrix according to Equation (2). The populations in the ground and excited states satisfy

$$
\dot{p}\_{\mathcal{S}} = \gamma\_0 (N\_{\dot{\mathcal{Y}}} + 1) p\_{\mathcal{C}} - \gamma\_0 N\_{\dot{\mathcal{Y}}} p\_{\mathcal{S}'} \tag{4}
$$

and *pe* = 1− *pg*. The off-diagonal elements *ρeg*(*t*) = *e*|*ρs*(*t*)|*g* and *ρge*(*t*) = *g*|*ρs*(*t*)|*e* satisfy

$$
\rho\_{\mathfrak{E}\mathfrak{F}} = -i\omega\_{\mathfrak{I}}\rho\_{\mathfrak{E}\mathfrak{F}} - \gamma\_0(2N\_{\mathfrak{I}} + 1)\rho\_{\mathfrak{E}\mathfrak{F}} \tag{5}
$$

and *ρge*(*t*) = *ρ*<sup>∗</sup> *eg*(*t*). With the unchanged energy eigenstates, the diagonal and the off-diagonal elements of the density matrix evolve separately during the whole isothermal process.

#### **3. Simulation with Quantum Circuits**

In this section, we first show the simulation of one elementary process in the circuit. The simulation is formulated for the adiabatic and the isochoric processes as follows.

**Adiabatic process**. In the superconducting quantum computer, e.g., IBM Q system, the tuning of the physical energy levels of qubits is unavailable for the users. The physical parameters are fixed at the optimal values to possibly reduce noises and errors induced by decoherence and imperfect control.

We consider the Hamiltonian of the simulated two-level system as *H*(*t*) = *ω*(*t*)|*ee*| with the piecewise tuned energy spacing

$$
\omega(t) = \omega\_{j\prime} \quad t\_{j-1} < t \le t\_j \text{ with } j = 1, 2..., N. \tag{6}
$$

We will show that the tuning of the energy spacing *ω*(*t*) only affects the thermal transition rate. In the simulation, the thermal transition is simulated through the quantum channel simulation, and can be flexibly modulated by single-qubit gates acted on the ancillary qubits. Therefore, we do not have to physically tune any parameters of the quantum computer, and just algorithmically modulate the simulated thermal transition instead. We propose a virtual tuning of the energy spacing with details explained as follows.

In the virtual process, we need to simulate the unitary evolution of the adiabatic process with single-qubit gates acted on the system qubit. For the adiabatic process, i.e., the quench, the state of the system does not evolve in a short period. We just pretend that the energy of the simulated system is tuned from *ωj*−<sup>1</sup> to *ω<sup>j</sup>* in the *j*-th adiabatic process. This virtual tuning of the energy is reflected by the modulation of the transition rate in the simulation of the isochoric process.

**Isochoric process**. The dynamical evolution of the isochoric process can be simulated with the generalized amplitude damping channel (GADC)

$$
\rho\_s(t\_j) = \mathcal{E}\_{\text{GAP}}^{(j)}[e^{-iH\_j\delta\tau}\rho\_s(t\_{j-1})e^{iH\_j\delta\tau}],\tag{7}
$$

where <sup>E</sup> (*j*) GAD = *p* (*j*) <sup>↓</sup> <sup>E</sup> (*j*) <sup>↓</sup> <sup>+</sup> *<sup>p</sup>* (*j*) <sup>↑</sup> <sup>E</sup> (*j*) <sup>↑</sup> is divided into two sub-channels, the amplitude damping channel

$$\mathcal{A}\_{\downarrow}^{(j)}[\rho\_s] = \mathcal{M}\_0^{(j)} \rho\_s \mathcal{M}\_0^{(j)\dagger} + \mathcal{M}\_1^{(j)} \rho\_s \mathcal{M}\_1^{(j)\dagger} \,. \tag{8}$$

and the amplitude pumping channel

$$\mathcal{A}\_{\uparrow}^{(j)}[\rho\_s] = M\_2^{(j)} \rho\_s M\_2^{(j)\dagger} + M\_3^{(j)} \rho\_s M\_3^{(j)\dagger}.\tag{9}$$

The corresponding Kraus operators are *<sup>M</sup>*(*j*) <sup>0</sup> <sup>=</sup> cos *<sup>θ</sup>j*|*ee*<sup>|</sup> <sup>+</sup> <sup>|</sup>*gg*|, *<sup>M</sup>*(*j*) <sup>1</sup> = *σ*<sup>−</sup> sin *θj*, *<sup>M</sup>*(*j*) <sup>2</sup> <sup>=</sup> <sup>|</sup>*ee*<sup>|</sup> <sup>+</sup> cos *<sup>θ</sup>j*|*gg*<sup>|</sup> and *<sup>M</sup>*(*j*) <sup>3</sup> = *σ*<sup>+</sup> sin *θj*. The coefficient *p* (*j*) <sup>↑</sup> <sup>=</sup> 1/[exp(*βωj*) + <sup>1</sup>] (*p* (*j*) <sup>↓</sup> <sup>=</sup> <sup>1</sup> <sup>−</sup> *<sup>p</sup>* (*j*) <sup>↑</sup> ) shows the probability of excitation (de-excitation) of the two-level system induced by the thermal bath. The evolution time of the *j*-th elementary process is encoded in the control parameter *θ<sup>j</sup>* via

$$\cos\theta\_{\dot{\jmath}} = \exp[-\frac{\gamma\_0 \delta \tau}{2} \coth(\frac{\beta \omega\_{\dot{\jmath}}}{2})].\tag{10}$$

With infinite operation time, the ideal discrete isothermal process is realized by setting *θ<sup>j</sup>* = *π*/2, where the system reaches thermal equilibrium at the end of each isochoric process. For the initial thermal state *ρs*(0) = exp(−*βH*(0))/Tr[exp(−*βH*(0))], the off-diagonal

element remains zero throughout the whole process in the current control scheme. In this situation, the evolution by Equation (7) is simplified as

$$
\rho\_s(t\_j) = \mathcal{d}\_{\text{GAD}}^{(j)}[\rho\_s(t\_{j-1})].\tag{11}
$$

For an initial state with non-zero off-diagonal elements, the off-diagonal elements does not affect the evolution of the populations. This comes from the fact that the diagonal and the off-diagonal elements satisfy separate differential equations by Equations (4) and (5).

Figure 2 shows the quantum circuit to simulate the isochoric process. The two subchannels <sup>E</sup> (*j*) <sup>↓</sup> and <sup>E</sup> (*j*) <sup>↑</sup> are realized with an ancillary qubit initially prepared in the ground state. The circuits for these two sub-channels are illustrated in Figure 2a. The meaning of each gate is explained at the bottom of Figure 2. Such simulation circuits are extensively studied in the field of quantum computing and quantum information that we will not explain the setup in detail [40].

To achieve the random selection of the two sub-channels, we design two simulation methods, the hybrid simulation, and the fully quantum simulation, as shown in Figure 2b,c, respectively. The former uses one ancillary qubit for each elementary process under the assist of a classical random number generator (CRNG). The latter utilizes fully quantum circuits with two ancillary qubits for each elementary process. In Table 1, we summarize the simulation procedure for the adiabatic and the isochoric processes.

**Figure 2.** The quantum circuits in one elementary process. (**a**) The amplitude damping (pumping) channel <sup>E</sup> (*j*) <sup>↓</sup> (<sup>E</sup> (*j*) <sup>↑</sup> ) in the hybrid simulation. (**b**) One elementary process in the hybrid simulation. The selection of the two sub-channels is realized by the classical random number generator. (**c**) One elementary process in the fully quantum simulation. The selection of the two sub-channels is assisted by another ancillary qubit. (**d**) Instruction of gates in the current simulation.

**Table 1.** The discrete isothermal process to be simulated and the two simulation methods, the hybrid simulation and the fully quantum simulation


#### *3.1. Hybrid Simulation of Isochoric Process with Classical Random Number Generator (CRNG)*

With the limited number of qubits, it is desirable to reduce the unnecessary usage of qubits. For the quantum channel of the system qubit, one ancillary qubit is inevitably needed to simulate the non-unitary evolution of the open quantum system [42]. In this method, one qubit represents the two-level system, and each elementary process adds one more ancillary qubit. Therefore, it requires *N* + 1 qubits to simulate the *N*-step isothermal process.

In the hybrid simulation, the CRNG is used to select the sub-channel <sup>O</sup>[*l*] *<sup>j</sup>* <sup>=</sup> <sup>E</sup> (*j*) <sup>↑</sup> or <sup>E</sup> (*j*) <sup>↓</sup> for the isochoric process in the *<sup>j</sup>*-th elementary process, as shown in Figure 2b. *<sup>l</sup>* denotes the *l*-th simulation of the discrete isothermal process. For each isochoric process, the CRNG generates a random number *r* [*l*] *<sup>j</sup>* <sup>∈</sup> [0, 1] with uniform distribution. The sub-channel <sup>O</sup>[*l*] *<sup>j</sup>* is selected as <sup>E</sup> (*j*) <sup>↓</sup> (<sup>E</sup> (*j*) <sup>↑</sup> ) when the random number satisfies *<sup>r</sup>* [*l*] *<sup>j</sup>* ≤ *p* (*j*) <sup>↓</sup> (*<sup>r</sup>* [*l*] *<sup>j</sup>* > *p* (*j*) <sup>↓</sup> ).

#### *3.2. Fully Quantum Simulation of Isochoric Process*

For the system with adequate available qubits, the selection of the two sub-channels can be realized on fully quantum circuit by adding two ancillary qubits for each elementary process, as shown in Figure 2c. In each step, one more ancillary qubit is used, prepared to the super-position state cos(*αj*/2)|0 + *i* sin(*αj*/2)|1 through the *Rx*(*αj*) gate with cos(*αj*/2) =  *p* (*j*) <sup>↓</sup> . This method requires 2*<sup>N</sup>* <sup>+</sup> 1 qubits to simulate the *<sup>N</sup>*-step isothermal process.

Currently, we have solved the problem of separating work and heat. The unitary evolution of the adiabatic process requires isolation from the environment, while the isochoric process needs contact with the environment. Switching on and off the interaction with the thermal bath is complicated and requires enormous efforts, especially in the quantum region for a microscopic system. Fortunately, the design of the quantum computer with a long coherent time ensures the isolation from the environment. The simulation of the quantum channel is designed to simulate the effect of the environment. The advantage of quantum channel simulation over the real coupling to the environment is the flexibility to tune the control parameters, e.g., the temperature, the coupling strength, et al.

The whole evolution of the isothermal process is realized by merging the circuit of each elementary process. In Figure 3, the circuit for the two-step isothermal process is shown as an example. Figure 3a shows the excited state population *pe*(*t*) with the tuned energy spacing *ω*(*t*) in a two-step isothermal process. The energy spacing is increased from *ω*<sup>0</sup> to *ω*<sup>2</sup> in two steps, while the excited state population decreases from *p*<sup>0</sup> to *p*2.

**Figure 3.** The circuit of the two-step isothermal process on ibmqx2. (**a**) Excited state populationenergy (*pe* − *E*) diagram. (**b**) The circuit for the hybrid simulation. In each elementary process, the X gate is (or not) implemented for the sub-channel selected as the amplitude pumping (damping) channel according to the classical random number. Each elementary process requires another ancillary qubit. (**c**) The circuit for the fully quantum simulation. Each elementary requires two ancillary qubits.

Figure 3b shows the quantum circuit for the hybrid simulation on ibmqx2. With the five qubits, it is feasible to simulate a four-step isothermal process on ibmqx2. Due to the limited qubit number, the initial state is prepared as a pure state to mimic the thermal state in the current simulation. The populations in the energy eigenstates of the pure state is equal to those of the thermal state, while the non-zero off-diagonal elements lead to the coherence as the superposition of the excited and the ground states. As stated in the description of the isochoric process, such coherence does not affect the evolution of the populations. With another ancillary qubit, a thermal state of the two-level system can be initially prepared through the entanglement between the system and the ancillary qubit.

In the hybrid simulation, the sub-channel <sup>O</sup>[*l*] *<sup>j</sup>* of each elementary process is selected as either the amplitude damping <sup>E</sup> (*j*) <sup>↓</sup> or the pumping one <sup>E</sup> (*j*) <sup>↑</sup> . For an *<sup>N</sup>*-step isothermal process, there are 2*<sup>N</sup>* selections of the sub-channels {O[*l*] <sup>1</sup> , <sup>O</sup>[*l*] <sup>2</sup> , ..., <sup>O</sup>[*l*] *<sup>j</sup>* , ...O[*l*] *<sup>N</sup>* }. The circuit of each selection with *N* = 2, 3 and 4 is implemented on ibmqx2. For each selection, the excited state population *p* [*l*] *<sup>e</sup>* (*tj*) at each step is obtained by repeated implementations of the corresponding circuit. The work in each selection, namely the microscopic work, is given by

$$\mathcal{W}^{[l]} = \sum\_{j=1}^{N} (\omega\_j - \omega\_{j-1}) p\_c^{[l]}(t\_{j-1}).\tag{12}$$

The performed work *W* of the whole process is the average of the microscopic work *W*[*l*] .

Figure 3c shows the fully quantum simulation realized on ibmqx2. With the five qubits, it is possible to realize at most two-step isothermal process, since the qubit resetting process is not permitted on ibmqx2. In the fully quantum simulation, the same circuit is implemented repetitively, and the excited state population *pe*(*tj*) is obtained by measuring the state of the system qubit. The performed work for the simulated system is given by

$$\overline{\mathcal{W}} = \sum\_{j=1}^{N} (\omega\_j - \omega\_{j-1}) p\_\ell(t\_{j-1}).\tag{13}$$

Since ibmqx2 does not allow the user to reset the state of the qubit, each elementary process requires new ancillary qubit(s). With the ability to reset the ancillary qubit, two (three) qubits are enough to complete the simulation with the hybrid simulation (fully quantum simulation) by resetting the ancillary qubit(s) at the end of each isochoric process. This control scheme is realized in Ref. [25] to simulate repetitive quantum channels on a single qubit.

#### **4. Testing** 1/*τ* **Scaling of Extra Work**

One possible application of the thermodynamic simulation is to test the 1/*τ* scaling of the extra work, where *τ* indicates the operation time of the finite-time isothermal process. In equilibrium thermodynamics, the performed work for a quasi-static isothermal process is equal to the change of the free energy Δ*F* [43]. The quasi-static isothermal process requires infinite time to ensure equilibrium at every moment. For a real isothermal process, irreversibility arises accompanied with the extra work. For a fixed control scheme, it is proved that the extra work decreases inverse proportional to the operation time at the long-time limit [44–47]. Such 1/*τ* scaling has been verified for the compression of dry air in the experiment [48].

The superconducting quantum circuit provides an experimental platform to study quantum thermodynamics. We demonstrate the scaling behavior of the extra work in finite-time isothermal process can be observed with the current experimental proposal. Here, the parameters of the simulated two-level system are chosen as *γ*<sup>0</sup> = 1 and *β* = 1 for convenience. The energy spacing is tuned from *ω*<sup>0</sup> = 1 to *ω<sup>N</sup>* = 2 in *N* steps of elementary processes.

In Figure 4, the 1/*N* scaling of the extra work is shown with the ibmqx2 simulation results (Supplementary Materials) for different operation time *δτ* = 0.5 (blue dashed curve) and 10 (red solid curve). For large step number *N*, it is observed that the extra work is inverse proportional to the step number as *W* − Δ*F* ∝ 1/*N* [33,37,38]. The free energy

difference of the final and the initial state, namely the performed work in the quasi-static isothermal process is

$$
\Delta F = \omega\_N - \omega\_0 - k\_\text{B} T \ln \frac{1 + e^{\beta \omega\_N}}{1 + e^{\beta \omega\_0}}.\tag{14}
$$

With the chosen values of the parameters, the explicit value of the free energy difference is Δ*F* = 0.186. Since the total operation time is *τ* = *Nδτ*, the 1/*N* scaling is consistent with the 1/*τ* scaling of the extra work in finite-time isothermal processes. The discrete isothermal processes are simulated on ibmqx2 for *N* = 2, 3 and 4 with the hybrid simulation (empty squares) and *N* = 2 with the fully quantum simulation (pentagrams).

**Figure 4.** 1/*N* scaling of the extra work for the discrete isothermal process. The operation time of each isochoric process is set as *δτ* = 0.5 (blue dashed curve) or 10 (red solid curve). The ibmqx2 simulation results for *N* = 2, 3 and 4 are plotted. The empty squares present the results by the hybrid simulations, and the pentagrams for the fully quantum simulation. The 1/*N* scaling is shown by the solid black curve.

Figure 5 compares the simulation results on ibmqx2 and the numerical results. In (a) and (b), the work distribution of the hybrid simulation results (blue solid line) is compared to the exact numerical results (gray dashed line), with the operation time *δτ* = 0.5 in (a) and *δτ* = 10 in (b). For the hybrid simulation on ibmqx2, the maximum step number is *N* = 4 with the five qubits. To mimic the random selection of the sub-channel, we simulate every possible selection of the sub-channels in the isochoric processes and measure the state populations of the system qubit. For each selection, the corresponding circuit is implemented on ibmqx2 for 8192 shots. The average work is obtained by summing the work in each selection with the corresponding probability *<sup>p</sup>*{*Kj*} = <sup>∏</sup>*<sup>j</sup> <sup>p</sup>* (*j*) *Kj* (*Kj* =↑ or ↓). If the random selections of the sub-channels are possible, *p*{*Kj*} should be determined by the CRNG. Yet, here the probability of the selection *p*{*Kj*} is not implemented in the experiment but calculated with *p* (*j*) *Kj* since the random selection of the two sub-channels cannot be implemented on ibmqx2.

Figure 5c,d show the excited state population of the system qubit for the fully quantum simulation of two-step isothermal process on ibmqx2. The operation time of each isochoric process is *δτ* = 0.5 in (c) and *δτ* = 10 in (d). The excited state populations *pe*(*tj*) at *tj* = 0, *δτ* and 2*δτ* are obtained by implementing 40960 shots of the corresponding circuits. Compared to those of the numerical result (gray bar), the ibmqx2 simulation results (blue bar) are larger, since the noises in the quantum computer generally lead to a more mixed

state. At the end *t* = 2*δτ* of the process, the most quantum gates are used, and the absolute error reaches about 0.05. The fidelity between the simulation and the numerical results *<sup>F</sup>*(*t*) =  *p* (num) *<sup>g</sup>* (*t*)*p* (sim) *<sup>g</sup>* (*t*) +  *p* (num) *<sup>e</sup>* (*t*)*<sup>p</sup>* (sim) *<sup>e</sup>* (*t*) is explicitly *<sup>F</sup>*(2*δτ*) = 0.998 and 0.999 for the second step *t* = 2*δτ* in (c) and (d), respectively.

**Figure 5.** Comparison of the ibmqx2 simulation and the numerical results. (**a**,**b**) show the microscopic work in the hybrid simulation with the step number *N* = 2, 3 and 4. The ibmqx2 simulation result (blue solid line) is compared with the numerical result (gray dashed line). (**c**,**d**) show the excited state population *pe*(*t*) at each step in the fully quantum simulation of the two-step isothermal process. The ibmqx2 simulation results (blue bar) are compared to the numerical results (gray bar).

The performed work in both the hybrid simulation and the fully quantum simulation is obtained according to Equations (12) and (13), as listed in Table 2. In Figure 4, the extra work in the ibmqx2 simulation results exceeds that of the numerical result due to the accumulated error in long circuits. The error mainly comes from the two-qubit gates, since the error probability in two-qubit gates (from 1.344 <sup>×</sup> <sup>10</sup>−<sup>2</sup> to 1.720 <sup>×</sup> <sup>10</sup><sup>−</sup>2) greatly exceeds that of single-qubit gates (from 3.246 <sup>×</sup> <sup>10</sup>−<sup>4</sup> to 2.164 <sup>×</sup> <sup>10</sup><sup>−</sup>3) [32]. The computing accuracy might be improved by using either quantum error correction or quantum mitigation [49]. Limited to the precision of operation on ibmqx2, the results deviate from the theoretical expectations.


**Table 2.** The performed work obtained by the ibmqx2 simulation and the numerical results.

The current simulation scheme have only considered the commutative Hamiltonian at different steps [*H*(*tj*), *H*(*tj*)] = 0 and the adiabatic process as the quench with zero time *δτ*adi = 0. It can also be generalized to the discrete isothermal process with finite-time adiabatic processes, where the effect of the non-commutative Hamiltonian will increase the extra work [50]. For a generic adiabatic process, the unitary evolution of the twolevel system should be simulated with the single-qubit gates on the system qubit. The off-diagonal elements of the initial density matrix cannot be neglected, since the changing ground and excited states lead to the interplay between the off-diagonal elements and the populations. Besides, the current simulation can be simplified for the ideal discrete isothermal process, where the perfect thermalization of the isochoric processes allows simulating each elementary process separately by preparing the equilibrium states at the beginning of the adiabatic processes [38].

With the limited number of qubits, we only show a few data points in Figure 4. It requires either more usable qubits or the ability of resetting to simulate the discrete isothermal process with a larger step number *N* in experiment. Another topic is to test the optimal control scheme [36]. For the given operation time *τ*, the control scheme is optimized to reach the minimum extra work. The lower bound of the extra work is related to the thermodynamic length [44,46,51,52], which endows a Riemann metric on the control parameter space. The current experimental proposal might also be utilized to measure the thermodynamic length of the isothermal process for the two-level system.

#### **5. Conclusions**

We show an experimental proposal to simulate the finite-time isothermal process of the two-level system with the superconducting quantum circuits. Two methods, the hybrid simulation, and the fully quantum simulation, are proposed to realize the generalized amplitude damping channel. Assisted by the classical random number generator or the quantum superposition, the hybrid or the fully quantum simulation can simulate an *N*-step isothermal process with *N* + 1 or 2*N* + 1 qubits, respectively.

We have used the quantum computer of IBM (ibmqx2) to demonstrate the simulation of the discrete isothermal processes, which have been realized for four steps with the hybrid simulation and two steps with the fully quantum simulation. If more steps of elementary processes can be realized experimentally, the 1/*τ* scaling of the extra work can be tested by the thermodynamic simulation on the universal quantum computer.

**Supplementary Materials:** The following are available online at https://www.mdpi.com/1099-430 0/23/3/353/s1 for the experimental data on ibmqx2.

**Author Contributions:** All authors contribute to designing the protocol and writing the paper. J.-F.C. performed the experiments. J.-F.C. and H.D. performed analytical calculations and analyzed data. H.D. conceived the project through discussion with Y.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** We thank Luyan Sun for helpful discussions at the initial stage of the current work and C. P. Sun for helpful comments. This work is supported by the NSFC (Grants No. 11534002, No. 11875049 and No. 11875050), the NSAF (Grant No. U1930403 and No. U1930402), and the National Basic Research Program of China (Grants No. 2016YFA0301201).

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no competing interest.

#### **References**


MDPI St. Alban-Anlage 66 4052 Basel Switzerland Tel. +41 61 683 77 34 Fax +41 61 302 89 18 www.mdpi.com

*Entropy* Editorial Office E-mail: entropy@mdpi.com www.mdpi.com/journal/entropy

MDPI St. Alban-Anlage 66 4052 Basel Switzerland

Tel: +41 61 683 77 34 Fax: +41 61 302 89 18

www.mdpi.com

ISBN 978-3-0365-3261-5