1 Introduction

Topological approaches are effective ways for studying physical systems, which ignore the specific structure of the systems and focus on their general characteristics. Defects are important tools for these approaches, as they reveal certain properties of field configurations. Recently, a topological approach has been used to research on the black holes [1]. In this elegant approach, the black hole solutions are treated as defects in the thermodynamic parameter space. Local thermodynamic stability and instability of a black hole are determined by positive and negative winding numbers, respectively. The global characteristic is characterized by a topological number which is sum of the winding numbers for all the black hole branches at an arbitrary temperature. Each black hole is endowed with a topological number, and then black holes can be classified according to the values of the numbers. This approach was based on Duan’s \(\phi \)-mapping topological current theory [2, 3], and a key point is the construction of a vector field. In [1], they defined the field through the introduction of a generalized free energy. Based on this work, the influences of the cosmological constant, angular momentum parameters, charges, and other parameters on the topological numbers in the different spacetimes have been extensively researched, and many important results have been found [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]. In black hole physics, topological approaches are not limited to the study of black hole classification, but are also used to study light rings and shadows, as well as other natures of black holes [36,37,38,39,40,41,42,43].

In this paper, we study topological numbers for uncharged and charged black holes obtained in the theory of \(z=3\) Hořava–Lifshitz (HL) gravity in different ensembles. The influence of a dynamical coupling constant for the uncharged black holes and that of different ensembles for the charged black holes on the topological numbers are discussed. HL theory was proposed by Hořava [44,45,46], which is a non-relativistic renormalizable theory of gravity at a Lifshitz point. At short distances, this theory describes interacting nonrelativistic gravitons. When the condition of detailed balance is restrictively obeyed, it is intimately related to topologically massive gravity in three dimensions. At long distances, it reduces to the relativistic value \(z = 1\), where z measures the degree of anisotropy between space and time. Therefore, this theory is seen as a candidate for the UV completion of Einstein’s general relativity. Since the theory was proposed, it immediately attracted much attention. Lü first obtained the solutions for spherically symmetric black holes and Friedman–Lemaître–Robertson–Walker cosmology from the HL gravity action [47]. Subsequently, Cai et al. considered a general dynamical coupling constant, and obtained the solution of the topological black holes and discussed their thermodynamic properties [48,49,50]. The above solutions are for the case of \(z=3\). The black hole solutions of \(z = 4\) HL gravity were gotten in [51] and their thermodynamics were studied in [52, 53]. Compared with other UV complete gravity theories, HL theory exhibits significantly different UV behaviors. Meanwhile, different values of the coupling constant and different ensembles may affect topological numbers. Therefore, it is necessary to study the topological properties of this theory and the influence of the dynamic coupling constant on topological numbers.

The rest is organized as follows. In the next section, we give a brief review of the topological approach proposed in [1]. In Sect. 3, we study the influence of different values of the dynamic coupling constant on the topological numbers for the uncharged black holes. In Sect. 4, the influence of different ensembles on the topological numbers for the charged black holes is studied. The last section is devoted to our conclusion and discussion.

2 Review of topological approach

In [1], the generalized free energy is defined by

$$\begin{aligned} {\mathcal {F}} = E- \frac{S}{\tau }, \end{aligned}$$
(2.1)

where E and S are the energy and entropy of a system, respectively. \(\tau \) is a variable and can be seen as the inverse temperature of the cavity enclosing the black hole. This free energy is off-shell except at \(\tau = 1/T\). An important vector is constructed via a thermodynamic approach,

$$\begin{aligned} \phi = \left( \frac{\partial {\mathcal {F}}}{\partial r_h}, -\cot \Theta \csc \Theta \right) . \end{aligned}$$
(2.2)

where \(0<r_h<+\infty \) and \(0\le \Theta \le \pi \). Zero points of the vector obtained at \(\tau = 1/T\) and \(\Theta = \pi /2\) correspond to the on-shell black hole solution. Other points are not the solutions of Einstein field equations, and then they are the off-shell states. \(\phi ^{\Theta }\) diverges at \(\Theta =0\) and \(\Theta =\pi \), which leads to that the direction of the vector is outward.

Using Duan’s \(\phi \)-mapping topological current theory, one can define a topological current [2, 3]

$$\begin{aligned} j^{\mu } = \frac{1}{2\pi }\varepsilon ^{\mu \nu \rho }\varepsilon _{ab}\partial _{\nu }n^a\partial _{\rho }n^b, \end{aligned}$$
(2.3)

