{'fraction_non_alphanumeric': 0.03585130872197118, 'fraction_numerical': 0.01074260380254071, 'mean_word_length': 4.680145278450363, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Thermodynamic aspects of nanoscale friction

Developing the non-equilibrium thermodynamics of friction is required for systematic design of low friction surfaces for a broad range of technological applications. Intuitively, the thermodynamic work done by a material sliding along a surface is expected to be partially dissipated as heat and partially transformed into the change of the internal energy of the system. However, general non-equilibrium thermodynamic principles governing this separation are presently unknown. We develop a theoretical framework based on the transition state theory combined with the conventional Prandtl-Tomlinson model, allowing to set explicit expressions for evaluating the heat dissipation and internal energy change produced during the frictional stick-slip motion of a tip of a typical friction force microscope (FFM). We use the formalism to quantify the heat dissipation for a range of parameters relevant to materials in practical applications of nanoscale friction.


I. INTRODUCTION
The phenomenon of mechanical friction between two materials is a paradigmatic example of out-of-equilibrium behaviour manifested by energy dissipation, memory effects, and hysteresis. At the mesoscopic level of nanoscale friction, thermal and structural fluctuations play a dominant role and typically lead to broad spectra of characteristic timescales of the underlying relaxation processes. Although the non-equilibrium thermodynamics has been considered for describing the friction and wear processes occurring at macroscopic scales [1,2], it remains unexplored for the fluctuation-driven nanoscale friction. Its development would be a stepping-stone towards the improved optimisation of friction losses in nano-tribological applications [3], and is the main subject of the present study.
An example is the thermally activated stick-slip motion observed during dry friction characterised by the slow process of the mutual 'stick' of two material surfaces and the fast 'slip' process associated with the transient reorganisation of their relative surface atomic configurations [3]. Stick-slip mechanism of friction has been studied by friction force microscopy (FFM), which allowed quantifying its dependence on the temperature. This led to the discovery of thermolubricity at high temperatures [4][5][6][7], understanding the effect of humidity and oxidation in metals [8], or revealing positive [4,5,[9][10][11][12][13][14][15][16] or negative [4,5] logarithmic velocity dependence of friction in a selected temperature range. A thermodynamic description of the nanoscale stick-slip motion has been considered recently using the Langevin dynamics-based description of friction [17,18]. The principle inherently relies on the fact that information about the heat and work is naturally contained in the fluctuating trajectory followed by the FFM tip during its sliding motion along the material surface, and could be extracted from it through appropriate thermodynamically consistent mathematical framework applicable to fluctuating systems. Such a general mathematical framework, which allows to systematically quantify the irreversible processes occurring in nanoscale systems driven by thermal fluctuations, has been developed recently and is referred to as modern stochastic thermodynamics [19][20][21].
In this article we build on the earlier work [17,18] from the perspective of the stochastic thermodynamics, and derive explicit expressions for entropy, which directly allow evaluating the heat produced in the system and heat transferred into the environment during the stickslip friction process. We show that these expressions are consistent with the first thermodynamic law relating the thermodynamic work and internal system energy. Our analysis is based on the one-dimensional Prandlt-Tomlinson model as the simplest model of a single asperity friction and includes thermal activation through the Kramers transition state theory [3,[22][23][24]. This leads to the description of the thermally activated friction process via a system of coupled ordinary differential equations for state (asperity) probabilities, which allows applying the concepts of the stochastic thermodynamics to evaluate the individual thermodynamic variables. The formalism is then applied to quantify the heat produced during friction processes at different temperatures, sliding velocities, and energy potentials.

II. MODEL
We first overview the formalism and introduce the terminology essential for the development of the thermodynamic formalism in subsequent sections. The onedimensional Prandtl-Tomlinson model describes a tip sliding in one direction on a static substrate as illustrated in FIG. 1. The model is defined by the following potential energy function: The variable x = x(t) describes the position of a tip at the time t. The first term in Eq. (1) corresponds to the energy of substrate-tip interaction, where E 0 is the interaction strength and a the spacing between the surface atoms. The second term corresponds to the elastic energy of the cantilever dragging the tip at a constant velocity V , where C is the elastic energy constant in the x-direction. The total force acting on the tip at the po- Eq. (2a) defines the force due to the substrate-tip interaction and Eq. (2b) the elastic force exerted on the tip by the cantilever, respectively. Stable states m of the system are defined as the tip positions x m (t) for which the total restoring force is zero, i.e. f tot = 0, and correspond to the local energy minima in Eq. (1) defining the state energies denoted as u m (t) = u(x m , t). These states identify the positions accommodating the tip in the absence of external driving and thermal fluctuations. Global energy minimisation of Eq. (1) at a given time t allows to identify all available states m = 1, . . . , M . The total number of states M may vary in time, depending on the values of E 0 , a, and C.
Thermally activated dynamics. For the purpose of this study, we adopt the rate theory framework typically used in the description of the over-damped dynamics of the stick-slip motion [26] where thermal activation is viewed as a Markovian random hopping process over energy barriers separating the different states m. The rates of thermally activated transitions between the states are dependent on the energy barriers separating them. If ∆u mn denotes the energy barrier separating two neighbouring states m and n, the rate of the transition from n to m follows the Arrhenius law: where f 0 is the attempt frequency setting the characteristic timescale of thermal relaxation processes, T is the temperature, and k B the Boltzmann constant. The time evolution of the system is then studied by evaluating the probabilities of states m at different time t by solving the so-called Master equation: In this work we consider only the transitions occurring between the immediately neighbouring states (asperities), i.e. the transitions from n to m where m = n−1 or n + 1. The rate of these transitions ω mn is determined by the energy barrier ∆u mn = u max nm − u n , where u max nm corresponds to the energy maximum located between the states m and n. The transition rates ω mn are zero for more distant states. This assumption is justifiable for over-damped systems when the transitions between distant states are expected to be rare. However, the formalism is fundamentally not restricted to the nearest neighbor state transitions, and longer range transitions can naturally be included in Eqs. (3)-(4) as well. Given that the focus of the present study is on the development of appropriate thermodynamic formalism to describe thermally activated friction processes, we postpone the question of the effect of such longer range transitions to future work.
Algorithm. To set up Eqs. (3) and (4) it is necessary to determine all stable states m and energy barriers ∆u mn by identifying all energy minima and maxima available at any given time t. Inspecting Eq. (1) shows that more than one energy minimum exists in the stick-slip motion parameter range when γ = E 0 (2π) 2 /Ca 2 > 1. Moreover, due to the explicit time dependence in the second term in Eq. (1) the energy minima and maxima continually evolve in time during the progression of the sliding motion, as illustrated in FIG. 2, may disappear and reappear, and their total number is not conserved. To capture the variable nature of the energy landscape we developed the following approach. Assuming the time duration of a hypothetical FFM experiment extends from 0 to t max , we first divide this interval into time instants t k , where k = 0, . . . , N such that t 0 = 0, t N = t max , and t k − t k−1 = ∆t with ∆t being a small time-step. We then set a global time counter to t 0 and evaluate and store all states x m (t 0 ) obtained by extensively minimising Eq.
(1) for t = t 0 . This procedure is repeated for every subsequent time t k ≤ t N , and the identified states x m (t k ) are stored as arrays labeled by the time index variable k. Thus this procedure allows pre-computing a timeordered arrays of states spanning the entire time interval from 0 to t max , from which all the states corresponding to a given time instant can be directly accessed through the index k.
Deterministic solution. Once all the states have been pre-computed, Eq. (4) can be set up by applying a mask setting all transition rates corresponding to transitions between the states available at a given time t k to ω mn , and to zero otherwise. The mask and the values of the ω mn are updated at every time step k, and the solution of the system of ordinary differential equations in Eq. (4) starting from the initial condition p m (t 0 = 0) is obtained by numerical integration using LSODA/Runge-Kutta algorithm [27].
Stochastic solution. Rather than evaluating the probability distribution, Eq. (4) can be solved by generating individual randomized trajectories of state variables by using kinetic Monte-Carlo methods. Here we set up the so-called fixed time-step kinetic Monte-Carlo method [28], which only requires the knowledge of the possible transition paths and the energy barriers quantifying the associated transition rates through Eq. (3), as they were determined above. The actual thermally fluctuating trajectories followed by the FFM tip consistent with Eqs.
Deterministic and stochastic solutions will be compared below assuming the following realistic parameter values: E 0 = 0.3 eV, a = 0.25 nm, f 0 = 19.5 kHz as determined experimentally [10], and k B = 8.617 × 10 5 eV/K. The default velocity V = 10 nm/s, substrate corrugation E 0 = 0.3 eV, and temperature T = 300 K were varied in the parameter sweep in the intervals 0.1−100 nm/s, 0.2−0.8 eV, 200−500 K, respectively, which corresponds to dimensionless γ = E 0 (2π) 2 /Ca 2 = 11.2 − 45. All calculations below assume the initial condition x = 0 at t = 0. to the shift of the tip trajectory to the shorter timescale range as shown in FIG. 3(a), and to the reduction of the magnitude of the lateral force, i.e. reduced friction, as shown in FIG. 3(b).

III. FRICTION FORCE
The mean tip position and the mean lateral friction force can be obtained by averaging over a large number of randomised trajectories or as expectation values over the state probabilities p m (t) obtained by solving Eq. (4): and: where according to Eq. (2b) the f m (t) = f (x m , t) is the force exerted by the substrate on the tip, as reflected by the minus sign, if the system is in the state x m (t). The friction force can ultimately be defined as an average of F over the measurement time t max : as is conventional [3].  friction process, which gradually settles into a repetitive steady state. Any consistent non-equilibrium thermodynamic framework needs to allow quantifying the thermodynamic work and heat produced during both the transient and steady state stages of the friction process.

A. First law of thermodynamics
Fundamentally, from the point of view of statistical mechanics, the Master equation (4) inherently implies the assumption of a small fluctuating system connected to an infinite heat bath of temperature T allowing for the heat transfer, consistent in equilibrium with the standard Boltzmann distribution. In order to develop the thermodynamic description of the friction process, Eq. (4) needs to be combined with the first thermodynamic law: which relates the change of the internal energy of the system (U ), thermodynamic work (W ), and the heat exchanged with the heat bath (Q). The internal energy of the system can be defined similarly to Eqs. (5) and (6) as the mean value of state energies u m (t): Differentiating this expression with respect to time gives: In the first sum, the time derivative can be expressed by using the chain rule as du m /dt = (∂u m /∂x)dx/dt + ∂u m /∂t. The first partial derivative is zero because the stable states x m correspond to energy minima. The second partial derivative can be expressed in view of Eqs.
(1) and (2b) as ∂u m /∂t = −C(x m − V t)V = f m (t)V , which upon inserting in the first term in Eq. (10), averaging by using Eq. (6), and arranging leads to: Eq. (11) postulates the mean thermodynamic work per unit time consistently with the standard notions that the incremental mechanical work is the product of velocity and force. It relates the work to the various parameters and time-dependent state probabilities entering in Eqs.
(3) and (4), and allows its quantification during both the transient and steady state stages of the friction process. The interpretation of Eq. (11) as mean work is in fact quite intuitive, given that the term on the left-hand side is nothing but the expectation value of the power input delivered from the cantilever. However, justifying its thermodynamic meaning as work requires confirming the energy conservation in Eq. (8). Then, given that the first term in Eq. (10) is suggested to act as thermodynamic work, it is necessary to show that the second term in Eq. (10) can be interpreted as the heat flow between the system and its surroundings.
The second sum in Eq. (10) can be expressed through Eq. (4) inserted in place of the time derivative of probability. Using the relation u m − u n = k B T ln(ω nm /ω mn ), which follows directly from Eq. (3), and arranging gives: As we show below, this expression can indeed be related to the entropy flow between the system and the environment, i.e. to the heat transferred to the environment.

B. Entropy production: heat generation
Non-equilibrium entropy S(t) is defined by the standard Gibbs formula [21]: where p m (t) are the state probabilities. The time derivative of S is: which results from using Eq. (4) during the differentiation of Eq. (13) and subsequent algebraic manipulations. It is conventional in non-equilibrium thermodynamics to split the total entropy change into the so-called entropy production δ i S/dt and entropy flow δ e S/dt [29]: The special notation using the δ symbol is to emphasise that the entropy production and flow are not state variables and depend on the path connecting the starting and the end states associated with the system evolution, while the total entropy change is a state variable and path-independent. Entropy production. Entropy production quantifies the extent of irreversible processes occurring within the system. The second law of thermodynamics states that δ i S/δt ≥ 0, where the equality holds only of reversible (equilibrium) processes. The expression for entropy production for systems described by Master equations has been postulated earlier [30]: (ω mn p n − ω nm p m ) ln p n ω mn p m ω nm (16) It is straightforward to see that this expression satisfies the second law of thermodynamics, since the signs of the term within the parentheses and the logarithm always balance out leading to a positive product of both terms in the sum. Entropy flow. To obtain the expression for the entropy flow we use Eq. (15) and subtract Eq. (16) from (14), which after arranging gives: This result reproduces the expression obtained independently in Eq. (12) except for the missing temperature pre-factor. For closed systems considered here, able to exchange only heat with the environment, the entropy flow can be related to heat through the Carnot-Clausius theorem stating that [31]: where δQ is the heat exchanged between the system and the environment. This recovers the missing T factor in Eq. (12) and adds to it the meaning of the heat flow between the system and the surroundings, i.e.: m dp m dt u m = T δ e S δt = δQ δt (19) which completes the definition of the first law of thermodynamics stated in Eq. (8) and allows interpreting the thermodynamic work and heat. Generally speaking, entropy flow given by Eqs. (17) and (18) is the entropy contribution supplied to the system by the heat bath. It can be positive or negative depending on the interaction of the system with its surroundings. The sign convention used here is positive when the flow is from the system into the surroundings. It is also useful, following Eq. (18), to define the expression: which relates the entropy production to the heat produced by the system itself during the irreversible internal processes.

V. RESULTS AND DISCUSSION
We now apply the developed thermodynamic formalism to study various thermodynamics aspects of the nanoscale friction based on specific systems. FIG. 5(a)-(b) shows the mean position of the tip and the lateral force assuming temperature T = 300 K and dragging velocity V = 10 nm/s. The transient behaviour in the early stages of the time evolution turns into the steady state where the 'stick' and 'slip' stages alternate periodically. FIG. 5(c) shows the corresponding time evolution of the incremental thermodynamic work and heat flow between the system and heat bath. As suggested by the dotted and solid lines, the sum of the work and heat equals to the internal energy change during both the transient and steady state stages of the sliding motion, as expected based the first thermodynamic law Eq. (8) . FIG. 5(d) illustrates that the entropy production is always non-negative as expected based on the second thermodynamic law. The contributions to the change of the entropy terms in Eq. (15) are zero during the initial transient period and increase rapidly during 'slip' events dominated irreversibility. Although the total entropy change is rather small on the scale of the entropy production and entropy flow, it remains non-zero during the steady state stage of the friction process. FIG. 6(a) shows the mean friction force calculated by using Eq.   work is reduced, heat dissipation has its peak, (d) entropy of the system decreases to it minimum, and entropy production and entropy flow have a peak. The total entropy change has been magnified by a factor of 10 for better visualisation. 6(c), the friction force is increasing with increasing substrate corrugation due to the relative enhancement of the substrate-tip interaction. FIG. 6(b) and (d) show similar dependence for the average heat produced in the system computed asQ p = (1/∆t) t+∆t t δ p Q/δt dt, where the time interval (t, t + ∆t) is chosen to include a sufficient number of stick-slip events for averaging. Thus the average heat produced during the stick-slip events increases with the velocity and with the substrate corrugation and decreases with the increasing temperature. In addition, while the velocity dependence of the friction force follows logarithmic trend, the variation of the heat appears to be linear over many decades of the dragging velocities. FIG. 7(a) shows the internal energy change ∆Ū computed as a difference between the average work per stickslip eventW = (1/∆t) t+∆t t δW/δt dt and the produced heatQ p . Although small for small velocities, ∆Ū is nonzero in the entire velocity range. Thus the work performed on the system during the stick-slip event contributes both to the internal energy change and heat, and the thermodynamic formalism developed in previous sections is required for evaluating unambiguosuly their relative contributions. Similarly, in FIG. 7(b) the average entropy change per stick-slip event ∆S, determined as a difference betweenQ p /T andQ e /T , is non-zero and consequently the heat produced and transferred during the stick-slip event are not the same.
The situation is simpler for a specific type of a cyclic process driven by periodically reversing velocity direction of the tip, when the friction losses can be determined directly from the area of the friction force loops. This can be shown by integrating Eqs. (8) and (15) after a sufficient number of cyclic reversals of the velocity direction, when the system is expected to recover the same state after a velocity cycle and the cumulative changes of the state variables become zero, i.e. ∆Ū | cycle = 0 and ∆S| cycle = 0, which leads to relationsW | cycle =Q e | cycle andQ e | cycle =Q p | cycle .
Finally, we comment on the range of validity of the Master equation formalism employed in this work. In the limit of high-energy barriers and over-damped dynamics, this approach is equivalent to Langevin dynamics, as has been shown earlier by a direct comparison between the solutions of the corresponding Fokker-Planck and Master equations [33,34]. This work also demonstrated that the attempt frequency f 0 , such as in Eq. (3), can be related to the effective mass, damping constant and sliding velocity of the cantilever [35]. The approach becomes problematic for fast dragging velocities when thermal fluctuations become irrelevant, which leads to deterministic dynamics. The sliding velocity threshold for this to occur can be estimated as discussed in [32], confirming that the ve-locity range considered in FIG. 7 is within this threshold and is easily achievable by standard AFM equipment.

VI. CONCLUSION
The developed formalism based on the Prandtl-Tomlinson model and the transition state theory incorporating the effects of thermal fluctuations allows to evaluate in full consistency the various relevant thermodynamic variables, including the internal energy, work, heat produced or transferred to the environment during the nanoscale friction process. We show that unless the friction losses are determined from the area of the friction force loops determined by cyclic FFM experiments using periodically reversed dragging velocity direction, explicit thermodynamic formulation is necessary for determining the friction losses during stick-slip events even in the steady state.
The developed approach can be used for optimising the friction losses during arbitrary friction process, by determining the system parameters leading to specified levels of the produced heat. The approach can potentially be further generalised to increase the level of complexity, such as for Frenkel-Kontrova type models, or models based on solving the Langevin dynamics [17,18], which require evaluating the underlying Fokker-Planck equation. It is also naturally possible to extend the model to studying the 2D systems, if the underlying energy barriers and thermally activated transition paths can be identified by practical means. Also, different shapes of substrate potentials, such as determined directly by ab-initio methods can be incorporated into the analysis. Thus the present approach opens new directions for exploring the thermodynamics behaviour in a broad range of practically relevant materials.