1 Introduction

In recent years, the type Ia supernovae and cosmic microwave background (CMB) [1, 2] observations suggest that our universe is currently in the phase of accelerated expansion. This acceleration is caused by some unknown matter which has the property that positive energy density and negative pressure satisfy \(\rho +3p<0\); it is known as “dark energy” (DE) [36]. The simplest candidate of the dark energy is the cosmological constant which is characterized by the equation of state \(p=w\rho \) with \(w=-1\). Many other theoretical models have been proposed to explain the accelerated expansion of the universe. Another candidate of dark energy is quintessence, satisfying \(-1<w<-1/3\) [5, 6]. When \(w<-1\), it is known as phantom energy. Distinct data on supernovas showed that the presence of phantom energy with \(-1.2 < w < -1\) in the universe is highly likely [7]. Several models for the explanation of dark energy were suggested. These usually include k-essence, dilaton, DBI-essence, Hessence, tachyon, Chaplygin gas, etc. [816].

In Newtonian theory, the problem of accretion of matter onto the compact object was formulated by Bondi [17]. The equations of motion for a steady-state spherically symmetric flow of matter into or out of a condensed object (e.g. neutron stars, ‘black holes’, etc.) are discussed by Michel [18] and one also obtained an analytic relativistic accretion solution onto the static Schwarzschild black hole. The accretion of phantom energy onto a static Schwarzschild black hole was first proposed by Babichev et al. [19, 20] and one established that the black-hole mass will gradually decrease due to a strong negative pressure of the phantom energy and finally all the masses tend to zero near the big rip where it will disappear. Jamil [21] has investigated the accretion of a phantom-like variable modified Chaplygin gas onto the Schwarzschild black hole and also showed that the mass of the black hole will decrease for dark-energy accretion and otherwise will increase. Also the accretion of dark energy onto the more general Kerr–Newman black hole was studied by Madrid et al. [22] and Bhadra et al. [23]. Till now, several authors [2438] have discussed the accretion of several candidates of dark energy onto black holes.

Recently, there has been a growing interest in the study of the black-hole (BH) solution in (\(2+1\)) dimensions. These BH solutions have all the typical properties that can be found in (\(3+1\)) or higher dimensions, such as horizons, Hawking temperature, and thermodynamics. The discovery and investigation of the (\(2+1\))-dimensional BTZ (Banados–Teitelboim–Zanelli) black holes [3941] constituted one of the great advances in gravity. Jamil and Akbar [42] have investigated the thermodynamics of phantom energy accreting onto a BTZ BH. Abhas [43] investigated the phantom-energy accretion onto a 3D black hole formulated in Einstein–Power–Maxwell theory. The accretion of phantom energy onto Einstein–Maxwell–Gauss–Bonnet black holes was studied in [44]. They showed that the evolution of the black-hole mass was independent of its mass and depends only on the energy density and pressure of the phantom energy. Interest in the BTZ black hole has recently heightened with the discovery of the thermodynamics of higher-dimensional black holes [45, 46]. Also, non-static charged BTZ-like black holes in \((n+1)\) dimensions have been considered by Ghosh et al. [47], which in the static limit, for \(n = 2\), reduces to (\(2+1\))-dimensional BTZ black-hole solutions. John et al. [48] examined the steady-state spherically symmetric accretion of relativistic fluids, with a polytropic equation of state, onto a higher-dimensional Schwarzschild black hole. Also charged BTZ-like black holes in higher dimensions have been studied by Hendi [49]. There are also charged, rotating, regular extensions of the BTZ black-hole solutions [5057] available in the literature by employing nonlinear Born–Infeld electrodynamics to eliminate the inner singularity [58].

In Sect. 2, we assume the \((n+2)\)-dimensional charged BTZ black hole (BH) in the presence of a dark-energy filled universe. The critical point has been obtained. If dark energy accretes onto the BTZ BH, the rate of change of the mass of the black hole is expressed in terms of the density and pressure of dark energy and also we find the expression of the BH mass in terms of the density. In our previous work, we have investigated accretions of various types of dark energies (including some kinds of parametrizations of dark energy) onto a Morris–Thorne wormhole [59]. Our main motivation for this work is to examine the natures of the mass of the black hole during the accelerating expansion of the FRW universe if several kinds of dark energies accrete around the BH. In Sect. 3, we assume some versions of dark energy like modified Chaplygin gas (MCG) and some kinds of parametrizations of dark-energy candidates. The mass of the BTZ BH is calculated for all types of dark energies and its natures have been analyzed during the evolution of the universe. Finally, we give some concluding remarks of the whole work in Sect. 4.

