Boosting engine performance with Bose-Einstein condensation

At low-temperatures a gas of bosons will undergo a phase transition into a quantum state of matter known as a Bose-Einstein condensate (BEC), in which a large fraction of the particles will occupy the ground state simultaneously. Here we explore the performance of an endoreversible Otto cycle operating with a harmonically confined Bose gas as the working medium. We analyze the engine operation in three regimes, with the working medium in the BEC phase, in the gas phase, and driven across the BEC transition during each cycle. We find that the unique properties of the BEC phase allow for enhanced engine performance, including increased power output and higher efficiency at maximum power.


Introduction
In the 1920s Bose [1] and Einstein [2] put forward the theoretical hypothesis that a dilute atomic gas could give way to a phenomenon in which a large number of bosons occupy the zero momentum state of a system simultaneously. This phenomenon, now known as Bose-Einstein condensation (BEC), was corroborated in 1995 when it was observed in rubidium [3], sodium [4] and lithium [5,6] vapors, confined in magnetic traps and cooled to temperatures in the fractions of microkelvins in order to achieve the necessary ground state populations. These experimental verifications marked a profound development in the study of quantum gases. Over the subsequent years, experimental control of BECs has expanded dramatically, including the creation of a BEC in microgravity [7] and the implementation of BEC-based atomic circuits [8].
As a phase transition with an origin that is purely quantum in nature, the thermodynamics of BECs has attracted considerable attention. The transition from a normal Bose gas to a BEC can be fully described mathematically, and treatments can be found in most any modern thermodynamics or statistical mechanics textbook [9][10][11]. Notably, unlike the more familiar gas-to-liquid phase transition, the BEC transition occurs in momentum, rather than coordinate space [10]. While the equilibrium thermodynamic behavior of BECs is well established, including the equations of state, fugacity, and specific heat [9][10][11], the analysis of BECs in the context of heat engines, the paradigmatic systems that thermodynamics itself was developed to study, remains curiously scarce.
With the development of quantum thermodynamics [12] the exploration of how quantum phenomena can be harnessed in nanoscale thermal machines has seen an explosion in interest [13][14][15][16][17][18][19][20][21][22][23]. With macroscopically observable quantum features and well-developed techniques for experimental control, Bose-Einstein condensates would seem an optimal system to serve as a quantum working medium for a thermal machine. However, as the condensate itself consists of macroscopic occupation of the zeromomentum state, it is not easy to see how the typical paradigm for work extraction from macroscopic thermal machines, involving pressure exerted against an external piston or potential, translates to a BEC working medium. Several recent works have proposed implementations of quantum thermal machines that leverage BECs, including extracting work through the use of Feshbach resonances [24], using a mixture of two gas species to implement a refrigeration cycle [25], implementing a heat engine cycle with cold bosons confined to a double-well potential [26], and using BECs as the basis for thermal machines that act on a working medium of quantum fields [27].
In this paper, we explore an Otto cycle in the context of endoreversible thermodynamics using a harmonically trapped bosonic gas as a working substance. We study the cycle in three regions of operation: i) with a condensed medium, ii) with a non-condensed medium, and iii) with a medium driven across the condensation transition. We find that the properties of the BEC allow for enhanced performance above what can be achieved with the corresponding classical gas. For a working medium that remains in the condensate phase during the whole cycle, we show that the efficiency at maximum power significantly exceeds the Curzon-Ahlborn (CA) efficiency [28], the efficiency obtained for an endoreversible Otto cycle with a working medium of an ideal gas described by Boltzmann statistics [29]. In contrast, if the system only operates with the working medium in a non-condensed phase, we find that the efficiency at maximum power is equivalent to the CA efficiency. We also examine cycles operating while the working medium is driven across the BEC phase transition, and find that the efficiency at maximum power is highly parameter-dependent and can fall above or below the CA efficiency. We conclude with a discussion on the role of the condensate itself in work extraction and the experimental applicability of these results.

