{'fraction_non_alphanumeric': 0.039735099337748346, 'fraction_numerical': 0.011965050921030665, 'mean_word_length': 4.65449968533669, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Underdamped stochastic thermodynamic engines in contact with a heat bath with arbitrary temperature profile

We study thermodynamic processes in contact with a heat bath that may have an arbitrary time-varying periodic temperature profile. Within the framework of stochastic thermodynamics, and for models of thermo-dynamic engines in the idealized case of underdamped particles in the low-friction regime, we derive explicit bounds as well as optimal control protocols that draw maximum power and achieve maximum efficiency at any specified level of power.

For more than 200 years, Carnot's idealized concept of a heat engine [1] has been the cornerstone of equilibrium thermodynamics [2]. It provided a standard as well as led to the discovery of the absolute temperature scale, entropy, and the second law of thermodynamics. The sequel, beyond equilibrium and quasi-static operation, proved a challenging one. Statistical mechanics and stochastic fluctuation theories have since, and for over a hundred years, been advancing our insight into the irreversibility of nonequilibrium thermodynamic transitions. In this endeavor, a particular promising model of far-from-equilibrium transitions is that of Stochastic Thermodynamics (also, Stochastic Energetics) [3][4][5][6] that followed at the heels of fluctuation theories [7][8][9][10][11].
In the present work we adopt the framework of Stochastic Thermodynamics so as to quantify the amount of power as well as the efficiency that thermodynamic engines can achieve when harvesting energy from a heat bath with an arbitrary but periodically fluctuating temperature profile. Our study is expected to be of value, in particular, to theorists and engineers that work with nano machines and nano sensing devices at the scale of molecular and thermal fluctuations. Specifically, in our work, the Langevin equation provides a model for a molecular system that interacts with a thermal environment. In this, X t ∈ R denotes the location of a particle (which is taken to be one-dimensional for notational simplicity), v t ∈ R represents its velocity at time t, m its mass, γ the viscosity coefficient of an ambient medium, k B the Boltzmann constant, T (t) the time-varying temperature of the heat bath at time t that a statistical ensemble of particles is in contact with, B t a standard Brownian motion that represents thermal excitation from a heat bath, and U (t, x) a timevarying potential exerting a force −∇ x U (t, x) on a particle at location x ∈ R. This potential represents a control action that models interaction of our ensemble of particles with the external world. This Langevin model has been extensively used to describe heat engines in a Carnot-like cycle, that cycles through contact with heat baths of different temperature, in order to quantify maximum power that can be drawn as well as efficiency at maximum power. Specifically, foundational work has been carried out in the overdamped regime [12][13][14] where inertial effects are neglected, as well as in the underdamped regime [15,16] under a low friction assumption, where inertial effects now dominate dissipation. Most importantly, experimental realization and verification of findings have been reported in different settings [17][18][19].
Energy and entropy exchange between a heat bath and a particle ensemble is not particular to (thermodynamic) engines. Fluctuations in chemical concentrations in conjunction with the variability of electrochemical potentials may provide a universal source of cellular energy [20]. Indeed, a similar mechanism appears to be at play in biological engines. In these, energy exchange appears to be mediated by continuous processes and energy differentials [21], in contrast to the classical Carnot cycle which alternates between heat baths of constant temperature in an idealized engine. Thus, as contemplated by E. Schrödinger [22,23], the ability of life to maintain a distance from equilibrium may be tied to mechanisms that allow drawing energy out of naturally or self-induced fluctuating temperature or chemical concentrations.
It is partly the above circle of ideas that led us to consider the rudimentary model of a cyclic process (periodical temperature profile of a heat bath) that fuels a molecular engine represented by stochastically driven Langevin dynamics. Another paradigm that may provide context is that of molecular engines that may some day be engineered to tap onto cyclic temperature fluctuations for work production. The work we present below is an extension of recent studies for periodic temperature profile in the linear regime [24][25][26]. It addresses the nonlinear regime and, in particular, the case of underdamped dynamics where the low friction assumption applies.

I. ENERGETICS AND LOW FRICTION APPROXIMATION
Throughout the paper we will consider the Langevin dynamics (1) with a harmonic potential where q(t) represents its intensity and constitutes our control variable. The total energy of a particle is the sum of kinetic and potential energies, The work and heat exchange at the level of a single particle, dW t and dQ t , respectively, are [3] These definitions are in agreement with the first law of thermodynamics, i.e. dE = dQ + dW . Taking the expectation of (2) yields the average rate of work and heat exchange, where Σ x and Σ v are the variances of X t and v t , respectively. The averaged expressions also satisfy the first law of thermo- is the average total energy of the particle. The governing equations for the variance are obtained from the Langevin dynamics (1), where Σ xv (t) is the correlation between X t and v t . Although the differential equations for the evolution of the variance are explicit and in closed-form, the analysis for maximizing efficiency is still challenging due to the presence of the three coupled ODEs. As a result, it is common to consider simplifying approximations that hold in different physical regimes.
Our analysis concerns the underdamped (or low friction) regime that is studied in [15,16]. When the temperature T (t) and the harmonic potential intensity q(t) are constant, the low friction regime holds when the particle in (1) undergoes many oscillations before dissipation effects become significant. Mathematically, this amounts to q m ≫ γ m . In the case where T (t) and q(t) are time varying periodic functions, it is required in addition that their power spectrum mostly lies below the natural frequency of oscillations q/m.
Under the low friction assumptions, the equipartition condition holds approximately [16,Section 4.2]. As a result, it is possible to express the dynamics of our system as a function of Σ v (t) uniquely. More precisely, we can use (4a) to express Σ xv (t) as follows: where the second equality comes from the equipartition condition (5). Now, we can rewrite Σ xv (t) in (4c), to obtaiṅ For this equation to be meaningful, we require q(t) to be (weakly) differentiable. Equation (6) is the underlying model for our analysis through the rest of the paper.

II. ANALYSIS OF MAXIMUM POWER
We consider a stochastic thermodynamic engine driven by a periodic temperature T (t) with period t f . The averaged power output over a cycle is equal to Using the first law of thermodynamics dE t = dQ t + dW t , the power can be expressed in terms of heat exchange as follows, where the definition (3b) is used and E t ≡ E(t), for clarity.
To account for possible discontinuities in T (t) and q(t), as it is often the case in the underdamped setting [15,27,28], we consider a cycle from 0 + to t + f . Thus, q, Σ v and E, which are periodic, satisfy and The latter condition removes the boundary terms in (7), while conditions (8) impose an integral constraint on Σ v (t). Specifically, if we divide (6) by Σ v (t) and integrate from 0 (9) Thus, in view of (8), This integral constraint is the main ingredient in our analysis for both maximum power and maximum efficiency. We first consider maximizing power output, namely, subject to the constraint (10). We observe that due to (10), for any arbitrary constant c. The minimal value for the inte- is the unique maximizer of (11). The relation between Σ v (t) and the protocol q(t) can be obtained from (6) by direct integration (cf. (9)), which for the optimizing Σ v (·) gives (13) Note that, q 0 specifies the starting value q(0) of the optimal protocol. Further, q(t) is continuous at all times when T (t) is, which agrees with the intuition that jumps in the control are necessitated for adapting to a sudden jump in temperature [12,15].
Finally, inserting (12) into the expression for power, we obtain that, under this protocol, any value for q 0 gives the same level of power, namely, where Thus, expression (14) quantifies the maximum power that can be drawn in terms of an explicit measure of temperature fluctuations.
It is interesting to consider the shape of temperature fluctuations that allows maximum power to be drawn under the optimal protocol. In view of the above, it is easy to see that when T (t) ∈ [T c , T h ], the Carnot temperature profile allows drawing maximum power, which in this case is This special profile (Carnot) has already been studied in [15].

III. ANALYSIS OF MAXIMUM EFFICIENCY AT FIXED POWER
The classical definition of efficiency is the ratio of work produced over the amount of heat drawn from the hot bath into the system, This definition presumes that the environment that constitutes the hot heat bath is well defined, and as a consequence that Q h is well defined as well. This is clearly the case for a Carnot cycle, T (t) = T Carnot (t), when the system remains in contact with the bath at T h during the interval [0, . For this case, at maximum power, where the second equality is obtained using (3b) and the optimal expression for Σ v in (12). It follows that which is precisely the Curzon-Ahlborn efficiency [29,30]. This result was obtained in [15]. However, in the setting of an arbitrary periodic temperature profile, it is not entirely clear what constitutes the hot bath. The same bath serves as hot and cold, at different times, and therefore Q h and η Q may be given different definitions and be subject to different interpretations [24,26].
In the present work, following [26], we adopt as our definition of efficiency, where (also, U = k B T (t)Ṡ(ρ t )dt, using integration by parts) represents the effective uptake of thermal energy, while denotes the entropy of the particle-distribution ρ t . The value U can be thought of as the maximal amount of work that can be extracted when the dissipation is zero and the transition takes place quasistatically. In general, over a cycle, where the dissipation relates to the total entropy production rateṠ total in the system and the environment. For quasi-static transitions W diss = 0 and η U = 1.
In the underdamped low friction regime with quadratic potential, the distribution ρ t is Gaussian with independent components (x, v) whose covariance are Σ x (t) and Σ v (t), respectively. Using the standard formula for the entropy of Gaussian distributions together with the equipartition condition (5) expressed in terms of the variances, U simplifies to In case T (t) is discontinuous, the limits of integration need to be taken as 0 + and t + f , and similarly in what follows. Integration by parts gives where we have used (6) to establish the second equality.
We now seek to optimize efficiency at a given power. To this end, it suffices to minimize the dissipation U subject to the given power. Thus, we consider subject to (10) together with for any given level of power P. We follow a variational approach. The Lagrangian for our optimization problem is where λ, µ are the Lagrange multipliers. The stationarity condition for Σ v (t) gives Applying the power constraint we obtain In a similar manner as before, the optimal protocol can now be obtained by direct integration of (6), to give where r(t) = It now remains to fix µ by imposing the last constraint, which yields r(t f ) = t f . This is, In general, equation (19) cannot be solved explicitly for µ. However, it is easily seen that when P = 0, then µ = 0 is a solution. Also, as P → P * , then the solution µ → ∞. It is worthwhile to point out that the condition r(t f ) = t f makes the protocol (18) continuous for continuous temperature profiles.
For notational convenience, we let denote the average of a periodic function g(t) over the period. Now, putting all of the ingredients together, the optimal U is . Consequently, the maximum efficiency at fixed power is . (20) Figure 1 displays the trade-off between power and efficiency for three different temperature profiles. Note that for vanishing power we obtain the maximum possible efficiency, i.e. η * U = 1, that corresponds to vanishing dissipation. On the other hand, as κP → κP * = Var( √ T ) (from (14)), the limiting value from (20) gives that This is precisely the efficiency at maximum power obtained by using the optimal protocol (13). The limit in (21) can also be expressed in terms of the third moment of the square root of the temperature specifically, Thus, for any temperature profile such that µ 3 ( √ T ) = 0, the limit is 1 2 , which in particular is true for the Carnot-like temperature profile T (t) = T Carnot (t). We also note that the third moment can be negative, leading to efficiency that exceeds 1 2 , albeit at the cost of decreasing maximum power.

IV. EXAMPLE: SINUSOIDAL TEMPERATURE PROFILE
In the following we compare our results to the ones obtained in the linear response regime, where it is assumed that [24,31]. To this end, we consider the sinusoidal temperature profile with ω ≪ q m so as to ensure that the low friction assumption holds.
We first use our analytical result to recover the expressions obtained in the linear response regime. Specifically, assuming where the first two coincide with the expressions for the optimal protocol and power that are given in [24,31], in the limit where q0 m is large enough to satisfy the requirements of the low friction regime. In fact, in the linear response regime η * U (P * ) = 1 2 + O(∆T 2 ) holds for any temperature profile whose time dependent component is an odd function of t. Moreover, in order to illustrate the utility of our results, we compare the optimality of the protocol obtained in this paper, to the one obtained in the linear response regime. Specifically, we solve numerically the equations for the variance (4) for two protocols: i) the optimal protocol obtained with low friction assumption according to (13), ii) the optimal protocol obtained in linear response regime in [24] and [31,Eqs 29,30a].
These two protocols, along with the temperature profile, are shown in Figure 2. Then, we use the numerical solution to the equations for the variance to compute power and efficiency. The result, as the temperature difference T h − T c is varied, is shown in Figure 3.
In these numerical examples, we made sure γ m ≪ q m so that the low friction assumption remains valid. As it is expected, the optimal protocol under the linear response regime assumption performs well when the temperature ratio is small, giving a numerical result that agrees with equations (13) and (20). However, as the temperature ratio increases, higher order terms become significant and the protocol is no longer optimal.
We finally highlight how the numerical value of power and efficiency, using the optimal protocol (13), deviates from the analytical expressions for maximum power (14) and efficiency at maximum power (21) with increasing values of the friction coefficient γ. This is shown in Figure 4. Specifically, for small values of γ √ mq , the analytical and numerical results for power and efficiency coincide. For larger values of γ √ mq the approximation error becomes significant due to the fact that the condition γ √ mq ≪ 1, and hence, the approximate equipartition relation (5) , no longer hold.  (23) as functions of temperature ratios for two protocols: i) the optimal protocol obtained under the low friction assumption (13) (solid line), and ii) the optimal protocol obtained in the linear response regime [31, Eqs 29, 30a] (dashed line). For comparison, the analytical expressions for maximum power (14) and efficiency (21) in the low friction regime are also drawn (dotted curve).

V. CONCLUDING REMARKS
The present work quantifies maximum power, as well as the efficiency at any level of power, that can be achieved by a thermodynamic engine in the (underdamped) low friction regime, modeled by a Langevin equation and in contact with a heat bath with periodic temperature profile.
It turns out that the maximum power and efficiency are expressed in terms of finite moments of the square root of the temperature profile. Moreover, when the temperature changes continuously, the optimal control protocol is expressed explicitly in terms of the temperature and certain finite moments, and is continuous in time as well.
Of particular interest is the efficiency at maximum power and, specifically, the relation between useful work and dissi-pation. Interestingly, when the third moment of the square root of the temperature profile is zero (for instance, due to a suitable time symmetry), at maximum power in the low friction regime, the losses in dissipation equal the amount of work that can be extracted by the engine, yielding η U = 1 2 . It is of interest to explore possible connections of this result to the universal bound on the efficiency at maximum power being 1 2 η C , where η C is the Carnot efficiency [14,32]. Numerical values for power and efficiency as a function of the friction coefficient for the system governed by equation (4), driven by the optimal protocol (13) obtained in the low friction regime (solid line). For comparison, we have included the analytical expressions for maximum power (14) and the efficiency at maximum power (21) obtained under the low friction assumption (dotted line).