where \(\mu ,\nu ,\rho = 0,1,2\), \(a,b = 1,2\), \(\partial _{\nu } = \frac{\partial }{x^{\nu }}\) and \(x^{\nu } = (\tau , r_h, \Theta )\). \(\tau \) is seen as a time parameter of the topological defect, and \(n^a\) is a unit vector defined by \(\frac{\phi ^a}{||\phi ||}\) \((a=1,2)\) with \(\phi ^a = (\phi ^{r_h}, \phi ^{\Theta }\)) and \(||\phi ||\) is the norm of the vector \(\phi \). It is easy to prove that current is conserved. Using the Jacobi tensor \(\varepsilon ^{ab}J^{\mu }(\frac{\phi }{x}) = \varepsilon ^{\mu \nu \rho } \partial _{\nu }{\phi }^a\partial _{\rho }{\phi }^b\) and two-dimensional Laplacian Green function \(\Delta _{\phi ^a}ln||\phi ||=2\pi \delta ^2(\phi )\), the current is rewritten as [40]

$$\begin{aligned} j^{\mu } = \delta ^2(\phi )j^{\mu }\left( \frac{\phi }{x}\right) , \end{aligned}$$
(2.4)

which is nonzero only when \(\phi ^a(x^i) = 0\). Then a topological number in a parameter region \(\sum \) is obtained as follows

$$\begin{aligned} W= \int _{\sum }j^{0}d^2x= \sum _{i=1}^{N}\beta _i\eta _i = \sum _{i=1}^{N}w_i, \end{aligned}$$
(2.5)

where \(j^{0} = \sum _{i=1}^{N}\beta _i\eta _i\delta ^2(\vec {x}-\vec {z}_i)\) is the density of the current, \(\beta _i\) is Hopf index which counts the number of the loops that \(\phi ^a\) makes in the vector \(\phi \) space when \(x^{\mu }\) goes around the zero point \(z_i\). Clearly, this index is always positive. \(\eta _i\)=sign\(J^0(\phi /x)_{z_i} = \pm 1\) is the Brouwer degree. \(w_i\) is the winding number for the i-th zero point of the vector in the region and its values is independent on the shape of the region.

3 Topological numbers for uncharged HL black holes

The action of the \(z=3\) Horava–Lifshitz theory is written as [44, 45]

$$\begin{aligned} I= & {} \int {dtd^3x({\mathcal {L}}_0 + {\mathcal {L}}_1)}, \nonumber \\ {\mathcal {L}}_0= & {} \sqrt{g}N \left[ \frac{2}{\kappa ^2}(K_{ij}K^{ij}-\lambda K^2) + \frac{\kappa ^2\mu ^2(\Lambda R -3\Lambda ^2)}{8(1-3\lambda )}\right] ,\nonumber \\ {\mathcal {L}}_1= & {} \sqrt{g}N \left[ \frac{\kappa ^2\mu ^2(1 -4\lambda )}{32(1-3\lambda )}R^2\right. \nonumber \\{} & {} \left. -\frac{\kappa ^2}{2\omega ^4}\left( C_{ij} - \frac{\mu \omega ^2 R_{ij}}{2}\right) \left( C^{ij} - \frac{\mu \omega ^2 R^{ij}}{2}\right) \right] , \end{aligned}$$
(3.1)

where \(\kappa ^2\), \(\lambda \), \(\mu \), \(\omega \) and \(\Lambda \) are constant parameters, and the Cotten tensor, \(C_{ij}\), is defined by

$$\begin{aligned} C_{ij}= & {} \epsilon ^{ikl}\Delta _k \left( R^i_l- \frac{1}{4}R \delta ^i_l\right) . \end{aligned}$$
(3.2)

Comparing the action to that of general relativity, one can get the speed of light, Newton’s constant and the cosmological constant,

$$\begin{aligned} c=\frac{\kappa ^2 \mu }{4}\sqrt{\frac{\Lambda }{1- 3\lambda }}, \quad G=\frac{\kappa ^2}{32\pi c}, \quad \Lambda _C = \frac{3}{2}\Lambda . \end{aligned}$$
(3.3)

\({\mathcal {L}}_0\) is equivalent to the usual Einstein-Hilbert Lagrangian when \(\lambda = 1\). In the HL theory, \(\lambda \) is the dynamical coupling constant, susceptible to quantum corrections [44]. The cosmological constant is negative when \(\lambda > 1/3\), and is positive when \(\lambda < 1/3\). In this paper, we only consider the negative cosmological constant.