BEC thermodynamics
To keep our analysis as self-contained as possible and establish the necessary notions and notations, we begin with a brief review of the textbook thermodynamics of noninteracting bosons in a harmonic trap. We consider the system under study to be in the thermodynamic limit, in which N → ∞, where N is the number of bosons, while maintaining the condition N ω is constant, where ω corresponds to the trap frequency [11]. The trapping potential is given by, where ω x , ω y and ω x are the oscillator frequencies in each direction. The energy eigenvalues for each atom of the Hamiltonian corresponding to the above potential are [10,11], If all three frequencies are the same (the harmonic-isotropic case), we can define n = n x + n y + n z , simplifying the energy spectrum of Eq. (2) to E n = ω n + 3 2 with a quantum degeneracy of the form D(n) = (n + 1) (n + 2) /2 [10].
In the harmonic-isotropic case, the Grand Potential for a system of bosons in the Grand Canonical ensemble is given by [10], where we have suppressed the zero energy state in order to obtain the number of excited bosons in the system. We can perform the above sum by introducing a continuous density of states (assuming that E ω) [10,11], In this approximation, the Grand Potential takes the form [10], where β is the inverse temperature, µ is the chemical potential, and g 4 (z) corresponds to the Bose function, given by the integral [10,11], or in series form as [10,11], Here z = exp(µ/k B T ) denotes the fugacity of the system. Note that, for the case of harmonic confinement, the volume is not a parameter in the Grand Potential. Instead, the inverse of the trap frequency plays the role of volume. The average number of excited atoms in the trap can be obtained from [10,11], where we use the recurrence relation [10], For fixed N , the fugacity monotonically increases as temperature decreases until Bose-Einstein condensation occurs at µ = 0 (z = 1) [10]. Therefore, using Eq. (8) and setting z = 1, we can find the critical temperature that characterizes the transition [10,11], The internal energy of the system below and above the BEC transition is given by [10,11], Using Eq. (11) the entropy of the system can be found [11], Note that when using Eq. (12) we can obtain an expression for the fugacity for the case of T ≥ T c by solving Eq. (8).