2 Accretion phenomena of higher dimensional charged BTZ black hole

In recent years there has been increasing interest in black-hole solutions whose matter source is power Maxwell invariant, i.e., \((F_{\mu \nu }F^{\mu \nu })^s\) [46, 49], where s is the power of non-linearity. In the special case \(s = 1\), it reduces to a linear electromagnetic field. In addition, in \((n+2)\)-dimensional gravity, for the special choice \(s = (n+2)/4\), the matter source yields a traceless Maxwell’s energy–momentum tensor which leads to conformal invariance, which is the analog of the four-dimensional Reissner–Nordstrom solutions in higher dimensions [49, 60]. Also, it is valuable to find and analyze the effects of the exponent s on the behavior of the new solutions, when \(s = (n+1)/2\). In this case the solutions are completely different from the other cases \((s \ne (n+1)/2)\).

The \((n+2)\)-dimensional action in which gravity is coupled to the nonlinear electrodynamic field is given by [49]

$$\begin{aligned} S=\frac{1}{16\pi } \int \mathrm{d}^{n+2}x \sqrt{-g}[R+2\Lambda -(\alpha F)^{s} +L_{m}] \end{aligned}$$
(1)

where R is scalar curvature, \(\Lambda \) refers to the positive cosmological constant, which is in general equal to \(\frac{n(n+1)}{2l^{2}}\) for asymptotically AdS solutions, in which l is a scale length factor, \(\alpha \) is a constant and \(s=(n+1)/2\) gives BTZ-like solutions. Varying the action (1) with respect to the metric \(g_{\mu \nu }\) and the gauge field \(A_{\mu }\) (with \(s = (n+1)/2\)) the field equations are obtained as follows:

$$\begin{aligned} G_{\mu \nu }-\Lambda g_{\mu \nu }=T_{\mu \nu }^{(m)}+T_{\mu \nu }^{(EM)}. \end{aligned}$$
(2)

Here,

$$\begin{aligned} T_{\mu \nu }^{(m)}=(\rho +p)u_{\mu }u_{\nu }+pg_{\mu \nu } \end{aligned}$$
(3)

is the energy–momentum tensor for matter. Here \(\rho \) and p are the energy density and pressure of the matter, while \(u^{\mu }=(u^{0},u^{1},0,0,\ldots ,0)\) is the velocity vector of the fluid flow satisfying \(u_{\mu }u^{\mu }=-1\). Also \(u^{1} = u\) is the radial velocity of the flow. Also

$$\begin{aligned} T_{\mu \nu }^{(EM)}=\alpha (\alpha F)^{\frac{n-1}{2}} \left( \frac{1}{2}~g_{\mu \nu }F-nF_{\mu \lambda }F_{\nu }^{\lambda } \right) \end{aligned}$$
(4)

is the energy–momentum tensor for the electromagnetic field and

$$\begin{aligned} \partial _{\mu }\left( \sqrt{-g} ~F^{\mu \nu }(\alpha F)^{\frac{n-1}{2}}\right) =0. \end{aligned}$$
(5)

Let us consider the static spherically symmetric \((n+2)\)-dimensional charged BTZ black-hole metric given by [49]

$$\begin{aligned} \mathrm{d}s^2=-f(r)\mathrm{d}t^{2}+\frac{1}{f(r)}~\mathrm{d}r^{2}+r^{2}\sum _{i=1}^{n}\mathrm{d}\phi _{i}^{2}. \end{aligned}$$
(6)

Here, f(r) is termed the lapse function, which is obtained as [49]

$$\begin{aligned} f(r)=\frac{r^{2}}{l^{2}}-r^{1-n}\left[ M+2^{\frac{n+1}{2}}Q^{n+1}\ln \left( \frac{r}{l}\right) \right] \end{aligned}$$
(7)