Cai et al. considered a general dynamical coupling constant \(\lambda \), and obtained the solution of the topological black holes in the HL gravity [48, 49]. The metric is

$$\begin{aligned} ds^2=-N^2(r)f(r)dt^2+\frac{dr^2}{f(r)}+ r^2 d\Omega _{k}^2, \end{aligned}$$
(3.4)

where \(d\Omega _{k}^2\) is the line element for two-dimensional space with constant scalar curvature 2k. Without loss of generality, we take \(k = 1, 0\) and \( -1\) which implies the spherical, flat and hyperbolic horizons, respectively. The functions f(r) and N(r) are given by

$$\begin{aligned} f(r)=k-\Lambda r^2-\alpha r^s, \quad N(r)=\gamma r^{1-2s}, \end{aligned}$$
(3.5)

where \(\alpha \) and \(\gamma \) are both integration constants, and s is defined by \(s=\frac{2\lambda \pm \sqrt{2(3\lambda -1)}}{\lambda -1}\). In [50], the authors studied the thermodynamical properties of the charged and uncharged topological black holes, and found some interesting result which were never observed in Einstein gravity. The cosmological constant was seen as a fixed constant in the past. Recently, it has been regarded as a variable related to pressure, \(P = -\frac{\Lambda }{8\pi } = \frac{3}{8\pi l^2}\), and its conjugate quantity is a thermodynamic volume V. In this paper, we use the initial expression of the cosmological constant. The mass, Hawking temperature, entropy are [48]

$$\begin{aligned} M= & {} \frac{\sqrt{2} \kappa ^2 \mu ^2\Omega _{k} \gamma }{16\sqrt{3\lambda -1}}\frac{(k-\Lambda r_h)^2}{r_h^{2s}},\nonumber \\ T= & {} \frac{\gamma }{4\pi r_h^{2s}}[-\Lambda r_h^2(2-s)-ks], \nonumber \\ S= & {} \frac{\pi \kappa ^2 \mu ^2\Omega _{k}}{\sqrt{2(3\lambda -1)}}\left[ k \ln (\sqrt{-\Lambda }r_h) +\frac{1}{2}(\sqrt{-\Lambda }r_h)^2\right] +S_0.\nonumber \\ \end{aligned}$$
(3.6)

In the above equations, \(r_h\) is the horizon radius and \(S_0\) is a constant. When the speed of light \(c=\frac{\kappa ^2 \mu }{4}\sqrt{\frac{\Lambda }{1-3\lambda }} = \frac{2-s}{1+s}\frac{\kappa ^2 \mu \sqrt{-\Lambda }}{4\sqrt{2}}\) and Newton’s constant are adopted, the mass and entropy are rewritten as follows [50]

$$\begin{aligned} M{} & {} =\frac{c^3\gamma \Omega _k\Lambda }{16\pi G}\frac{1+s}{s-2}\left( k- \Lambda r_h^2\right) ^2r_h^{-2s}, \nonumber \\ S{} & {} =\frac{c^3\Omega _k\Lambda }{4G}\frac{1+s}{s-2}[k \ln (-\Lambda r_h^2 )-\Lambda r_h^2 ]+S_0. \end{aligned}$$
(3.7)

To study the topological properties, we adopt the definition of the generalized free energy and get

$$\begin{aligned} {\mathcal {F}}= & {} \frac{c^3\gamma \Omega _k\Lambda }{16\pi Gr_h^{2s}}\frac{1+s}{s-2}\left( k- \Lambda r_h^2\right) ^2\nonumber \\{} & {} -\frac{c^3\Omega _k\Lambda [k \ln (-\Lambda r_h^2 )-\Lambda r_h^2 ]\frac{1+s}{s-2}+4G S_0}{4G\tau }. \end{aligned}$$
(3.8)

We calculate the vector \(\phi \) and obtain its components,

$$\begin{aligned} \phi ^{r_h}= & {} \frac{c^3\gamma \Omega _k\Lambda \left( k- \Lambda r_h^2\right) }{8\pi Gr_h^{2s+1}}\frac{1+s}{2-s}\left[ 2\Lambda +s\left( k- \Lambda r_h^2\right) \right] \nonumber \\{} & {} -\frac{c^3\Omega _k\Lambda }{4G\tau r_h}\frac{1+s}{s-2}\left( k- \Lambda r_h^2\right) ,\nonumber \\ \phi ^{\Theta }= & {} -\cot \Theta \csc \Theta . \end{aligned}$$
(3.9)