The endoreversible Otto cycle
The Otto cycle consists of four strokes: isentropic compression, isochoric heating, isentropic expansion, and isochoric cooling. The cycle strokes for a working medium of harmonically confined particles are illustrated graphically in Fig. 1 using an entropy (S) -frequency (ω) diagram. The isentropic and isochoric processes are represented in the figure by horizontal and vertical lines, respectively. In our notation, T refers to temperature and ω to the trap frequency (both parameters measured in arbitrary units). During the isentropic strokes the working system is disconnected from the thermal reservoirs and the external field is varied from ω l to ω h (for stroke A → B) and vice-versa (for stroke C → D). In contrast, during the isochoric strokes the external field is held constant while the working medium exchanges heat with the hot (for stroke B → C) or cold (for stroke D → A) reservoir. Note that the work parameter (ω) plays Figure 1. Entropy versus external field diagram for the Otto Cycle. Note that the system is only in contact with the thermal reservoirs during the isochoric (vertical) strokes. At points C and A, the working substance reaches the temperatures T h and T l , of the hot and cold reservoirs, respectively, indicated by the isotherms touching the cycle at those points. For the quantum cycle, the entropy values S B and S D are calculated using the same thermal occupation probabilities as points A and C to ensure the strokes A → B and C → D fulfill the quantum adiabatic condition.
the role of an inverse volume, increasing during the compression stroke (A → B) and decreasing during the expansion stroke (C → D). Thermodynamically, the cycle is characterized by the temperatures of the two heat reservoirs and the initial and final values of the external frequency, ω h and ω l . The finitetime performance of the cycle can be analyzed using the framework of endoreversible thermodynamics [28,30,31]. Note that the finite-time analysis of an Otto cycle with a working medium of an ideal Bose gas was previously examined in Ref. [32]. However, in that study the effects of Bose-Einstein condensation were not explored, which we will examine in detail. For our analysis we will closely follow the procedure established in Ref. [23]. During an endoreversible process the working medium is assumed to always be in a state of local equilibrium, but never achieves global equilibrium with the reservoirs. As such, we can express the heat exchanged with the reservoirs during the isochoric heating stroke (from B → C) as, where we note that, unlike the quasistatic case, T 3 = T h . The temperatures T 2 and T 3 satisfy the following conditions, where τ h is the duration of the heating stroke. We can explicitly model the temperature change from T 2 to T 3 by applying Fourier's law of heat conduction, where α h is a constant that depends on the thermal conductivity and heat capacity of the working medium. Equation (15) can be fully solved to yield, The isentropic expansion stroke (from C → D) is carried out in exactly the same manner as in the quasistatic cycle. Since the working medium is decoupled from the thermal reservoirs during this stroke, the work is determined entirely from the change in internal energy, The isochoric cooling stroke (from D → A) can be modeled in the exact same manner as the heating stroke. The heat exchanged with the cold reservoir is given by, where T 1 and T 4 satisfy the conditions As for the heating stroke, the temperature change can again be modeled by Fourier's law, The solution to Eq. (20) is, Finally, in exact analogy to the expansion stroke, the work done during the compression stroke can be found from the change in internal energy, The efficiency of the engine can be found from the ratio of the total work and the heat exchanged with the hot reservoir, The power output is given by the ratio of the total work to the cycle duration, with γ serving as a multiplicative factor that implicitly incorporates the duration of the isentropic strokes [23].
Noting that the entropy remains constant during the isentropic strokes, we can solve the equation for the total entropy differential dS(T, ω) = 0 to obtain a relationship between T and ω. This first order differential equation is given by, Taking the appropriate derivatives and solving Eq. (25) we find that the isentropic condition is satisfied by, Where κ = ω 1 /ω 2 indicates the compression ratio. The full derivation of this condition is given in Appendix A. We note that the quasistatic Otto cycle can be recovered from the endoreversible cycle in the limit of long stroke times τ h and τ l . In this limit, the working medium reaches full equilibrium with the reservoirs during the heating and cooling strokes and Eqs. (16) and (21) simplify to T 3 = T h and T 1 = T l , respectively.