where M is the mass and Q is the charge of the BTZ black hole. Here \(\sqrt{-g}=r^{n}\). Using \(u_{\mu }u^{\mu }=-1\), we get \(g_{00}u^{0}u^{0}+g_{11}u^{1}u^{1}=-1\) (since \(u^{0}\) and \(u^{1}\) are the non-zero components of velocity vector), so we can obtain \((u^{0})^{2}=\frac{(u^{1})^{2}+f(r)}{f^{2}(r)}\) and, since \(u^{1}=u\), we have \(u_{0}=g_{00}u^{0}=\sqrt{u^{2}+f(r)}\).

A proper dark-energy accretion model for BTZ black hole should be obtained by generalizing the Michel theory [18]. Such a generalization has been already performed by Babichev et al. [19, 20] for the case of dark-energy accretion onto Schwarzschild black holes. We shall follow now the procedure used by Babichev et al. [19, 20]. We assume that the in-falling dark-energy fluid does not disturb the spherical symmetry of the black hole. Considering the relativistic Bernoulli equation after the time component of the energy–momentum conservation law \(T^{\mu \nu }_{;\nu }=0\), we obtain (consider the steady-state condition and the spherically symmetric case)

$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}r}~(T_{0}^{~1}\sqrt{-g})=0, \end{aligned}$$
(8)

which provides the first integral,

$$\begin{aligned} (\rho +p)u_{0}u^{1}\sqrt{-g}=C_{1}, \end{aligned}$$
(9)

i.e.,

$$\begin{aligned} ur^{n}(\rho +p)\sqrt{u^{2}+f(r)}=C_{1} \end{aligned}$$
(10)

where the integration constant \(C_{1}\) has the dimension of an energy density.

Moreover, the second integration of motion is obtained from the projection of the conservation law for energy–momentum tensor onto the fluid four-velocity, \(u_\mu T^{\mu \nu }_{;\nu }=0\), which gives

$$\begin{aligned} u^{\mu }\rho _{,\mu }+(\rho +p)u^{\mu }_{;\mu }=0, \end{aligned}$$
(11)

which yields

$$\begin{aligned} ur^{n}~\mathrm{exp}\left[ \int _{\rho _{\infty }}^{\rho _{h}}\frac{\mathrm{d}\rho }{\rho +p} \right] =-A \end{aligned}$$
(12)

where A is an integration constant and the associated minus sign is taken for convenience. Also \(\rho _{h}\) and \(\rho _{\infty }\) are the energy densities at the BTZ horizon and at infinity, respectively. Combining these two, we obtain

$$\begin{aligned} (\rho +p)\sqrt{u^{2}+f(r)} \ \mathrm{exp}\left[ -\int _{\rho _{\infty }}^{\rho _{h}}\frac{\mathrm{d}\rho }{\rho +p} \right] =C_{2} \end{aligned}$$
(13)

where \(C_{2}=-C_{1}=\rho _{\infty }+p(\rho _{\infty })\). Further the value of the constant \(C_{2}\) can be evaluated for different dark-energy models.

The equation of the mass flux \(J^{\mu }_{;\mu }=0\) is given by \(\frac{\mathrm{d}}{\mathrm{d}r}~(J^{1}\sqrt{-g})=0\), which integrates to \(\rho u^{1}\sqrt{-g}=A_{1}\) and yields

$$\begin{aligned} \rho ur^{n}=A_{1} \end{aligned}$$
(14)

where \(A_{1}\) is the integration constant. From (10) and (14), we obtain

$$\begin{aligned} \frac{\rho +p}{\rho }~\sqrt{u^{2}+f(r)}=\frac{C_{1}}{A_{1}}=C_{3}. \end{aligned}$$
(15)

Let

$$\begin{aligned} V^{2}=\frac{\mathrm{d}\ln (\rho +p)}{\text {d}\ln \rho }-1. \end{aligned}$$
(16)

So from (14) and (15), we obtain