Zero points of \(\phi ^{r_h}\) determine the topological properties. Let \(\phi ^{r_h} = 0\) and get the relation between \(r_h\) and \(\tau \),

$$\begin{aligned} \tau =-\frac{2 \pi r_h^{2 s}}{\gamma \left[ -2\Lambda r_h^2 -s(k- \Lambda r_h^2)\right] }, \end{aligned}$$
(3.10)

which shows the change of the inverse temperature with the horizon radius. To clearly and intuitively study the local and global properties of the black holes, we use Eqs. (3.9) and (3.10) and plot Figs. 1, 2, 3, 4, 5, 6 and 7. The influence of the dynamical coupling constant \(\lambda \) on the topological numbers is inversed in these figures. During the calculation, \(c= G=\Omega _k =1\), and \(r_0\) is the length scale of the cavity surrounding the black holes.

Fig. 1
figure 1

Topological properties of the uncharged HL black hole, where \(k = 1\), \(s = 1/2\), \(\lambda = 1\), \(\gamma = 1\) and \(\Lambda r_0^2 = -0.00838\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=50.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )= (21.82, \pi /2\))

Fig. 2
figure 2

Topological properties of the uncharged HL black hole, where \(k = 0\), \(s = 1/2\), \(\lambda = 1\), \(\gamma = 1\) and \(\Lambda r_0^2 = -0.00838\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=50.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )\)= (\(20.00, \pi /2\))

Fig. 3
figure 3

Topological properties of the uncharged HL black hole, where \(k = -1\), \(s = 1/2\), \(\lambda = 1\), \(\gamma = 1\) and \(\Lambda r_0^2 = -0.00838\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=60.00 \) is plotted in the right picture. Zero points are at \((r_h/r_0,\Theta )\)= (\(2.89, \pi /2\)) and (\(13.78, \pi /2\)), respectively

Fig. 4
figure 4

Topological properties of uncharged HL black holes, where \(k = 1,0\) or \(-1\), \(s =0\), \(\lambda = 1/2\) and \(\Lambda r_0^2 = -~0.00838\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=40.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )\)= (\(14.31, \pi /2\))

Fig. 5
figure 5

Topological properties of the uncharged HL black hole, where \(k = 1\), \(s =1\), \(\lambda = 3\) and \(\Lambda r_0^2 = -~0.08380\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=60.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )\)= (\(6.57, \pi /2\))

From the left picture of Fig. 1, we find that the horizon radius decreases monotonically with the increase of \(\tau \)’s value, which implies that there is only one on-shell black hole solution for an fixed \(\tau \)’s value and no phase transition to appear. Thus the black hole is stable for any temperature. We use the method developed in [1] and find that the winding number is \(w =1\). We order \(\tau /r_0=50.00 \) and plot the picture of the unit vector field in the right picture of the figure. There is one zero point which is at \((r_h/r_0,\Theta )\)= (\(21.82, \pi /2\)) in the picture. The winding number can also be calculated by using the method in [40, 41], and it is independent of loops that surround the zero point. Thus we calculate it through the red contour C1 in Fig. 1. Its winding number is 1, which shows the stability of the black hole. The global characteristic is characterized by the topological number for this black hole, which is \(W = w =1\). In [10], the authors found that the topological number for a four-dimensional Schwarzschild AdS black hole is 0. Therefore, this black hole is different from the Schwarzschild AdS black hole in topological class.

When \(k=0\), the horizon is flat and the topological properties are reflected in Fig. 2. It is clearly from the left picture that the topological number is also 1 and there is no phase transition. And then the winding number yielded by the zero point is 1.

When \(k=-1\), the metric (3.4) denotes the black hole with a hyperbolic horizon and its topological properties are shown in Fig. 3. There are two on-shell black hole solutions in the left picture. In [1], the authors defined an annihilation point and a generation point based on \(\frac{d^2\tau }{dr^2_h}>0\) and \(\frac{d^2\tau }{dr^2_h}<0\) at a certain point \(\tau _c\), respectively. Using these definitions, we find that an annihilation point appears in the left picture of the figure. This annihilation point divides the black hole into a stable region and an unstable region, which yield the winding numbers are 1 and \(-1\), respectively. A second-order phase transition occurs at the annihilation point. There are two horizon radii for a same \(\tau \) when \(\tau < \tau _c = 79.53\), and they coincide with each other at the annihilation point. When \(\tau > \tau _c\), there is no black hole existed in the left picture. The positions of the zero points are shown in the right picture of the figure and are located at (\(2.89, \pi /2\)) and (\(13.78, \pi /2\)), respectively. The winding numbers corresponding to these two points are 1 and \(-1\), respectively. Thus the topological number is 0.