Figures 2, 3, and 4 present numerical results
for the quasistatic Otto cycle in three different operating zones, with the working medium in the non-condensate phase for the full cycle, with the working in the condensate phase for the full cycle, and with the working medium driven across the BEC phase transition during each isochoric stroke. In all the simulations, the parameters T l , T h and ω l are held fixed, while ω h is varied. In each figure, panel (a) presents a representative cycle displayed over isothermal entropy curves as a function of ω for a temperature range between 5 nK and 350 nK. Panel (b) shows the same process presented in (a) but on a plot of T versus ω h . Panel (c) shows the total work in units of meV over a wide range of possible cycles, with the black dot indicating the value of work obtained from the cycle highlighted in (a) and (b). Finally, panel (d) presents the efficiency as a function of ω for a range of cycles, where, as before, the efficiency value indicated with a black dot corresponds to the specific case drawn in (a) and (b). Note that the frequency and temperature values selected for our analysis are typical [33] and comparable with those used in experimental demonstrations of Bose-Einstein condensation [3,5].  Figure 4 illustrates a case in which the working system transitions between the condensed and non-condensed phases during the isochoric strokes. In this case, the total work extraction is calculated from the combination of internal energy expressions given in Eq. (11). For stroke 1 → 2 the expression for T ≤ T c correctly describes the internal energy of the working medium and for stroke 3 → 4 the expression for T ≥ T c correctly describes the internal energy of the working medium. Consequently, the total work is given by, where we use g 4 (1) = π 4 /90. The intermediate temperatures, T 4 and T 2 , were eliminated from Eq. (27) by applying the relationship between the temperatures and frequencies given in Eq. (26) that ensures the compression and expansion strokes remain isentropic. The fugacity is obtained by solving Eq. (8) using a third-order approximation of the series form of g 3 (z), In order to verify that this third-order approximation is sufficiently accurate, we compare the analytical approximation to a numerical calculation of the fugacity in Appendix B.
It is important to note that only one Bose function appears in Eq. (27), despite the facts that the expressions for internal energy at both points 3 and 4 in the cycle are proportional to the Bose function, and that the temperatures and trap frequencies are different at each point. This is a consequence of the fugacity along path 3 → 4 in the cycle being obtained from Eq. (8) with a fixed number of particles, along with the isentropic condition given by Eq. (26). The isentropic condition states that the ratio of frequency to temperature at the start and end of each adiabatic stroke must be equal. Since the fugacity is determined from this ratio, along with the number of particles, the fugacity must also remain fixed during the adiabatic strokes. Thus we have the additional condition that Considering Eq. (10) we see that, as long as the temperature of the hot reservoir remains fixed, increasing the trap frequency will eventually drive the system across the critical point. This transition results in a kink the total work extraction, due to the divergence in the first derivative of the internal energy that characterizes the BEC phase transition. This behavior can be clearly observed in Fig. 4. By increasing ω h , we can move along the isotherm corresponding to T h = 55 nK until we reach the frequency at which 55 nK is the critical temperature for the transition. We emphasize that Eq. (27) is only valid up to this transition point. By rearranging Eq. (10) we can solve for this critical frequency, Consequently, Eq. (27) is only valid up to κ = ω l /ω h c . Rewriting Eq. (29) in terms of κ and taking T c = T h (which provides the limiting case that still ensures the phase transition occurs during the quasistatic heating stroke) we have, This equation indicates that there are two ways to decrease this critical value of κ that ensures the engine is still operating in the transition regime (i.e. to avoid passing into the regime where the entire cycle takes place outside of the condensate phase): one is to decrease the number of particles, and the other is to decrease the ratio ω l /T h . If we want to remain consistent with the assumption that the engine is operating in the thermodynamic limit, only the second option remains available. By decreasing the critical value of κ we broaden the parameter space over which the transition engine can operate while still maintaining the condition that the compression stroke occurs in the condensate phase and that the expansion stroke occurs in the non-condensate phase.
Consider an example set of parameters, ω l = 110 s −1 , T l = 20 nK, and T h = 55 nK with N = 60, 000 bosons. From Eq. (29) we obtain ω c h ∼ 195.559 s −1 , a value that is consistent with Fig. 4(c). Beyond that value of ω h , to determine the total work extraction as shown in Fig. 4(c) we must consider the case of a cycle that operates fully in the condensate regime. Figure 3 presents such a case. As the working medium remains in the condensate phase for the full cycle, the fugacity (z) remains fixed at one. In this case, the total work of extraction is, It is straightforward to maximize this expression for the work extraction in order to determine ideal the compression ratio. By taking the derivative of Eq. (31) with respect to κ and we obtain, The example illustrated in Fig. 3 presents a cycle with parameters T l = 40 nK, T h = 75 nK and ω l = 300 s −1 . For these parameters, the work output is maximized at κ * = 0.7995. The value of ω h corresponding to this maximum is thus ω h ∼ 375.232 s −1 , which corresponds exactly with the peak observed in panel (c) of Fig. 3.
It is important to note the fact that all our results for the engine operating only in the condensate regime are explicitly independent of the particle number, N . This is due to the fact that the chemical potential in the condensate phase is zero, resulting in N no longer being a thermodynamic variable.
Finally, we will consider the case where the cycle is operated with a working medium that remains entirely in the non-condensate phase, as shown in Fig. 2. In this case, the expression for the total work is, where the isentropic condition for the expansion and compression strokes leads to the following relations between the fugacities at each corner of the cycle, z l ≡ z l (T l , ω 1 ) = z 2 (T 2 , ω 2 ) and z h ≡ z h (T h , ω 2 ) = z 4 (T 4 , ω 1 ). As in the case of the cycle fully in the condensate regime, we can use Eq. (33) to determine the compression ratio that maximizes the work output. Using the parameters of the example cycle shown in Fig. 2, T l = 120 nK, T h = 210 nK, and ω l = 300 s −1 , we obtain a value of κ * = 0.755. Using this value of κ * , we see that the maximum occurs at ω h ∼ 398 s −1 consistent with the peak observed in panel (c) of Fig. 2.

