{'fraction_non_alphanumeric': 0.03345811885821245, 'fraction_numerical': 0.01232257058181251, 'mean_word_length': 4.512897678417885, 'pattern_counts': {'":': 0, '<': 1, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Thermodynamics and phase transitions of a Kerr-Newman black hole in a cavity

The quasi-local energy of a Kerr-Newman black hole in a ﬁnite spherical cavity with ﬁxed radius is derived from the Hamiltonian, and the ﬁrst law of thermodynamics is constructed accordingly. In a canonical ensemble, the black hole could undergo a van der Waals-like phase transition. The temperature where the phase transition occurs decreases with the increase of the angular momentum or the charge. Our results imply that the thermodynamics of a Kerr-Newman black hole in a cavity shows extensive similarities to the one in AdS spacetime.


I. INTRODUCTION
One of the most appealing ways to define the energy of the gravitational field in a spatially bounded region follows from Brown and York's method [1]. In their pioneering work, the quasi-local energy is defined through the Hamiltonian. By means of such a definition, thermodynamic quantities for some simple gravitational systems enclosed by a cavity were obtained [2]. Nevertheless, there are several available reference backgrounds to choose. In many cases, the flat spacetime background is a preferred choice since it has the vanishing Hamiltonian. With this choice, the thermodynamics of a asymptotic flat Schwarzschild black hole enclosed by a spherical cavity was investigated in [3], where a phase transition that occurs between thermal flat spacetime and the black hole was found to be very similar to that of the Hawking-Page in AdS space [4]. Afterwards, the thermodynamics and phase transitions of a RN black hole in a cavity were studied in a grand canonical ensemble [5] and a canonical ensemble [6,7], which exhibit some similarities to the black hole in asymptotic AdS space.
Recently, some works have been focusing on the thermodynamics of other types of black holes in a cavity, which devoted to comparing phase transitions of black holes under different boundary conditions, i.e., AdS space and the cavity. For example, a Born-Infeld black hole in a cavity [8,9], a Gauss-Bonnet black hole in a cavity [10], a RN black hole surrounded by quintessence in a cavity [11], a spontaneously scalarized RN black hole in a cavity [12] and a BTZ black hole in a cavity [13] were fully studied. The main conclusion is that the thermodynamics and phase transitions of black holes under the two different boundary conditions show close resemblances but several dissimilarities. Furthermore, the thermodynamics of a black hole in a cavity can be discussed in an extended phase space, where the volume of the cavity was treated as a thermodynamic volume [14]. Other thermodynamic properties for black holes in a cavity such as the Ruppeiner geometry were also investigated in [15,16], which indicated that there may be a connection between black hole microstates and boundary conditions [15]. On the whole, most discussions about the thermodynamics of black holes in a cavity especially phase transitions, were based on static black holes. Although the rotating BTZ black hole was discussed in [13], it did not show rich phase structures due to the non-negative heat capacity. Therefore, one naturally generalizes the study to a rotating and charged Kerr-Newman black hole. The Kerr-Newman metric is an exact solution of the Einstein-Maxwell equation, which describes stationary spacetime with the angular momentum and the electric charge. In 1963, Kerr first found the metric of a spinning object in a gravitational field [17], which is a generalization of the Schwarzschild metric. Two years later, Newman et al. obtained the metric that can describe both rotating and charged spacetime [18]. Later on, with the advent of AdS/CFT conjecture [19,20], the thermodynamics of a Kerr-Newman black hole in AdS space was studied in [21], where the Hawking-Page phase transition was found in a grand canonical ensemble, and a van de Waals-like phase transition was found in a canonical ensemble. Other thermodynamic properties of the Kerr-Newman black hole under different conditions were extensively studied [22][23][24][25][26][27][28][29]. It was proposed by Smarr that under some specific conditions, the two-dimensional hypersurface of the Kerr spacetime can not be globally embedded in the three-dimensional Euclidean space [30], therefore only the quasilocal energy with a small angular momentum of the Kerr black hole was obtained [31].
A counterterm prescription inspired by the AdS/CFT conjecture was proposed [32][33][34][35], which solved this issue and was used to calculate the quasi-local energy and thermodynamic quantities of the Kerr and Kerr-AdS black holes [36]. After that, the quasi-local energy and thermodynamic quantities of the Kerr-dS and Kerr-Newman-dS black holes were also investigated in [37,38]. Nevertheless, rotating and charged black holes in a cavity still remain some unknowns at the phase transition level.
In this work, we probe the thermodynamics and phase transitions of a Kerr-Newman black hole in a cavity. The quasi-local energy we adopt is defined by the Brown-York method. To make the Hamiltonian well defined, a counterterm prescription is considered. The following part of this paper is organized as follows: In section II, we derive the quasi-local energy for the Kerr-Newman black hole and construct the first law of thermodynamics. In section III, we study the phase transition in a canonical ensemble and plot phase diagrams. The closing remarks are presented in section IV.

II. QUASI-LOCAL ENERGY AND THERMODYNAMICS
We start from the volume gravitational action coupled to the electromagnetic field, where R is the Ricci scalar of the manifold M, and F µν = ∂ µ A ν −∂ ν A µ is the electromagnetic field tensor. To give the correct field equation, a boundary term is required, and it is given by The integral of the above formula is calculated on the boundary ∂M, which can be written as the union of three parts ∂M = (−Σ t ) ∪ Σ t ∪ B, where Σ t , Σ t are two spacelike boundaries, and B is a timelike boundary. Besides, K is the trace of the extrinsic curvature on ∂M as embedded in M, and ε = 1 if ∂M is timelike while ε = −1 if ∂M is spacelike.
The foliation of the manifold is presented in FIG. 1. It turns out that the value of the action is divergent if one extends the boundary to infinity. Therefore, an extra term is needed to eliminate this divergence. Although this term is not always uniquely determined [39], a natural choice is where K 0 is the extrinsic curvature of ∂M that embedded in flat spacetime. This term makes the value of the action vanish when spacetime is flat. For a Kerr spacetime, not all the two-boundary surfaces are possible to be globally embedded in three-dimensional Euclidean space [30], which makes the extra term not well defined, and hence only the quasi-local energy with a small angular momentum is obtained [31]. To address these difficulties, one can resort to a counterterm prescription, which suggests that the term S 0 in Eq. (3) should be replaced by [32][33][34] where R denotes the Ricci scalar on the three-boundary B. Some analyses focus on another similar counterterm that substitutes R with the Ricci scalar of the two-boundary B, which is also called a lightcone reference [35]. In the following part, we will calculate thermodynamic quantities mainly based on the counterterm in Eq. (4) and make a brief discussion in the closing remark section about the thermodynamics in the lightcone reference. The geometric quantities in this paper are shown in TABLE I.
To obtain the Hamiltonian, one performs a (3 + 1) decomposition on the manifold M and arrives at [40] S = 1 16π  where Σ t describes a constant time hypersurface, R is the Ricci scalar on Σ t , N is the lapse function, σ denotes the determinant of the metric of B, and k is the trace of the extrinsic curvature of B as embedded in Σ t . Regarding h ab as the dynamic variable of the gravitational field, one obtains the corresponding conjugated momentum [40] where L G is the Lagrangian of the pure gravitational field. The dot over h ab denotes the Lie where N a is the shift function. The dynamic variable of the pure electromagnetic field is ∂ 0 A a , and hence the conjugated momentum is Consequently, the Hamiltonian density can be written as The Hamiltonian of the system can be obtained by integrating the Hamiltonian density in the space region Σ t and adding the boundary term, where r a is the unit normal of B as embedded in Σ t . Furthermore, we have three constraint equations. The Hamiltonian constraint reads where ρ = T αβ n α n β is the energy density of the electromagnetic field, and T αβ denotes the energy-momentum tensor, The momentum constraint reads where j a = T αβ e α a n β is the momentum density of the field. The Gauss's-law constraint reads With these three constraint equations, the Hamiltonian reduces to The mass-energy of the gravitational system inside the boundary B is defined as the first term in the Hamiltonian (14) with the choice of lapse N = 1 [1,41], which will be regarded as the thermodynamic internal energy.
We consider the Kerr-Newman spacetime, whose metric in the Boyer-Lindquist-type coordinates is given by [18,40] with ρ 2 = r 2 + a 2 cos 2 θ, where M is the ADM mass, a = J/M is the magnitude of the angular momentum per unit mass, and Q is the charge. The event horizon radius r + is determined by a coordinate singularity ∆ = 0, i.e., r 2 + − 2M r + + a 2 + Q 2 = 0. The induced line element on the constant time hypersurface Σ t can be written as We consider the system that the black hole is enclosed by a cavity with a fixed radius r B .
The line element on the hypersurface B thus is given by The determinant of the metric of B can be extracted from the line element above, The trace of the extrinsic curvature k ab of B that embedded in Σ t is The Ricci scalar of the boundary B with a fixed radius arrives at With these preliminaries, we then calculate the energy of the black hole in a cavity. A straightforward calculation of Eq. (15) gives where Moreover, when the angular momentum vanishes, the energy reduces to which is the energy of a RN black hole in a cavity [5]. The entropy of the Kerr-Newman black hole equals to one quarter of the event horizon area, We consider the following three equations: the event horizon determined by ∆ = 0 in Eq. (17) In the second equality, we have swapped the order of the derivative and the integral. Similarly, the angular velocity and the electric potential are defined as Therefore, the first law of thermodynamics can be written as Without loss of generality, we set the cavity radius r B = 1 and keep it invariant in the following discussions to simplify the calculation.

III. PHASE TRANSITION
We first analyze the thermodynamic stability of the black hole in a canonical ensemble by considering the heat capacity at fixed angular momentum and the charge, The It turns out that our model is suitable when the cavity radius r B is greater than the event horizon radius r + , therefore r + < 1. This can be used to constrain physical quantities of the black hole in a cavity. We turn to consider the three equations mentioned above: the horizon radius determined by ∆ = 0 in Eq. (17), the angular momentum J = M a and the entropy in Eq. (27). Solving these equations yields According to this inequality, we can plot the maximal value of the entropy in the angular Different from static black holes in a cavity, we found that the quasi-local energy of a Kerr-Newman black hole in a cavity depends on the background reference. More precisely, different counterterms in Eq. (4) will generate different results on quasi-local energy and thermodynamic quantities. One can also calculate the quasi-local energy in a lightcone reference. Therefore, a quantity ∆E can be used to characterize the difference between the quasi-local energy in our previous reference and the one in the lightcone reference, where R L is the Ricci scalar on the two-boundary B. It is straightforward to show that ∆E vanishes in two special cases: the angular momentum J = 0, and the cavity radius r B → ∞.
Consequently, the difference of thermodynamics on both references only emerges in the rotating black hole in a cavity. Furthermore, we found the numerical difference between both references is small on the thermodynamics and phase transitions but significant in the physically allowed region in the angular momentum-charge parameter space, as shown in FIG. 6. A detailed analysis also shows that, the difference between thermodynamic quantities of the two references increases as the angular momentum increases, and decreases as the charge increases.

V. ACKNOWLEDGMENTS
We are grateful to Yihe Cao, Qi Xu and Jiayi Wu for useful discussions and valuable comments. This work is supported by NSFC (Grant No.12147207 and 12105031).