Fig. 6
figure 6

Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \), where \(k = 0\), \(s =1\), \(\lambda = 3\) and \(\Lambda r_0^2 =- 0.08380\)

Fig. 7
figure 7

Topological properties of the uncharged HL black hole, where \(k = -1\), \(s =1\), \(\lambda = 3\) and \(\Lambda r_0^2 = -~0.00838\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=40.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )\)= (\(7.01, \pi /2\))

When \(\lambda =1/2 \), there is \(s=0 \), and it is easy to find from Eq. (3.10) that the value of \( \tau \) is independent of k. Thus the topological properties of the black holes with the spherical, flat and hyperbolic horizons are shared by Fig. 4. In the figure, the horizon radii decrease monotonically with the increase of \(\tau \)’s value, which shows that the black holes are stable for any temperature and the winding number is 1. The black holes have a same topological number 1. The zero points are located at the same position. This shows that the dynamical coupling constant \(\lambda \) plays an important role in the topological class of the black holes.

When \(\lambda =3\), we get \(s=1\) and plot Figs. 5, 6 and 7. From Fig. 5, we find that when the \(\tau \)’s value decreases at a certain value, the horizon radius increase very fast. The black hole is stable for any \(\tau \)’s value and its winding number is 1. The zero point is at \((r_h/r_0,\Theta )\)= (\(6.57, \pi /2\)). Therefore, its topological number is 1.

When \(k=0\), it is easy to find from Eq. (3.10) that the \(\tau \)’s value is independent on the horizon radius. Therefore, the variation of \(r/r_0\) with \(\tau /r_0\) is a vertical line parallel to the vertical axis in Fig. 6. The horizon radius is not affected by the \(\tau \)’s value, and the black hole is stable. It is natural to obtain the topological number of 1.

When \(k=-1\), Fig. 7 is plotted. In the figure, the horizon radius increase monotonically with the \(\tau \)’s value, which shows that the black hole is unstable for any \(\tau \)’s value and its winding number is \(-1\). The zero point is at (\(7.01, \pi /2\)) for \(\tau /r_0=40.00 \) and corresponds to the winding number \(-1\). Therefore, the topological number is \(-1\).

Comparing Figs. 1, 2, 3, 4, 5, 6 and 7, it is evident that the uncharged black hole with the spherical and flat horizons have the same topological number. However, for the different values of \(\lambda \) in the uncharged black hole with the hyperbolic horizon, its topological numbers can be 1, 0 or \(-1\). Therefore, its topological number is parameter dependent.

4 Topological numbers for charged HL black holes in different ensembles

The solution of the charged black hole in the HL gravity theory with an electromagnetic field was gotten when \(s=1/2\) and \(\lambda = 1\) [48]. It is also given by the metric (3.4). Now the functions \(N(x)= 1\) and \(f(x)=k+\frac{x^2}{1-\epsilon ^2}- \frac{\sqrt{\epsilon ^2 x^4 + (1-\epsilon ^2)(c_0 x- q^2/2)}}{1-\epsilon ^2}\). Taking the limit \(\epsilon \rightarrow 1\), the solution becomes \(f(x)=k+ \frac{x^2}{2}- \frac{c_0}{2x} +\frac{q^2}{4x^2}\), which is the AdS Reissner–Nordström black hole solution. Our interest is focused on the solution with \(\epsilon ^2 = 0\). Taking \(\epsilon ^2 = 0\), the function is

$$\begin{aligned} f(x)=k+x^2-\sqrt{c_0 x-\frac{q^2}{2}}, \end{aligned}$$
(4.1)

where \(x=\sqrt{-\Lambda } r\), q and \(c_0\) are integral constants. \(c_0\) can be expressed as \(c_0=\frac{2k^2+q^2+4k x_{+}^2+2x_{+}^4}{2x_{+}}\), and \(x_+ =\sqrt{-\Lambda } r_h\) is determined by \(f(x_+)=0\), where \(r_h\) is the horizon radius. The black hole’s mass and charge are \(M=\frac{\kappa ^2 \mu ^2 \Omega _k \sqrt{-\Lambda } c_0 }{16}\) and \(Q=\frac{\kappa ^2 \mu ^2 \Omega _k \sqrt{-\Lambda } q }{16}\), respectively. We also use speed of light and Newton’s constant to rewrite the mass and charge as follows,