Endoreversible results
Let us first consider an endoreversible engine with a condensate working medium below the critical temperature. In this case, we can determine the efficiency by combining Eqs. (23), (22), (17), and (13) with the top line of Eq. (11). After making use of the isentropic conditions T A ω h = T B ω l and T C ω l = T D ω h the efficiency simplifies to the same result found for the quasistatic cycle, where κ = ω l /ω h is the compression ratio. We can repeat the same process for a non-condensate working medium above the critical temperature, now applying the expression for internal energy from the bottom line of Eq. (11). Recalling that the fugacity remains constant during the isentropic strokes, we find that the dependence on the Bose function, g ν (z), cancels out and the efficiency simplifies to, identical to that of the condensate working medium. These results indicate that in both the quasistatic and endoreversible regimes Bose-Einstein condensation has no impact on engine efficiency. Next we consider the power output for a condensate working medium below the critical temperature. Combining Eq. (24) with Eqs. (22) and (17) yields a complicated expression in terms of the temperatures and frequencies at each corner of the cycle. Applying Eqs. (16) and (21) along with the isentropic conditions we can express the power entirely in terms of the experimentally controllable parameters, namely the hot and cold bath temperatures, the thermal conductivites, the stroke times, and the compression ratio, Following the same steps for a working medium above the critical temperature, we find the power to be, where z l and z h are the fugacities during the compression and expansion strokes, respectively. It is well established that there is an inherent trade-off between efficiency and power. Efficiency is maximized in the limit of infinitely long, quasistatic strokes. However, in this limit the power output will vanish due to the dependence on stroke time in the denominator of Eq. (24). The maximum efficiency of the engine is bounded by the Carnot efficiency which, examining Eqs. (34) and (35), we see is achieved when κ = T l /T h . Plugging this value of κ into Eqs. (36) and (37) we see that for both the condensate and non-condensate working mediums the power vanishes at Carnot efficiency.
A figure of merit of more practical interest is the efficiency at maximum power (EMP), which corresponds to maximizing the power output, and then determining the efficiency at that power [28]. As before, let us consider first the condensate working medium. Due to the cumbersome form of Eq. (36) we maximize the power output numerically with respect to the compression ratio, κ. The EMP for a 60,000 boson condensate is shown in Fig. 5a in comparison to the Curzon-Ahlborn efficiency. We see that the condensate EMP is significantly higher than the Curzon-Ahlborn efficiency. Noting that the Curzon-Ahlborn efficiency has been found to be the EMP for a classical harmonic Otto engine [23], we see that the condensate behavior leads to a significant advantage in performance.
We note that in Ref. [23] it was shown that a harmonic quantum Otto engine with a single-particle working medium displays an EMP that exceeds the Curzon-Ahlborn efficiency, as long as it is operating in the quantum regime defined by ω h /k B T l 1. This is consistent with the results found here, as the parameters that ensure the working medium remains below the critical temperature throughout the cycle correspond to the deep quantum regime.
We next consider the EMP of a working medium of bosons above the critical temperature. Taking the ansatz that the high-temperature behavior should match the classical limit, we take the derivative of Eq. (37) with respect to κ and then plug in our ansatz that κ = T l /T h . Note that in order to express the compression and expansion stroke fugacities in closed form, we take the high temperature limit of small z such that Eq. (7) can be well approximated by just the first term. We find that our ansatz works to maximize the power output in this case, demonstrating that the EMP above the critical temperature is equivalent to the Curzon-Ahlborn efficiency. This behavior is illustrated graphically in Fig. 5b. Parameters are τ c = τ h = 1. We have used T h = 75 nK, which ensures the temperature of the working medium always remains above the critical temperature. (c) EMP as a function of the cold bath temperature for a working medium of 60,000 bosons driven across the BEC phase transition with stroke durations τ c = τ h = 10 (blue, dashed) and τ c = τ h = 1 (green, dot dashed). We have used T h = 75 nK, which ensures that the compression stroke takes place below the critical temperature and the expansion stroke takes place above the critical temperature. In each plot the Curzon-Ahlborn efficiency (red, solid) is given for comparison. Other parameters are γ = α c = α h = 1.
Finally, we consider the case of a working medium of 60,000 bosons driven across the BEC phase transition, such that the compression stroke takes place while the working medium is below the critical temperature and the expansion stroke takes place while the working medium is above the critical temperature. The EMP for this transition engine is shown in Fig. 5c for two different stroke durations. We see that when the duration of the isochoric strokes is short, the EMP of the bosonic medium is greater than the Curzon-Ahlborn efficiency at low values of the cold bath temperature but lower at higher values of the cold bath temperature. However, we see that if we increase the duration of the isochoric strokes, while the total power will be reduced, the EMP now exceeds the Curzon-Ahlborn efficiency across the whole temperature range. This indicates that the low value of the EMP observed at higher values of T l for short stroke times is a truly finite-time effect. We will explore the physical origins of this behavior in the next section.