$$\begin{aligned} \left[ V^{2}-\frac{u^{2}}{u^{2}+f(r)} \right] \frac{\mathrm{d}u}{u}-\left[ nV^{2}-\frac{rf'(r)}{2(u^{2}+f(r))} \right] \frac{\mathrm{d}r}{r}=0.\nonumber \\ \end{aligned}$$
(17)

It is evident that if one or the other of the bracketed factors in (17) vanishes one has a turn-around point, and the solutions are double-valued in either r or u. Only solutions that pass through a critical point correspond to material falling into (or flowing out of) the object with monotonically increasing velocity along the particle trajectory. The critical point of accretion is located at \(r=r_{c}\), which is obtained by taking the two bracketed factors in Eq. (17) to be zero. So, at the critical point, we have

$$\begin{aligned} V_{c}^{2}=\frac{u_{c}^{2}}{u_{c}^{2}+f(r_{c})} \end{aligned}$$
(18)

and

$$\begin{aligned} nV_{c}^{2}=\frac{r_{c}f'(r_{c})}{2(u_{c}^{2}+f(r_{c}))}. \end{aligned}$$
(19)

Here, the subscript c refers to the critical quantity and \(u_{c}\) is the critical speed of the flow at the critical points. From the above two expressions, we have

$$\begin{aligned} u_{c}^{2}=\frac{r_{c}}{2n}~f'(r_{c}). \end{aligned}$$
(20)

At the critical point, the sound speed can be determined by

$$\begin{aligned} c_{s}^{2}=\left. \frac{\mathrm{d} p}{\mathrm{d}\rho }\right| _{r=r_{c}}=\frac{C_{3}V_{c}(V_{c}^{2}+1)}{u_{c}} -1. \end{aligned}$$
(21)

We mention that the physically acceptable solutions of the above equations are obtained if \(u_{c}^{2}>0\) and \(V_{c}^{2}>0\), which leads to

$$\begin{aligned} u_{c}^{2}>-f(r_{c})\quad \text {and}\quad f'(r_{c})>0, \end{aligned}$$
(22)

i.e.,

$$\begin{aligned} u_{c}^{2}>-\frac{r_{c}^{2}}{l^{2}}+r_{c}^{1-n}\left[ M+2^{\frac{n+1}{2}}Q^{n+1}\ln \left( \frac{r_{c}}{l}\right) \right] \end{aligned}$$
(23)

and

$$\begin{aligned} 2r_{c}^{n+1}+l^{2}\left[ (n-1)M + 2^{\frac{n+1}{2}}Q^{n+1}\left\{ (n-1)\ln \left( \frac{r_{c}}{l}\right) -1 \right\} \right] >0.\nonumber \\ \end{aligned}$$
(24)

For the linear equation of state \(p=w\rho \), we obtain \(c_{s}^{2}=w\) and \(V_{c}^{2}=0\), and from (18), we obtain \(u_{c}=0\). From (20), we see that the critical point occurs at the point \(r_{c}\) where \(r_{c}\) can be found from the equation

$$\begin{aligned} r_{c}^{n+1}=l^{2}\left[ M+2^{\frac{n+1}{2}}Q^{n+1}\ln \left( \frac{r_{c}}{l}\right) \right] . \end{aligned}$$
(25)

The rate of change of mass \(\dot{M}\) of the BTZ black hole is computed by integrating the flux of the dark energy over the n-dimensional volume of the black hole and it is given by [48]

$$\begin{aligned} \dot{M}=-\frac{2\pi ^{\frac{n+1}{2}}}{\Gamma (\frac{n+1}{2})}~r^{n}T_{0}^{1}. \end{aligned}$$
(26)

Using Eqs. (12) and (13), the above equation can be written as

$$\begin{aligned} \dot{M}=\frac{2\pi ^{\frac{n+1}{2}}}{\Gamma (\frac{n+1}{2})}~A(\rho _{\infty }+p(\rho _{\infty })). \end{aligned}$$
(27)

If we neglect the cosmological evolution of \(\rho _{\infty }\), then from (26) we obtain the mass of the black hole as follows:

$$\begin{aligned} M=M_{0}+\frac{{2\pi ^{\frac{n+1}{2}}}}{{\Gamma (\frac{n+1}{2})}}~A(\rho _{\infty }+p(\rho _{\infty }))(t-t_{0}) \end{aligned}$$
(28)

where \(M_{0}\) is the initial mass corresponding to the initial time \(t_{0}\). The result (26) is also valid for any equation of state \(p=p(\rho )\), thus we can write

$$\begin{aligned} \dot{M}=\frac{2\pi ^{\frac{n+1}{2}}}{\Gamma (\frac{n+1}{2})}~A(\rho +p). \end{aligned}$$
(29)

We see that the rate for the BTZ black-hole exotic mass due to the accretion of dark energy asymptotically becomes exactly the positive to the similar rate in the case of a Schwarzschild black hole. Since the BTZ black hole is static, the mass of the black hole depends on r only. When some fluid accretes outside the black hole, the mass function M of the black hole is considered as a dynamical mass function and hence it should be a function of time also. So \(\dot{M}\) is time dependent and the increasing or decreasing of the black-hole mass M sensitively depends on the nature of the fluid which accretes upon the black hole. If \(\rho +p<0\) i.e., for phantom dark-energy accretion, the mass of the black hole decreases, but if \(\rho +p>0\) i.e., for quintessence dark-energy accretion, the mass of the black hole increases.

3 Dark energy accretes upon BTZ BH

In the following, we shall assume different types of dark-energy models such as a modified Chaplygin gas and some parameterizations of dark-energy models. The nature of the mass function of black hole will be analyzed for present and future stages of expansion of the universe when the dark energies are accreting upon the BTZ black hole.

3.1 Modified Chaplygin gas

We consider the background spacetime to be spatially flat represented by the homogeneous and isotropic FRW model of the universe, which is given by

$$\begin{aligned} \mathrm{d}s^{2}=-\mathrm{d}t^{2}+a^{2}(t)[\mathrm{d}r^{2}+r^{2}(\mathrm{d}\theta ^{2}+\mathrm{sin}^{2}\theta \mathrm{d}\phi ^{2})] \end{aligned}$$
(30)

where a(t) is the scale factor. The Einstein equations for the FRW universe are (choosing \(8\pi G=c=1\))

$$\begin{aligned} H^2 = \frac{1}{3} \rho ~, \end{aligned}$$
(31)
$$\begin{aligned} \dot{H}=-\frac{1}{2}\left( p + \rho \right) . \end{aligned}$$
(32)

The conservation equation is given by

$$\begin{aligned} \dot{\rho }+3H(\rho +p)=0 \end{aligned}$$
(33)

where \(H=\frac{\dot{a}}{a}\) is the Hubble parameter. Now assume the MCG [61] as the dark-energy model, whose EoS is \(p=w\rho -\frac{B}{\rho ^{\alpha }}\) (\(B>0,~0\le \alpha <1\)). For the MCG model, we obtain the solution of \(\rho \):

$$\begin{aligned} \rho =\left[ \frac{B}{1+w}+\frac{C}{a^{3(1+w)(1+\alpha )}} \right] ^{\frac{1}{1+\alpha }} \end{aligned}$$
(34)

where \(C>0\) is an arbitrary integration constant. From the above, we can obtain the present value of the energy density \(\rho _{0}=\left[ \frac{B}{1+w}+C \right] ^{\frac{1}{1+\alpha }}\). For the MCG model, we obtain \(c_{s}^{2}=w+\frac{\alpha B}{\rho ^{\alpha +1}}\) and \(V_{c}^{2}=\frac{(\alpha +1)B}{(1+w)\rho ^{\alpha +1}-B}\). Using Eqs. (29), (31), and (33), we have

$$\begin{aligned} \dot{M}=-\frac{2\pi ^{\frac{n+1}{2}}A}{\sqrt{3}~\Gamma (\frac{n+1}{2})}~\frac{\dot{\rho }}{\sqrt{\rho }}, \end{aligned}$$
(35)

which integrates to yield

$$\begin{aligned} M=M_{0}-\frac{4\pi ^{\frac{n+1}{2}}A}{\sqrt{3}~\Gamma (\frac{n+1}{2})}~(\sqrt{\rho }-\sqrt{\rho _{0}}), \end{aligned}$$
(36)

where \(M_{0}\) is the present value of the BTZ black-hole mass. In the late stage of the universe, i.e., when a is very large \((z\rightarrow -1)\), the mass of the black hole will be

$$\begin{aligned} M=M_{0}+\frac{2\pi ^{\frac{n+1}{2}}A}{\sqrt{3}~\Gamma (\frac{n+1}{2})}~\sqrt{\rho _{0}}. \end{aligned}$$
(37)

If we put the solution \(\rho \) from Eq. (34) into Eq. (36), the mass of black hole M can be expressed in terms of the scale factor a and then we can use the formula of the redshift \(z=\frac{1}{a}-1\). M will be, taking into account the redshift z,

$$\begin{aligned} M= & {} M_{0}-\frac{4\pi ^{\frac{n+1}{2}}A}{\sqrt{3}~\Gamma (\frac{n+1}{2})}\nonumber \\&\times \left\{ \left[ \frac{B}{1+w}+C(1+z)^{3(1+w)(1+\alpha )} \right] ^{\frac{1}{2(1+\alpha )}}\right. \nonumber \\&\left. - \left[ \frac{B}{1+w}+C \right] ^{\frac{1}{2(1+\alpha )}} \right\} . \end{aligned}$$
(38)

Now M vs. z is drawn in Fig. 1a. Since our solution for MCG model generates only quintessence, from the figure we see that the mass M of the BTZ BH always increases with z decreasing. So we conclude that the mass of the BTZ BH increases if the MCG accretes onto the BTZ BH.

Fig. 1
figure 1

a The variation of the BTZ BH mass M against the redshift z for MCG. bf The variations of the BTZ BH mass M against the redshift z for models I–V, respectively

3.2 Some parameterizations of dark-energy models

In the astrophysical sense, it is popular to give the dark energy by a redshift parametrization (i.e., taking the redshift z as the variable parameter of the EoS only), the EoS being written as \(p(z)=w(z) \rho (z)\). The EoS parameter w is currently constrained by the distance measurements of the type Ia supernova observation with the range of EoS as \(-1.38<w<-0.82\) [62] and the WMAP3 observations set the constraint on the EOS \(w=-0.97^{+0.07}_{-0.09}\) for the DE, in a flat universe [63]. We consider the following three models of the well-known parametrizations (models I, II, and III). We shall also assume the other two parametrizations (models IV and V). The following models generate both quintessence (\(w(z)>-1\)) and phantom (\(w(z)<-1\)) dark energies for some suitable choices of the parameters.

\(\bullet \) Model I (linear) The “Linear” parametrization is given by the EoS \(w(z)=w_{0}+w_{1}z\) [64]. For a linear parametrization and using Eq. (33), we get the solution as follows:

$$\begin{aligned} \rho =\rho _{0}(1+z)^{3(1+w_{0}-w_{1})}\mathrm{e}^{3w_{1}z} \end{aligned}$$
(39)

where \(\rho _{0}\) is the present value of the energy density. The above model generates phantom energy if \(w(z)<-1\) i.e., \(z<-\frac{1+w_{0}}{w_{1}}\) provided \(w_{1}>0\) and \(w_{1}-w_{0}>1\). Using Eq. (2), the mass of the black hole is obtained as

$$\begin{aligned} M=M_{0}-\frac{4\pi ^{\frac{n+1}{2}}A\sqrt{\rho _{0}}}{\sqrt{3}~\Gamma (\frac{n+1}{2})} \left[ (1+z)^{\frac{3}{2}(1+w_{0}-w_{1})}\mathrm{e}^{\frac{3}{2}w_{1}z} -1 \right] .\nonumber \\ \end{aligned}$$
(40)

Since this model is the phantom crossing model, if this dark energy accretes onto the BTZ BH, for the quintessence era, the BH mass increases up to a certain limit and after that, for the phantom era, the mass of the BH decreases. We have shown this scenario in Fig. 1b. From the figure, we see that the BTZ BH mass M increases for the redshift z decreasing up to a certain stage of z (the \(\Lambda \)CDM stage) and then M decreasing (the phantom era) as the universe expands.

\(\bullet \) Model II (CPL) The “CPL” parametrization [65, 66] is given by the EoS \(w(z)=w_{0}+w_{1}\frac{z}{1+z}\). In this case, the solution becomes

$$\begin{aligned} \rho =\rho _{0}(1+z)^{3(1+w_{0}+w_{1})}\mathrm{e}^{-\frac{3w_{1}z}{1+z}}. \end{aligned}$$
(41)

The above model generates the phantom energy if \(w(z)<-1\) i.e., \(z<-\frac{1+w_{0}}{1+w_{1}}\), provided \(w_{1}>-1\) and \(w_{1}-w_{0}>0\). The mass of the black hole is obtained as follows:

$$\begin{aligned} M=M_{0}-\frac{4\pi ^{\frac{n+1}{2}}A\sqrt{\rho _{0}}}{\sqrt{3}~\Gamma (\frac{n+1}{2})} \left[ (1+z)^{\frac{3}{2}(1+w_{0}+w_{1})}\mathrm{e}^{-\frac{w_{1}z}{2(1+z)}} -1 \right] .\nonumber \\ \end{aligned}$$
(42)

This model is also the phantom crossing model. We have drawn M vs. z in Fig. 1c. From the figure, we observe that the BTZ BH mass M increases for the redshift z decreasing up to certain stage of z (the \(\Lambda \)CDM stage) and then M decreases (the phantom era) as the universe expands.

\(\bullet \) Model III (JBP) The “JBP” parametrization [67] is given by the EoS \(w(z)=w_{0}+w_{1}\frac{z}{(1+z)^{2}}\). The solution is

$$\begin{aligned} \rho =\rho _{0}(1+z)^{3(1+w_{0})}\mathrm{e}^{\frac{3w_{1}z^{2}}{2(1+z)^{2}}}. \end{aligned}$$
(43)

The above model generates the phantom energy if \(w(z)<-1\) i.e., \(z<-1+\frac{\sqrt{4(1+w_{0})w_{1}+w_{1}^{2} } }{2(1+w_{0})}\) provided \(w_{0}>-1\) and \(w_{1}<-4(1+w_{0})\). The mass of the black hole is obtained as follows:

$$\begin{aligned} M=M_{0}-\frac{4\pi ^{\frac{n+1}{2}}A\sqrt{\rho _{0}}}{\sqrt{3}~\Gamma (\frac{n+1}{2})}\left[ (1+z)^{\frac{3}{2}(1+w_{0})}\mathrm{e}^{\frac{3w_{1}z^{2}}{4(1+z)^{2}}} -1 \right] .\nonumber \\ \end{aligned}$$
(44)

This model is also the phantom crossing model. From Fig. 1d, we see that the BTZ BH mass M increases for the redshift z decreasing up to a certain stage of z (the \(\Lambda \)CDM stage) and then M decreases (the phantom era) as the universe expands.

\(\bullet \) Model IV Another type of parametrization is considered as in the form of EoS \( w(z)=-1+ \frac{A_{1}(1+z)+2A_{2}(1+z)^{2}}{3\left[ A_{0}+A_{1}(1+z)+A_{2}(1+z)^{2}\right] } \), where \(A_{0},~A_{1}\), and \(A_{2}\) are constants [68, 69]. This ansatz is exactly the cosmological constant \(w = -1\) for \(A_{1} = A_{2} = 0\) and the DE models with \(w =-2/3\) for \(A_{0} = A_{2} = 0\) and \(w = -1/3\) for \(A_{0} = A_{1} = 0\). In this case, we get the solution

$$\begin{aligned} \rho =\frac{\rho _{0}[A_{0}+A_{1}(1+z)+A_{2}(1+z)^{2}]}{A_{0}+A_{1}+A_{2}}. \end{aligned}$$
(45)

The above model generates the phantom energy if \(w(z)<-1\) i.e., \(z<-1-\frac{A_{1}}{A_{2}}\), provided \(A_{0}<0\), \(A_{1}>0\), \(A_{2}<0\), and \(A_{0}+A_{1}+A_{2}<0\). For this condition, \(\rho \) is still positive. The mass of the black hole is obtained as

$$\begin{aligned} M= & {} M_{0}-\frac{4\pi ^{\frac{n+1}{2}}A\sqrt{\rho _{0}}}{\sqrt{3}~\Gamma (\frac{n+1}{2})}\nonumber \\&\times \left[ \frac{\{A_{0}+A_{1}(1+z)+A_{2}(1+z)^{2}\}^{\frac{1}{2}}}{(A_{0}+A_{1}+A_{2})^{\frac{1}{2}}} -1 \right] . \end{aligned}$$
(46)

This model is also the phantom crossing model. From Fig. 1e, we see that the BTZ BH mass M increases for the redshift z decreasing up to a certain stage of z and then M decreases (the phantom era) as the universe expands.

\(\bullet \) Model V Another type of parametrization is \( w(z)=w_{0}+w_{1}~log(1+z) \) [70, 71]. The solution is obtained as

$$\begin{aligned} \rho =\rho _{0}(1+z)^{3(1+w_{0})}\mathrm{e}^{\frac{3}{2}w_{1}[\mathrm{log}(1+z)]^{2}}. \end{aligned}$$
(47)

The above model generates the phantom energy if \(w(z)<-1\) i.e., \(z<-1+e^{-\frac{w_{0}}{w_{1}}}\) provided \(w_{1}>0\). The mass of the black hole is obtained as follows:

$$\begin{aligned} M=M_{0}-\frac{4\pi ^{\frac{n+1}{2}}A\sqrt{\rho _{0}}}{\sqrt{3}~\Gamma (\frac{n+1}{2})} ~\left[ (1+z)^{\frac{3}{2}(1+w_{0})}\mathrm{e}^{\frac{3}{4}w_{1}[\mathrm{log}(1+z)]^{2}} -1 \right] .\nonumber \\ \end{aligned}$$
(48)

This model is also the phantom crossing model. From Fig. 1f, we see that the BTZ BH mass M increases for the redshift z decreasing up to a certain stage of z and then M again decreases (the phantom era) as the universe expands.

4 Discussions

In this work, we have studied the accretion of the \((n+2)\)-dimensional charged BTZ black hole (BH). A proper dark-energy accretion model for black holes has been obtained by generalizing the Michel theory [18] to the case of black holes. Such a generalization has already been performed by Babichev et al. [19, 20] for the case of dark-energy accretion onto Schwarzschild black holes. We have followed the procedure used by Babichev et al. [19, 20], adapting it to the case of \((n+2)\)-dimensional charged BTZ black hole. The critical point and square speed of sound have been obtained. Astrophysically, the mass of the black hole is a dynamical quantity, so the nature of the mass function is important in our black-hole model for different dark-energy filled universes. We see that the rate for the BTZ black-hole exotic mass due to accretion of dark energy asymptotically becomes exactly the positive to the similar rate in the case of a Schwarzschild black hole. Since the BTZ black hole is static, the mass of the black hole depends on r only. When some fluid accretes outside the black hole, the mass function M of the black hole is considered as a dynamical mass function and hence it should be a function of time also. So \(\dot{M}\) is time dependent and the increasing or decreasing of the black-hole mass M sensitively depends on the nature of the fluid which accretes upon the black hole. The sign of the time derivative of the black-hole mass depends on the signs of \((\rho +p)\). If \(\rho +p<0\) i.e., for phantom dark-energy accretion, the mass of the black hole decreases, but if \(\rho +p>0\) i.e., for quintessence dark-energy accretion, the mass of the black hole increases. The mass of the BTZ BH has been calculated and we have observed that the mass of the BTZ BH is related with the square root of the energy density of the dark energy which accretes onto the BH in our accelerating FRW universe.

We have assumed a MCG as a candidate of dark energy which accretes onto the BTZ BH. Since in our solution of MCG, this model generates only quintessence dark energy (not phantom), the BTZ BH mass increases during the whole evolution of the accelerating universe, which is shown in Fig. 1a also. Next we have assumed five kinds of parametrizations (models I–V) of the well-known dark-energy models (some of them are the linear, CPL, and JBP models). These models generate both quintessence and phantom scenarios (phantom crossing models) for some restrictions of the parameters. So if these dark energies accrete onto the BTZ black hole, then for the quintessence stage, the black-hole mass increases up to a certain value (finite value) and then decreases to a finite value for the phantom stage during the whole evolution of the universe. That means, if the five kinds of DE accrete onto the BTZ black hole, that the mass of the black hole increases up to a certain finite value and then decreases in the late stage of the evolution of the universe. We also show these results graphically clearly. We have drawn the mass of the BTZ black hole for dark-energy models I–V in Fig. 1b–f, respectively. Figure 1b–f show that the mass of the BTZ black hole first increases to a finite value and then decreases to a finite value also.