$$\begin{aligned} M=\frac{c^3 \Omega _{k} c_0}{16 \pi G \sqrt{-\Lambda }}, \quad Q=\frac{c^3 \Omega _{k} q}{16 \pi G \sqrt{-\Lambda }}. \end{aligned}$$
(4.2)
Fig. 8
figure 8

Topological properties of the charged HL black hole in the canonical ensemble, where \(k = 1\) and \(\Lambda r_0^2 = -~0.01\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=40.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )\)= (\(22.54, \pi /2\))

The Hawking temperature, entropy and electromagnetic potential are

$$\begin{aligned} T= & {} \sqrt{-\Lambda }\frac{6x_+^4 +4k^2x_+^2 -2k^2-q^2}{16 \pi k x_+ +16 \pi x_+^3},\nonumber \\ S= & {} -\frac{c^3 \Omega _k }{4 G \Lambda }\left( 2k \ln x_+ + x_+^2 \right) +S_0, \nonumber \\ \Phi= & {} \frac{q}{x_+} + \Phi _0, \end{aligned}$$
(4.3)

respectively, where \(S_0\) and \(\Phi _0\) are constants. In the following, we study the topological numbers for this black hole in canonical and grand canonical ensembles, respectively.

4.1 Topological numbers in canonical ensemble

For a canonical ensemble, there is only an exchange of energy between the system and the external environment, and the system’s temperature, volume and particle number remain be unchanged. We use the definition of the generalized free energy and get

$$\begin{aligned} {\mathcal {F}}= \frac{c^3 \Omega _{k} c_0}{16 \pi G \sqrt{-\Lambda }} +\frac{c^3 \Omega _k \left( 2k \ln x_+ + x_+^2 \right) +4S_0}{4 G \Lambda \tau }. \end{aligned}$$
(4.4)

According to the definition of the vector \(\phi \), its components are

$$\begin{aligned} \phi ^{r_h}= & {} \frac{c^3 \Omega _k \left( 2 k^2+q^2-4 k x_+^2-6 x_+^4\right) }{32 \pi G x_+^2}-\frac{c^3 \Omega _k \left( x_+^2 + k\right) }{2 G \tau \sqrt{-\Lambda }x_+}, \nonumber \\ \phi ^{\Theta }= & {} -\cot \Theta \csc \Theta . \end{aligned}$$
(4.5)

We let \(\phi ^{r_h} =0\), and get the relation between \(\tau \) and \(r_h\), which is

$$\begin{aligned} \tau =\frac{16 \pi (x_+^3 + kx_+)}{\sqrt{-\Lambda }(6x_+^4 + 4kx_+^2 -2k^2 -q^2)}. \end{aligned}$$
(4.6)

In this section, we also order \(c=G=\Omega _{k} =1\) and \(q= 1\) to plot Figs. 8, 9 and 10 and to describe its topological properties. In the figures, we can get the winding numbers from the change of \(r_h\) with \(\tau \) which reflects the local properties, and the topological numbers which is the sum of the winding numbers.

Fig. 9
figure 9

Topological properties of the charged HL black hole in the canonical ensemble, where \(k = 0\) and \(\Lambda r_0^2 = -~0.01\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=40.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )\)= (\(21.12, \pi /2\))

In Fig. 8, the radius of the event horizon monotonically decreases with the increase of \(\tau \)’s value, which shows that the black hole is stable for any \(\tau \)’s value and there is no phase transition to appear. It is easy to get the winding number as 1. Thus the topological number for the black hole with the spherical horizon is 1. When \(\tau /r_0 =40.00\), the unit vector field n is plotted in the right picture of the figure. There is only one zero point which is at (\(22.54, \pi /2\)), which also shows the topological number is 1. In [1], the authors have found that the topological number for the four-dimensional RN AdS black hole is 1, therefore, both this black hole and the RN AdS black hole belong to a class with a topological number of 1.

It is also easy to find from Fig. 9 that the topological number of the black hole with the flat event horizon is 1. The zero point is at (\(21.12, \pi /2\)) in this figure.