Work extraction from a BEC
In the textbook formulation of a classical heat engine, work extraction occurs from the pressure exerted by the working medium against a movable piston during the expansion stroke of the cycle [34]. However, this interpretation of work has clear issues when considering a fully condensed working medium, as particles in the zero-momentum state cannot exert any pressure [9]. This issue remains when considering the quantum formulation of work. For an isolated (unitarily evolving) quantum system, work is given by the change in internal energy [12]. As the isentropic compression and expansion strokes of the quantum Otto cycle are performed while the working medium is isolated from the thermal environment, the total work extracted will be the sum of the changes in internal energy during both strokes. If all particles remain in the zero-momentum ground state across both strokes, the changes in internal energy will be the same, and the total work extracted from the engine will be zero.
Following this line of reasoning, we must think about how to interpret the results in Fig. 5a. The engine is able to extract work while below the critical temperature, and does so at higher efficiency than a medium above the critical temperature. If the particles in the condensate contribute nothing to the work extracted from the engine, then this work extraction must come from the fraction of bosons that remain in an excited state outside of the condensate in the thermal cloud. The average number of particles in the thermal cloud can be found from [10], Utilizing the isentropic condition, along with the fact that the fugacity remains constant during the isentropic strokes, we see that the average number of particles in the thermal cloud must also remain fixed during the compression and expansion strokes. Let us consider a working medium below the critical temperature. In this regime z = 1 and the internal energy can be described by the first line of Eq. (11). Solving Eq. (38) for ω, we can rewrite the endoreversible work as, for the compression stroke and, for the expansion stroke. Using Eqs. (39) and (40) as well as Eqs. (16) and (21) and the isentropic conditions, we can express the endoreversible power entirely in terms of the experimental controllable parameters along with N comp T and N exp T , From this expression it is clear that the power depends directly on the number of particles in the thermal cloud during the compression and expansion strokes. Furthermore, we see that if all particles reside in the condensate, such that N exp T = N comp T = 0, the power output vanishes, confirming our supposition that the work extracted from the engine comes entirely from the bosons that remain in the thermal cloud.
From Eq. (41) we see that the power is maximized when N exp T is as large as possible and N comp T is as small as possible. Examining Eq. (10) we see that N T achieves its maximum value of N when T = T c , and vanishes as T approaches zero. Thus in order to maximize the power output from the engine, we want the expansion stroke to be as far below the critical temperature as possible, and the compression stroke to occur as close to the critical temperature as possible.
This provides a straightforward physical interpretation of the enhanced performance we see for the BEC working medium in comparison to a working medium above the critical temperature. As particles in the zero-momentum state cannot exert any pressure, the compressibility of the BEC phase diverges. With this being the case, just as no work can be extracted from the bosons in the BEC during the expansion stroke, no work is needed to compress them during the compression stroke. However, after the isochoric heating stroke a fraction of the particles that were compressed "for free" in the condensate will have been excited into the thermal cloud, allowing them to do work during the expansion process.
Let us now consider how this behavior leads to the EMPs seen in Figs. 5a, 5b, and 5c. In order to maximize the power output the work done on the medium during the compression stroke should be minimized, which occurs when T 1 ≈ T 2 , and the work by the medium during the expansion stroke should be maximized, which occurs when T 3 T 4 . Recalling the isentropic condition in Eq. (26) we see that when κ ≈ 1 the work cost of compression will be minimized, but when κ 1 the work gained on expansion will be maximized. The maximal power output occurs at the value κ * that best balances this trade-off.
Since the efficiency is always given by η = 1 − κ, regardless of the phase of the working medium, the fact that the BEC medium exceeds the Curzon-Ahlborn efficiency means κ * is always less than (T l /T h ) 1/2 when below the critical temperature. As the BEC medium can be compressed at a lower work cost, κ * can shift to a lower value, increasing the work gained on expansion. The same interpretation can be applied for the transition engine when T l is significantly below the critical temperature.
However, we see in Fig. 5c that at larger values of T l , when the temperature of the cold bath is closer to the critical temperature, the EMP falls below Curzon-Ahlborn. Using Eq. (10) we can express the critical temperature for the cooling stroke as, From Eq. (42) we see that the critical temperature also depends on κ. Thus having a larger value of κ raises the critical temperature for the cooling stroke, resulting in a cycle that operates with a larger percentage in the BEC regime and further reducing the compression work cost. This leads to larger values of κ * being favorable for maximum power output, leading to reduced EMP. However, as T l gets colder and colder, this increases the percentage of the cycle in the BEC regime faster than increasing κ would, and thus smaller values of κ * that maximize the work gained on expansion become preferable. The fact that increasing the cycle times leads to the transition engine EMP always exceeding the Curzon-Ahlborn efficiency favors this interpretation. Increasing the stroke times has a similar effect to lowering T l (as both lead to a decrease in T 4 ). Like decreasing T l , increasing the stroke times moves a larger percentage of the cycle into the BEC regime faster than raising the critical temperature by increasing κ. Thus for the case of long stroke times smaller values of κ * become preferable again.

Experimental considerations
Typically, BECs are created by cooling a trapped atomic gas using evaporative cooling, laser cooling, or a combination of the two [3-5, 35, 36]. While laser cooling is capable of achieving temperatures of only a few nanokelvin, it is most successful in low density systems [35]. For systems operating in the thermodynamic limit with a large number of particles, evaporative cooling provides a more realistic approach for achieving condensation.
Evaporative cooling provides an additional complication not explicitly considered in our analysis, namely that the total number of particles is no longer fixed. During the cooling strokes, the evaporative cooling process will result in a decrease in particle number, precluding the possibility of a completely closed thermodynamic cycle. However, this does not mean our analysis lacks applicability.
The simplest scenario under which our results remain valid is if the number of particles is sufficiently large, such that the fraction lost during each cooling stroke remains effectively zero. Furthermore, for an engine operating below the critical temperature, the total number of particles is not a thermodynamic variable, with the number of particles in the thermal cloud being determined solely by the temperature and frequency. Thus for the case of an engine operating fully in the condensate regime, as long as the number of particles lost to evaporative cooling remains low enough that the assumption of the thermodynamic limit is still valid, our results will remain applicable.

Concluding remarks
In this work we have examined both the quasistatic and endoreversible performance of an Otto cycle with a working medium of a harmonically confined Bose gas. We have shown that when the cycle is operated above the critical temperature, the efficiency at maximum power is equivalent to the Curzon-Ahlborn efficiency. However, when the cycle is operated below the critical temperature the efficiency at maximum power can significantly exceed the Curzon-Ahlborn efficiency. We have demonstrated that the power output of such a cycle is optimal when the number of particles in the condensate is maximized during the compression stroke and the number of particles in the thermal cloud is maximized during the expansion stroke. This enhanced power output is fundamentally an effect of the indistinguishable nature of quantum particles, arising from the fact that the particles in the zero-momentum state can be compressed at no work cost.
Bose-Einstein condensates show much potential for the development of ultra-high precision sensors [37] and for applications in quantum information processing [38]. However, in order to optimally implement BEC-based devices we must first understand their thermodynamics in a device-oriented context. Heat engines provide just such a framework. Here we have shown that the unique properties of the BEC phase can be leveraged to enhance heat engine performance. As the BEC phase is a fundamentally quantum state of matter, this is a demonstration of a thermodynamic "quantum advantage." It has also been demonstrated that the phenomena of Bose condensation can occur outside the realm of ultra-cold atomic gasses, such as in magnons, quasiparticle spin excitations in magnetic systems [39]. Magnon condensates have the distinct advantage of surviving at much higher temperatures, even up to room temperature [40]. Such systems may provide an ideal platform for experimental implementations of a BEC engine. Strongly coupled photon-matter excitations, known as polaritons [41,42], can also exhibit condensation. Polaritons are a fundamentally nonequilibrium system [42], however, and their nonequilibrium nature would have to be carefully accounted for in any treatment of their thermodynamics.
In this paper we have considered a BEC operating in the quasistatic and endoreveresible regimes. In the endoreversible regime, the protocol by which the frequency is varied during the compression and expansion strokes is irrelevant, as long as the condition of local equilibrium is maintained. Extending this work to the fully nonequilibrium regime would allow for an exploration of non-equilibrium, finite-time effects, such as the impact of specific ramp protocols on the engine performance. In Ref. [24] it was shown that work can be extracted from a BEC in the nonequilibrium regime by varying the nonlinear interaction strength of the BEC through the use of Feshbach resonances. Extending our analysis to the nonequilibrium regime would introduce the possibility of a cycle that can leverage both variations in the nonlinearity strength and external trapping potential. In principle, the work extracted from a BEC engine could also be employed to refrigerate another coupled gas. This might provide an avenue towards an effective means of cooling ultra-cold atomic vapors beyond the evaporative or laser cooling paradigms. We leave an exploration of these questions and more as potential topics for future work.