Unlike the previous two figures, there are two curves in Fig. 10. The upper curve represents a monotonic decrease of the horizon radius with the increase of \(\tau \)’s value, which leads to the winding number 1. For another curve, an annihilation point divides the black hole into stable and unstable regions, and their winding numbers are 1 and \(-1\), respectively. We used the approach in [14] to calculate the topological number for the black hole with the hyperbolic horizon by considering the combination effect of these two curves. Therefore, the topological number is 1. In the right picture, the zero points are at \((r_h/r_0,\Theta )\)= (\(4.38, \pi /2\)), (\(7.30, \pi /2\)) and (\(15.38, \pi /2\)), which generate the winding numbers of 1, \(-1\), and 1, respectively. On the other hand, a heat capacity is an effective tool for distinguishing the thermodynamic stability and second-order phase transitions in thermodynamic systems [22]. The heat capacity of this black hole is \(C_Q = T\left( \frac{\partial S}{\partial T}\right) _Q =\frac{(k-r_h^2\Lambda )^2[q^2+2(k-r_h^2\Lambda )(k+3r_h^2\Lambda )]}{2\Lambda (k-3r_h^2\Lambda )[q^2+2(k-r_h^2\Lambda )^2]}\). We focus our interest on the case of \(k=-1\). It is easy to obtain that the heat capacity diverges at \(T^{-1}=\tau _c =52.75\), which implies that the second-order phase transition occurs. The heat capacity is greater than zero at \(r_h = 4.34\) and 15.38, which means the stability of the black hole. The heat capacity is less than zero at point \(r_h = 7.30\), which indicates the instability of the black hole.

Fig. 10
figure 10

Topological properties of the charged HL black hole in the canonical ensemble, where \(k = -1\) and \(\Lambda r_0^2 = -~0.01\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=50.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )\)= (\(4.34, \pi /2\)), (\(7.30, \pi /2\)) and (\(15.38, \pi /2\)), respectively

Fig. 11
figure 11

Topological properties of the charged HL black hole in the grand canonical ensemble, where \(k = 1\) and \(\Lambda r_0^2 = -~0.01\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=40.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )\)= (\(22.31, \pi /2\))

Fig. 12
figure 12

Topological properties of the charged HL black hole in the grand canonical ensemble, where \(k = 0\) and \(\Lambda r_0^2 = -~0.01\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=40.00 \) is plotted in the right picture. The zero points are at \((r_h/r_0,\Theta )\)= (\(4.68, \pi /2\)) and (\(20.76, \pi /2\)), respectively

Fig. 13
figure 13

Topological properties of the charged HL black hole in the grand canonical ensemble, where \(k = -1\) and \(\Lambda r_0^2 = -~0.01\). Zero points of the vector \(\phi ^{r_h}\) in the plane \(r_h - \tau \) are plotted in the left picture. The unit vector field n on a portion of the plane \(\Theta - r_h \) at \(\tau /r_0=40.00 \) is plotted in the right picture. The zero point is at \((r_h/r_0,\Theta )\)= (\(0.82, \pi /2\)), (\(11.04, \pi /2\)) and (\(18.83, \pi /2\)), respectively

4.2 Topological numbers in grand canonical ensemble

In the grand canonical ensemble, the system can exchange the energy and charge with the outside, and its temperature, volume and chemical potential remain be unchanged. Now the generalized free energy is defined by

$$\begin{aligned} {\mathcal {F}}= & {} E-Q\Phi -\frac{S}{\tau } \nonumber \\= & {} \frac{c^3 \Omega _{k}c_0 }{16\pi G \sqrt{-\Lambda }} \nonumber \\{} & {} -\frac{c^3 \Omega _k q}{16 \pi G \sqrt{-\Lambda }}\left( \frac{q}{x_+}+\Phi _0\right) \nonumber \\{} & {} +\frac{c^3\Omega _k \left( 2k \ln x_+ + x_+^2 \right) +4S_0}{4 G \Lambda \tau }. \end{aligned}$$
(4.7)

We use the definition of the vector \(\phi \), and get its components,

$$\begin{aligned} \phi ^{r_h}= & {} \frac{c^3 \Omega _k \left( 2 k^2-q^2-4 k x_+^2-6 x_+^4\right) }{32 \pi G x_+^2}-\frac{c^3 \Omega _k \left( x_+^2 + k\right) }{2 G \tau \sqrt{-\Lambda }x_+}, \nonumber \\ \phi ^{\Theta }= & {} -\cot \Theta \csc \Theta . \end{aligned}$$
(4.8)

Solving \(\phi ^{r_h} = 0\) yields the relation

$$\begin{aligned} \tau =\frac{16 \pi (x_+^3 + kx_+)}{\sqrt{-\Lambda }(6x_+^4 + 4kx_+^2 -2k^2 +q^2)}. \end{aligned}$$
(4.9)

We use Eqs. (4.8) and (4.9) and plot Figs. 11, 12 and 13 to describe the topological properties. Clearly, the topological number for the black hole with the spherical horizon in Fig. 11 is 1, which is same as that in the canonical ensemble.

In Fig. 12, an annihilation point appears when \(\tau _c = 75.09\) and it divides the black hole into the stable and unstable regions. The phase transition occurs at this annihilation point. In the stable region, the horizon radius monotonically decreases with the increases of \(\tau \)’s value. In the unstable region, the horizon radius monotonically increases with the increases of \(\tau \)’s value. Its topological number is 0. The zero points are at \((r_h/r_0,\Theta )\)= (\(4.68, \pi /2\)) and (\(20.76, \pi /2\)), respectively.

There are two separate curves in Fig. 13. The upper left curve has a stable black hole region and an unstable black hole region, with a winding number of 1 and \(-1\), respectively. The phase transition occurs at the annihilation point \(\tau _c = 48.12\). For another curve, a generation point and an annihilation point divide the black hole into three regions. These three regions correspond to a large black hole, an intermediate black hole, and a small black hole, respectively. The winding numbers for them are \(-1\), 1, and \(-1\), respectively. Thus the topological number is \(-1\). It is easy to find from the figure that there is a small-large black hole phase transition near an inverse temperature of \(\tau /r_0 = 116.00\). The right picture shows three zero points, which were obtained at \(\tau /r_0= 40.00\). The winding numbers corresponding to these three zeros are \(-1\), 1, and \(-1\), respectively. Therefore, the sum of the three also yields a topological number of \(-1\). It should be noted that when we take \(\tau /r_0 = 40.00\), we can only obtain three zero points. When \(\tau /r_0 = 116.00\), three other zero points can be obtained, which are not shown in the figure. Considering the winding numbers in both cases, we can also obtain a topological number of \(-1\).

Compared with the results in the canonical ensemble, it is not difficult to find that the black hole with the spherical horizon has the same topological number in the canonical and grand canonical ensembles, while the black holes with the flat and hyperbolic horizons have different topological numbers in the canonical and grand canonical ensembles. Therefore, the topological numbers for the black holes with the flat and hyperbolic horizons are ensemble dependent.

5 Conclusion and discussion

In this work, we studied the topological numbers for the uncharged and charged black holes in the HL gravity. The influence of the dynamical coupling constant \(\lambda \) on the topological numbers for the uncharged black holes has been extensively discussed. For the charged black holes, their topological numbers in the canonical and grand canonical ensembles were studied. The numbers for these black holes obtained in the work are listed in Tables 1 and 2.

For the uncharged black holes with the spherical and flat horizons, their topological numbers are the same and independent on the value of the coupling constant. For the uncharged black hole with the hyperbolic horizon, different values of the coupling constant result in different topological numbers, which indicates that the topological number for this black hole is parameter dependent. This coupling constant plays an important role in the topological class of black holes. We have also studied the topological numbers for the charged black holes in the canonical and grand canonical ensembles. In these two ensembles, the topological numbers for the charged black hole with the spherical horizon are the same. While the black holes with the flat and hyperbolic horizons have different topological numbers in these two ensembles. This shows that the last two black holes are ensemble dependent.

On the other hand, according to topological classification, the charged black hole with a spherical horizon and the uncharged black hole belong to the same class because they have the same topological number. Due to the fact that the uncharged and charged black holes with flat and hyperbolic horizons are parameter dependent and ensemble dependent, respectively, it is necessary to consider the parameters’ values and ensemble’s selection when classifying them. Furthermore, our work is limited to the influence of the dynamic coupling constant on the topological numbers for the static HL black holes. Whether this constant also has an important influence on the number for rotating HL black holes needs to be further confirmed in future work.

Table 1 Topological numbers of uncharged HL black holes. BH is the abbreviation for the HL black hole, and TNs is the abbreviation for the topological numbers
Table 2 Topological numbers of charged HL black holes in different ensembles. CE is the abbreviation for the canonical ensemble, and GCE is the abbreviation for the grand canonical ensemble