Appendix A: Isentropic condition
In this appendix we will derive the relationship between the frequency and temperature that maintains the isentropic condition for the compression and expansion strokes. From Eq. (12) we know that for T ≥ T c the entropy is given by, Noting that the entropy for T < T c is simply a special case of Eq. (A.1) with z = 1, if we can determine a relationship that maintains dS = 0 for arbitrary z we know that it will hold both above and below the critical temperature. As S = S(T, ω) we can express the isentropic condition as, (A.4) Let us consider the ansatz that the temperature-frequency relationship that maintains the isentropic condition is identical to the relationship found for a singleparticle harmonic Otto engine in Ref. [23], that is T A ω h = T B ω l and T C ω l = T D ω h . If this is the case, then we need to show that the right hand side of Eq. (A.7) The function g ν (z) obeys the recurrence relation [10], which we can use to express Eq. (A.7) as, (A.9) However, using Eq. (8) we know that, (A.10) Thus, the first condition simplifies to 1 = 1/4, which can never be satisfied. Next we examine the second condition, presented in Eq. (A.6). This can be rewritten,   Figure B1. Comparison between numerical calculation (red dots) and analytical third-order approximation (black line) for the fugacity of a 60,000 boson system. Trap frequency was taken to be ω = 150s −1 .

Appendix B: Numerical fugacity calculation
In this appendix we verify the fugacity found using the the third-order analytical approximation using a direct numerical calculation. In the numerical case, the fugacity is found by solving for the chemical potential at which the average particle number, determined by summing over the first 10,000 state occupations of the Bose-Einstein distribution, is equivalent to the total particle number. The temperature range and trap frequency parameters were chosen to be comparable to those used for the example cycle in Fig. 4. We see in Fig. B1 that the analytical approximation and numerical results show very good agreement, with the third-order approximation deviating only slightly when very close to the critical temperature.