1 Introduction

About two decades ago, astronomical observations such as CMB radiation [1], Supernova Type Ia [2] and large scale structure data [3, 4] showed that the Universe is undergoing an accelerating expansion period. This discovery was a revolution in cosmology and the agent responsible for this effect was named dark energy. This energy has the strange property that produces repulsive gravitational effects and it violates the null and weak energy condition [5, 6]. Surprisingly, observations suggests that around two-thirds of the total energy of the Universe belongs to the dark energy [1, 2]. However, the nature of this energy is not well understood and nowadays is one of the most challenging problems in theoretical physics. Over the last two decades, a number of theorists have been trying to tackle this important problem. Several ideas have been proposed like cosmological constant, phantom energy, quintessence, k-essence, dynamic scalar fields, and others. Usually, dark energy is modeled using a perfect fluid such as the pressure and energy density are related by a perfect fluid with a barotropic equation \(p=w\rho \) where w is the state parameter with \(w=-1\) a cosmological constant, \(-1<w<-1/3\) for quintessence and \(\omega <-1\) for phantom models [7].

Accretion is the process by which a massive astrophysical object such as a black hole or a star can take particles from a fluid from its vicinity which leads to increase in mass (and possibly angular momentum) of the accreting body [811]. It is one of the most ubiquitous processes in the Universe. Indeed the stars and planets form only as a result of accretion in some inhomogeneous regions of gas and dust. The existence of supermassive black holes at the centers of giant elliptical and spiral galaxies suggests that such black holes could have evolved via accretion process. Other processes of formation of giant black holes such as merger of several small mass black holes (or compact objects) or stellar collapse of several stars in a small domain leading to merger seem very remote possibilities. The most likely model of the formation of massive giant black holes is the accretion of dust or matter from nearby regions for sufficiently long times. The formation of giant elongated astrophysical jets from active galaxies or small compact objects indicates the existence of large amounts of hot dust (likely to occur in the form of an accretion disk) around the regions of jet formation. However, an accretion process not always increases the mass of the compact source; sometimes the in-falling matter is thrown away in the form of jets or cosmic rays. It is more probable that the accretion process may not be static and the velocity of free-fall and the energy density of the fluid change with time and position. The accretion of normal matter and dust onto compact objects is a well-studied problem, however, the accretion of more exotic types of energy matter is not so commonly probed, including dark energy and stiff fluids. Since the Universe is dominated by dark energy, it is more pertinent to study the accretion of various forms of dark energy onto black holes.

Bondi investigated accretion for compact objects using Newtonian gravity [12]. After the arrival of general relativity, it became possible to investigate the accretion onto more compact objects such as neutron stars and black holes. Michel was the first who studied the relativistic accretion process for the Schwarzschild black hole [13]. Babichev et al. derived the fate of a stationary uncharged black hole in the phantom energy dominated universe [14]. They concluded that the phantom energy falling onto a black hole will decrease its mass. We use the same formalism in order to study the accretion process for different spherically symmetric space-times. In [15], they studied spherical, steady-state accretion of cosmological fluids onto an intermediate-mass black hole at the center of a globular cluster. More recently, Debnath [16] presented a framework of static accretion onto general static spherically symmetric black holes, thereby generalizing the work of Babichev et al. [14]. We extend these previous studies using a more general ansatz for a static spherically symmetric space-time, which covers all possible static black hole (and non-black hole) solutions such as Schwarzschild-monopole, string cloud, Jannis-Newman–Winicour, and dilaton (stringy charged) black hole solutions. In particular, we investigate the parameters of the fluid and the effect on the black hole mass.

This paper uses the geometrized units \(c=G=\hbar =1\) and the signature \((-,+,+,+)\) for the metrics. This paper is organized as follows: In the second section, we derive a general formalism for the relativistic spherical accretion process. In the third section, we study some specific metrics such as black holes with topological defects, string cloud, JNW metric, and a static charged black hole. For each case, we derive the velocity profiles, the speed of sound, the critical speed of the flow, and the rate of change of the black hole mass for a barotropic fluid. We explain these parameters with the help of figures. Finally, we discuss the results of our paper.

2 General formalism

We consider the following metric ansatz for the general static spherically symmetric space-time:

$$\begin{aligned} \mathrm{d}s^{2}&=-A(r)\text {d}t^2+\displaystyle \frac{1}{B(r)}\text {d}r^2+C(r)(\text {d}\theta ^2+\sin ^2\theta \text {d}\phi ^2),\nonumber \\ \end{aligned}$$
(1)

where \(A(r)>0\), \(B(r)>0\), and \(C(r)>0\) are functions of r only. This metric ansatz with \(C(r)=r^2\) was used by Debnath [16]. We are going to perform a general accretion formalism for those space-times geometries.

Assuming the energy matter as a perfect fluid which is isotropic though inhomogeneous, the latter assumption leads to variations in the energy density at different positions near the accreting source. The energy-momentum tensor is given by

$$\begin{aligned} T_{\mu \nu }&=(\rho +p)u_{\mu }u_{\nu }+p\, g_{\mu \nu }, \end{aligned}$$
(2)

where \(\rho \) is the energy density, p the pressure and \(u^{\mu }\) is the 4-velocity, which in general will be

$$\begin{aligned} u^{\mu }=\frac{\text {d}x^{\mu }}{\text {d}\tau }=(u^{t},u^{r},0,0), \end{aligned}$$
(3)

where \(\tau \) is the proper time. We have \(u^\theta =0\) and \(u^\phi =0\) due to the restriction of spherical symmetry. Note that all components of 4-velocity, pressure, and energy density are functions of r only. Since the 4-velocity must satisfy the normalization condition \(u_{\mu }u^{\mu }=-1\) we find

$$\begin{aligned} u^{t}:=\frac{\text {d}t}{\text {d}\tau }= & {} \sqrt{\frac{u^2+B}{AB}}, \end{aligned}$$
(4)

where for simplicity we have named \(u=u^{r}=\frac{\text {d}r}{\text {d}\tau }\). Due to the presence of square root, there are two possibilities: \(u^t>0\ (<0)\), which, respectively, imply forward (backward) in time conditions. The former condition is necessary to preserve causality in the process: fluid must enter the black hole but not leave it. Moreover, to study accretion, we require \(u<0\), while for any outward flows \(u>0\). In the astrophysical context both inward and outward flows are important. The former ones lead to growth of black holes while the later ones lead to jets. Using the energy-momentum conservation law, \(0=T^{\mu \nu }_{~~;\mu }=\frac{1}{\sqrt{-g}}(\sqrt{-g}T^{\mu \nu })_{,\mu }+{\varGamma }^{\nu }_{~\alpha \mu }T^{\alpha \mu },\) we find

$$\begin{aligned} (\rho +p)u\frac{A(r)}{B(r)}\sqrt{u^2+B(r)}C(r)= & {} A_{1}, \end{aligned}$$
(5)

where \(A_{1}\) is an integration constant.

By projecting the conservation law onto the 4-velocity \(u_\mu T^{\mu \nu }_{~~;\nu }=0,\) thereby contracting all indices, we can find the relativistic energy flux (or continuity) equation

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

In our case, we will assume that the pressure and energy density are related by a certain equation of state \(p=p(\rho )\). The last equation after simplification yields

$$\begin{aligned} \frac{\rho '}{\rho +p}+ \frac{u'}{u}+\frac{A'}{2A}+\frac{B'}{2B}+\frac{C'}{C}= & {} 0. \end{aligned}$$
(7)

Here, a prime denotes differentiation with respect to r.

Integration of Eq. (7) yields

$$\begin{aligned} uC(r)\sqrt{\frac{A(r)}{B(r)}}e^{\int {\frac{\text {d}\rho }{\rho +p(\rho )}}}= & {} -A_{0}, \end{aligned}$$
(8)

where \(A_{0}\) is an integration constant, while a negative sign is introduced on the right hand side since \(u<0\) on the left hand side. Now, if we combine the above equation with (5) we obtain

$$\begin{aligned} (\rho +p)\sqrt{u^2+B(r)}\sqrt{\frac{A(r)}{B(r)}}e^{-\int {\frac{d\rho }{\rho +p(\rho )}}}=-\frac{A_{1}}{A_{0}}\equiv A_{3}, \end{aligned}$$
(9)

where \(A_{3}\) is a constant which depends on \(A_{1}\) and \(A_{0}\). Due to spherical symmetry, we take \(\theta =\pi /2\) (fluid flow in the equatorial plane), which yields \(\sqrt{-g}=C\sqrt{A/B}\). Furthermore, the equation of mass flux, \(0=J^{\mu }_{~;\mu }=\frac{1}{\sqrt{-g}}\frac{\text {d}}{\text {d}r}(J^{r}\sqrt{-g})\), leads to

$$\begin{aligned} \rho u\sqrt{\frac{A(r)}{B(r)}}C(r)&=A_{2}, \end{aligned}$$
(10)

where \(A_{2}\) is an integration constant. If we divide Eq. (5) with (10), we get another useful relation,

$$\begin{aligned} \frac{(\rho +p)}{\rho }\sqrt{\frac{A(r)}{B(r)}}\sqrt{u^2+B(r)}&=\frac{A_{1}}{A_{2}}\equiv A_{4}, \end{aligned}$$
(11)

where \(A_4\) is another arbitrary constant.

Taking differentials of Eqs. (10) and (11) and solving together, we obtain

$$\begin{aligned}&\bigg (V^2-\frac{u^2}{u^2+B}\bigg )\frac{\text {d}u}{u}+\bigg ((V^2-1)\bigg (\frac{A'}{A}-\frac{B'}{B}\bigg )\nonumber \\&\quad +\frac{C'}{C}V^2-\frac{B'}{2(u^2+B)}\bigg )\text {d}r=0, \end{aligned}$$
(12)

where we have introduced the variable

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

It is important to mention that in Eq. (9) of Ref. [16] a similar expression with \(C(r)=r^2\) was derived, which contained some erroneous signs.

By taking the two brackets in (12) equal to zero, we can find the critical point of accretion located at \(r=r_{c}\). Thus, at the critical point we have

$$\begin{aligned}&V_{c}^2=\frac{u_{c}^{2}}{u^{2}_{c}+B(r_{c})},\end{aligned}$$
(14)
$$\begin{aligned}&(V_{c}^2-1)\bigg [\frac{A'(r_{c})}{A(r_{c})}-\frac{B'(r_{c})}{B(r_{c})}\bigg ] \nonumber \\&\quad +\frac{C'(r_{c})}{C(r_{c})}V_{c}^2=\frac{B'(r_{c})}{2(u_{c}^2+B(r_{c}))}. \end{aligned}$$
(15)

Here every function is evaluated at \(r=r_{c}\) and \(u_{c}\) is the critical speed of the flow (velocity of the flow at the critical point). We can decouple the quantities \(u_c^2\) and \(V_c^2\) and obtain

$$\begin{aligned} u_{c}^{2}= & {} \frac{B(r) C(r) A'(r)}{2 A(r) C'(r)},\end{aligned}$$
(16)
$$\begin{aligned} V_{c}^2= & {} \frac{C(r) A'(r)}{C(r) A'(r)+2 A(r) C'(r)}. \end{aligned}$$
(17)

The speed of sound is found to be

$$\begin{aligned} c_{s}^{2}= & {} \frac{\text {d}p}{\text {d}\rho }\Big |_{r=r_{c}}=A_{4}\sqrt{\frac{B(r_{c})}{A(r_{c})(u^{2}_{c}+B(r_{c}))}}-1. \end{aligned}$$
(18)

Note that \(u_c^2\) and \(V_{c}^{2}\) cannot be negative, hence

$$\begin{aligned} \frac{A'(r_{c})}{C'(r_{c})}>0. \end{aligned}$$
(19)

From Eq. (19), it follows that for given metric components, one can find the critical radius in the given space-time.

The rate of change of the mass of the black hole \(\dot{M}=4\pi r^2T^r_0,\) in the accretion process for a fluid around the black hole is given by [16]

$$\begin{aligned} \dot{M}_\text {acc}= & {} 4\pi A_3 M^2(\rho +p), \end{aligned}$$
(20)

where a dot represents a derivative with respect to time. This equation can be found by integrating the flux of the fluid over the surface of the black hole. We can see that the mass of the black hole will increase for any fluid such as \(\rho +p>0\) which accretes outside the black hole. On the other hand, if the fluid is a phantom dark energy \(\rho +p<0\), then the mass of the black hole will decrease. It should be emphasized that this mass of the BH that appears in the corresponding metrics (see subsequent sections), where it is generally assumed that the mass is a pure constant. However, in realistic situations, the mass of the BH cannot remain fixed: accretion leads to increase in mass while Hawking radiation leads to the decrease in mass. To connect the BH solutions with their astrophysics, one has to take into account the time dependence of BH mass. It is further assumed that this time dependence does not change the global geometry and the symmetries of the space-time, therefore space-time metrics remain static and spherically symmetric. If one is interested to consider the combined effects of accretion and evaporation from BH simultaneously, then an additional term corresponding to Hawking radiation is added to the right hand side of Eq. (20), however, it is not our concern at the moment.

3 Spherically symmetric metrics with horizons

In this section and subsequent, we are going to discuss the case in which \(A(r)=B(r)\). All the spherically symmetric metrics with horizons are included in this case. From Eqs. (16) and (17) we have

$$\begin{aligned} u_{c}^{2}= & {} \frac{ C(r) A'(r)}{2 C'(r)},\end{aligned}$$
(21)
$$\begin{aligned} V_{c}^2= & {} \frac{C(r) A'(r)}{C(r) A'(r)+2 A(r) C'(r)}. \end{aligned}$$
(22)

Although we are focused on the BH metrics with event horizons, the present analysis is not forbidden for horizonless space-times. In many cases, we are concerned with the properties of fluid flow (including critical velocity, sound speed in the fluid; evolution of fluid’s energy density; speed of radial flow, etc.) and the change in mass of the accreting object and therefore the horizon does not directly involve anywhere. With this perspective, one can investigate the accretion phenomenon for more exotic objects such as naked singularity and wormholes. Since the mass of the BH is connected with the size of the horizon, the horizon expands due to accretion as well.

3.1 Schwarzschild–de Sitter black hole with a topological defect (monopole)

Dadhich et al. derived the metric of a Schwarzschild black hole with global monopole charge by relaxing asymptotic flatness and investigated several astrophysical aspects [17]. However, in the presence of the cosmological constant, the metric coefficients of this geometry become modify as follows [18]:

$$\begin{aligned}&A(r)=B(r)=1-\frac{2M}{r}-\frac{\lambda }{3}r^2,\end{aligned}$$
(23)
$$\begin{aligned}&C(r)=r^2(1-\eta ^2), \end{aligned}$$
(24)

where \(\eta \) and \(\lambda \) are the parameter related to the scale of symmetry breaking and the cosmological constant, respectively. This metric has a topological defect due to the deficit solid angle around the scale of a gauge-symmetry breaking. Amani and Farahani [19] investigated the phantom energy accretion onto Schwarzschild AdS black hole with global monopole and calculated the critical velocities of the flow. For this metric we find that

$$\begin{aligned} u_{c}^{2}= & {} \frac{3 M-\lambda r_{c}^3}{6 r_{c}},\end{aligned}$$
(25)
$$\begin{aligned} V_{c}^2= & {} \frac{\lambda r_{c}^3-3 M}{9 M+3 \lambda r_{c}^3-6 r_{c}}. \end{aligned}$$
(26)

The condition (19) yields

$$\begin{aligned} \frac{\lambda r_{c}^3-3 M}{3 \left( \eta ^2-1\right) r_{c}^3}>0. \end{aligned}$$
(27)

Using (18), the speed of sound will be

$$\begin{aligned} c_{s}^{2}&=A_{4} \sqrt{\frac{2r_{c}}{2 r_{c}-3 M-\lambda r_{c}^3}}-1. \end{aligned}$$
(28)

It is possible to integrate the conservation laws and obtain analytical expressions of the physical parameters. Here, for simplicity we will again study the barotropic case where the fluid has an equation of state such as \(p(r)=w \rho (r)\). Using (5), (9), and (11) we can find directly one set of solutions

$$\begin{aligned} \rho (r)&=\frac{\sqrt{3} A_{0} A_{2}}{\left( \eta ^2-1\right) r^{3/2} \sqrt{A_{0}^2 \left( 6 M+\lambda r^3-3 r\right) +3 A_{2}^2 A_{4}^2 r}},\end{aligned}$$
(29)
$$\begin{aligned} p(r)&=\frac{\sqrt{3} A_{0} (A_{0}-A_{2})}{\left( \eta ^2-1\right) r^{3/2} \sqrt{A_{0}^2 \left( 6 M+\lambda r^3-3 r\right) +3 A_{2}^2 A_{4}^2 r}},\end{aligned}$$
(30)
$$\begin{aligned} u(r)&=-\frac{\sqrt{A_{0}^2 \left( 6 M+\lambda r^3-3 r\right) +3 A_{2}^2 A_{4}^2 r}}{\sqrt{3} A_{0} \sqrt{r}}. \end{aligned}$$
(31)

The other set of solutions are unphysical solution because they have \(\rho <0\) for \(w>-1\). Now, if we only use (5) and (11) and we assume a barotropic fluid such as \(p=w\rho \), we obtain

$$\begin{aligned} \rho (r)&=\frac{\sqrt{3} A_{2} (w+1)}{\left( \eta ^2-1\right) r^{3/2} \sqrt{r \left( 3 A_{4}^2+(w+1)^2 \left( \lambda r^2-3\right) \right) +6 M (w+1)^2}},\end{aligned}$$
(32)
$$\begin{aligned} u(r)&=-\frac{\sqrt{r \left( 3 A_{4}^2+(w+1)^2 \left( \lambda r^2-3\right) \right) +6 M (w+1)^2}}{\sqrt{3} \sqrt{r} (w+1)}. \end{aligned}$$
(33)

Note that if we compare both solutions, we notice that if we replace \(A_{0}=1+w\) and \(A_{2}=1\) in Eqs. (29)–(31) we obtain the same solution as the equations above. Therefore, if we choose \(A_{0}=1+w\) and \(A_{2}=1\) there is an equivalence between solving the system of equations given by (5), (9), and (11) and solving the system of equations given by (5), (11), and \(p=w\rho \). Thus, in order to study the accretion process for different kind of barotropic fluids, we will choose \(A_{0}=1+w\) and \(A_{2}=1\). Using this argument, for the definitions of the constants we must have \(A_{3}=A_{2}A_{4}/(1+w)\). This interesting fact is because (9) is just a contraction of Eq. (5), and therefore there are not more degrees of freedom in our equations and it seems like the only possibly solution for the system is to have a barotropic fluid (with different possibles state parameters). For all the following subsections, it can be showed that there is also an equivalence too.

Figure 1 represents the absolute value of the velocity profile for different values of the state parameter. Here \(w<-1\), \(-1<w<-1/3\), \(w=-1\), \(w=0\), \(w=1\) refer to phantom energy, quintessence, cosmological constant, dust, and stiff matter, respectively. The dots denote the critical velocity of the fluid at a certain critical radius. The behavior shown in these figures is consistent with previous results reported in [20, 21]. It can be observed that when \(w\ge 0\) increases, the location of critical radius shifts to the left. Thus the in-falling fluid acquires supersonic speeds closer to the black hole. We also took \(\lambda <0\) in figures, which correspond to anti-de Sitter background. Figure 2 represents the behavior of the energy density of fluid for different values of the state parameter. It can be seen that the energy density of the fluid decreases as it approaches the black hole when \(w=-2\) and \(w=-1.5\), while it increases in the remaining cases. In the former cases, the energy density becomes negative, which violates the energy conditions too. However, in absolute value, the energy density always increases for all cases. Asymptotically the fluid energy density approaches zero at infinity, while it approaches a maximum near the black hole due to the strong (and perhaps quantum) gravitational interaction.

Fig. 1
figure 1

Velocity profile versus \(x=\frac{r}{M}\) for \(A_{4}=10\), \(\lambda =-0.73\), \(M=1\), and different values of the state parameter. For each figure, the critical radius is marked with a point for every chosen state parameter

From (20), the rate of change of the mass of the black hole due to the accretion process for a barotropic fluid becomes

$$\begin{aligned} \dot{M}&=-\frac{4 \sqrt{3} \pi A_{2}^{2} A_{4} M^2 (w+1)}{\left( \eta ^2-1\right) r^{3/2} \sqrt{r \left( 3A_{4}^2+(w+1)^2 \left( \lambda r^2-3\right) \right) +6 M (w+1)^2}}. \end{aligned}$$
(34)
Fig. 2
figure 2

Energy density versus \(x=\frac{r}{M}\) for \(A_{2}=1\), \(A_{4}=10\), \(\lambda =-0.73\), \(M=1\), \(\eta =0.5\), and for different values of the state parameter

Figure 3 represents the rate of the change of the mass of the black hole for different values of the state parameter and same initial black hole mass. For small values of x, near the black hole, \(\dot{M}>0\) showing that mass of black hole increases for \(w=0\) and \(w=-0.5\), being for matter and quintessence, respectively. In other words, the mass of the black hole will increase for matter and quintessence accretions. However, for stiff matter accretion, \(\dot{M}>0\) for both small and large values of x, thereby increasing in mass of black hole. It should be noted that quintessence, dust, and stiff matter satisfy the relativistic energy conditions for energy matter which ensure the increase in BH mass and satisfy the second law of black hole thermodynamics. It is also apparent that \(\dot{M}<0\) for phantom-like equations of state such as \(w=-1.5,-2\), thus mass of the BH will decrease by the accretion of phantom like fluids.

Fig. 3
figure 3

Rate of change of the mass of the black hole versus \(x=\frac{r}{M}\) for a barotropic fluid for different values of the state parameter, \(A_{2}=1\), \(A_{4}=10\), \(M=1\), \(\lambda =-0.73\), and \(\eta =0.5\)

It is important to remark that we have another possibility to study the accretion process for this metric, which is by taking \(A_{2}<0\) and using (32) and (33) with a minus of difference. In that case we have \(\rho >0\) for \(w>-1\) as we required, but \(u(r)<0\) for \(w<-1\). However, the case \(A_{2}<0\) seems to be an unnatural choice, since we may notice that we will need a barotropic case such as \(p=-w \rho \) to have identical solutions to solving (5), (9), and (11) directly and setting \(A_{0}=1+w\) and \(A_{2}=-1\). In other words, it is the same to have \(A_{0}=1+w\) and \(A_{2}=-1\) and solving the system of equations (5), (9), and (11) as solving the system of Eqs. (5), (11), and \(p=-w \rho \). Therefore, we will have the same behavior as we discussed above, since for \(A_{2}=-1\), the state parameter w will be minus the state parameter in the case of \(A_{2}=1\). Thus, for all the following subsections, we are going to find the solutions using (5), (11), and \(p=w \rho \), and we will take \(A_{2}=1\).

3.2 Schwarzschild black hole in a string cloud background

The metric for a string cloud arises from the Nambu–Goto action of a string evolving in space-time. In four dimensions, the metric of a Schwarzchild black hole in a string cloud background is given by [21]

$$\begin{aligned}&A(r)=B(r)=1-\frac{2M}{r}-\alpha ,\end{aligned}$$
(35)
$$\begin{aligned}&C(r)=r^2, \end{aligned}$$
(36)

where \(\alpha \) is the string cloud parameter which is \(\alpha \ne 1\) and M is the mass of black hole and it appears as a constant of integration during the solution of field equations [22]. The limit \(\alpha =0\) gives the Schwarzschild solution. The radial velocity and the energy density for a barotropic fluid are given by

$$\begin{aligned} u(r)&=\frac{\sqrt{r \left( A_{4}^2+(\alpha -1) (w+1)^2\right) +2 M (w+1)^2}}{\sqrt{r} (w+1)},\end{aligned}$$
(37)
$$\begin{aligned} \rho (r)&=\frac{A_{2} (w+1)}{r^{3/2} \sqrt{r \left( A_{4}^2+(\alpha -1) (w+1)^2\right) +2 M (w+1)^2}}. \end{aligned}$$
(38)

Exactly as before, we have two set of solutions for u(r) and \(\rho (r)\). For this case, the critical values are given by

$$\begin{aligned} r_{c}= & {} -\frac{3 M (w+1)^2}{2 \left( A_{4}^2+(\alpha -1) (w+1)^2\right) },\end{aligned}$$
(39)
$$\begin{aligned} u_{c}^{2}= & {} \frac{M}{2r_{c}},\end{aligned}$$
(40)
$$\begin{aligned} V_{c}^2= & {} -\frac{M}{3 M+2 (\alpha -1) r_c}. \end{aligned}$$
(41)

As a special case, if \(A_4=1+w\), then the above equations yield \(r_c=-3M/1+2\alpha \), which for \(\alpha =0\) gives the critical radius for the Schwarzschild black hole. Since \(r_c\) is a function of w, its value will be different for every fluid.

Fig. 4
figure 4

Velocity profile versus \(x=\frac{r}{M}\) for \(A_{4}=1\), \(\alpha =-5\), \(M=1\), and different values of the state parameter. For each figure, the critical radius is marked with a point for every chosen state parameter

Fig. 5
figure 5

Energy density versus \(x=\frac{r}{M}\) for \(A_{2}=1\), \(A_{4}=1\), \(\alpha =-5\), \(M=1\), and for different values of the state parameter

Equation (19) is completely satisfied since \(M>0\). The speed of sound is given by

$$\begin{aligned} c_{s}^{2}&=A_{4} \sqrt{\frac{1}{1-\alpha -\frac{3 M}{2 r_{c}}}}-1. \end{aligned}$$
(42)

Thus, the rate of change of the mass of the fluid is

$$\begin{aligned} \dot{M}=\frac{4 \pi A_{2}^{2}A_{4} M^2 (w+1)}{r^{3/2} \sqrt{r \left( A_{4}^2+(\alpha -1) (w+1)^2\right) +2 M (w+1)^2}}. \end{aligned}$$
(43)

From Fig. 4, it can be seen that the radial velocity of the fluid is negative for the cases \(w=-1.5\) and \(w=-2\), while it is positive for \(w=-0.5,0,1\). If the fluid flow is inward then \(u>0\) is not allowed and vice versa. In the case of quintessence, the fluid velocity is zero (at rest) at \(x=1\), while it attains the critical velocity at approximately \(x=0.7\). Similarly for dust and stiff matter, the critical values of velocity occur at approximately \(x=0.3\). Similarly, the accretion of phantom fluids leads to critical flows after \(x=0.7\). In Fig. 5, we plot the evolution of the energy density of fluids in the vicinity of the black hole. It is apparent that for fluids satisfying the weak and dominant energy conditions such as dust, quintessence, and stiff fluid, the energy density increases as the fluid moves toward the BH, while the reverse happens for \(w=-1.5\) and \(w=-2\). In Fig. 6, we present a plot of the rate of change of the mass of the BH against x and find that the mass of the BH will increase due to the fluids satisfying energy conditions while it decreases for fluids violating the same energy conditions.

Fig. 6
figure 6

Rate of change of the mass of the black hole versus \(x=\frac{r}{M}\) for a barotropic fluid for different values of the state parameter, \(A_{2}=1\), \(A_{4}=1\), \(M=1\), and \(\alpha =-5\)

3.3 Janis–Newman–Winicour space-time

The physical existence of naked singularities is still questionable, however, there are few exact solutions of Einstein field equations that represent naked singularity. These include the JNW, JMN and gamma metrics [23]. The Janis–Newman–Winicour (JNW) solution is obtained as an extension of the Schwarzschild space-time when a massless scalar field (with vanishing potential) is introduced. Thus this solution is not a vacuum solution [24]. Here the coordinate singularity in the Schwarzschild space-time becomes a naked singularity in JNW space-time. Joshi et al. [23] (see also references therein) have investigated several astrophysical features distinguishing a black hole from a naked singularity. The gravitational lensing features due to a naked singularity have also been explored [25, 26].

There are various forms of JNW metric available in the literature, however, we adopt the following form [27]:

$$\begin{aligned}&A(r)=B(r)=\bigg [\frac{2r-r_{0}(\mu -1)}{2r+r_{0}(\mu +1)}\bigg ]^{\frac{1}{\mu }},\end{aligned}$$
(44)
$$\begin{aligned}&C(r)=\frac{1}{4}\frac{[2r+r_{0}(\mu +1)]^{\frac{1}{\mu }+1}}{[2r-r_{0}(\mu -1)]^{\frac{1}{\mu }-1}}, \end{aligned}$$
(45)

where \(\mu \) is the scalar charge which is defined in the interval \((1,\infty )\), and \(r_{0}\) is related to the mass by \(r_0=2M\). The Schwartzschild metric can be obtained by taking \(\mu =1\) after a coordinate transformation. The scalar field is

$$\begin{aligned} \varphi= & {} \frac{a}{\mu }\ln \bigg |\frac{2r-r_{0}(\mu -1)}{2r+r_{0}(\mu +1)}\bigg |, \end{aligned}$$
(46)

where a and \(\mu \) are related by

$$\begin{aligned} \mu&=1+\frac{32\pi a^{2}}{r_{0}^2}. \end{aligned}$$
(47)

In this case, the 4-velocity and the energy density of the barotropic fluid are

$$\begin{aligned} u(r)&=\frac{\sqrt{A_{4}^2-(w+1)^2 (2 r-\mu r_{0}+r_{0})^{1/\mu } (2 r+\mu r_{0}+r_{0})^{-1/\mu }}}{w+1},\end{aligned}$$
(48)
$$\begin{aligned} \rho (r)&=\frac{4 A_{2} (w+1) (2 r-\mu r_{0}+r_{0})^{\frac{1}{\mu }-1} (2 r+\mu r_{0}+r_{0})^{-\frac{\mu +1}{\mu }}}{\sqrt{A_{4}^2-(w+1)^2 (2 r-\mu r_{0}+r_{0})^{1/\mu } (2 r+\mu r_{0}+r_{0})^{-1/\mu }}}. \end{aligned}$$
(49)
Fig. 7
figure 7

Velocity profile versus \(x=\frac{r}{M}\) for \(A_{4}=0.3\), \(M=1\), \(\mu =2\), \(r_{0}=1\), and different values of the state parameter. For each figure, the critical radius is marked with a point for every chosen state parameter

In Fig. 7, we plot the radial velocity of the fluid for different values of the state parameter. The fluids have zero radial velocity in the asymptotic limit, however, they acquire non-vanishing velocities as they approach the naked singularity. Due to strong gravitational attraction near the naked singularity, the fluids achieve critical velocities for different values of x, however, interestingly we do observe some symmetry in the profile of the velocity curves and the location of critical points. After passing the critical point, the fluid flow becomes supersonic or trans-sonic. In Fig. 8, the graph of the energy density of different fluids in the neighborhood of a naked singularity. The fluid energy density for dust and quintessence rises in the near vicinity of singularity and goes to zero asymptotically. Similarly, we also see that the energy density of dust and quintessence remains positive, while for phantom fluids it is negative.

Fig. 8
figure 8

Energy density versus \(x=\frac{r}{M}\) for \(A_{2}=1\), \(A_{4}=0.3\), \(\mu =2\), \(r_{0}=1\), and for different values of the state parameter

In addition, for this metric we find that

$$\begin{aligned}&u_{c}^{2}=\frac{r_{0}}{4r_{c}} \left( \frac{2 (2 r_{c}+r_{0})}{2 r_{c}+ (\mu +1)r_{0}}-1\right) ^{1/\mu },\end{aligned}$$
(50)
$$\begin{aligned}&V_{c}^2=\frac{r_{0}}{4 r_{c}+r_{0}},\end{aligned}$$
(51)
$$\begin{aligned}&c_{s}^{2}=2 A_{4} \sqrt{\frac{r_{c}}{4 r_{c}+r_{0}}}\left( \frac{2 r_{c}(1-\mu ) r_{0}}{2 r_{c}+(\mu +1) r_{0}}\right) ^{-\frac{1}{2\mu }}-1. \end{aligned}$$
(52)

Using the condition (19) we obtain

$$\begin{aligned}&2 r_{0} (2 r_{c}-\mu r_{0}+r_{0})^{\frac{1}{\mu }-1} \left( \frac{2 r_{c}-\mu r_{0}+r_{0}}{2 r_{c}+\mu r_{0}+r_{0}}\right) ^{1/\mu }\nonumber \\&\quad \times (2 r_{c}+\mu r_{0}+r_{0})^{-\frac{\mu +1}{\mu }}>0. \end{aligned}$$
(53)

For this case, the fluid will have a rate of change of its mass as follows:

$$\begin{aligned} \dot{M}=\frac{16 \pi A_{2}^{2} A_{4} M^2 (w+1) (2 r+(1-\mu ) r_{0})^{\frac{1}{\mu }-1} (2 r+(\mu +1) r_{0})^{-\frac{\mu +1}{\mu }}}{\sqrt{A_{4}^2-(w+1)^2 (2 r+(1-\mu ) r_{0})^{1/\mu } (2 r+(\mu +1) r_{0})^{-1/\mu }}}. \end{aligned}$$
(54)

From Fig. 9, we see that the mass of the JNW singularity increases in the cases of dust and quintessence, while it decreases for phantom fluids.

Fig. 9
figure 9

Rate of change of the mass of the black hole versus \(x=\frac{r}{M}\) for a barotropic fluid for different values of the state parameter, \(A_{2}=1\), \(A_{4}=0.3\), \(M=1\), \(\mu =2\), and \(r_{0}=1\)

3.4 Charged black hole in string theory

Gibbons and Maeda [28] and later on independently Garfinkle et al. [29] discovered a static spherical symmetric charged black hole in low energy effective theory of heterotic string theory in four dimensions. Sharif and Abbas [30] investigated the dynamical behavior of the phantom energy \(w<-1\) near stringy charged black hole. They deduced that this mechanism reduces the mass of the black hole, though the black hole cannot be convertible to the extremal black hole. We again analyze this black hole for accretion dynamics without restricting w. We write down the stringy charged metric in the following form [31]:

$$\begin{aligned}&A(r)=B(r)=1-\frac{2M}{r},\end{aligned}$$
(55)
$$\begin{aligned}&C(r)=\Big (1-\frac{Q^2\exp {(-2{\varPhi }_{0})}}{Mr}\Big )r^2, \end{aligned}$$
(56)

where Q is the charge parameter and \({\varPhi }_{0}\) the asymptotic value of the dilatonic field which can be set to zero under certain cases [32]. In this case, we have

$$\begin{aligned} u_{c}^{2}= & {} \frac{M Q^2-M^2 r e^{2 {\varPhi }_{0}}}{Q^2 r-2 M r^2 e^{2 {\varPhi }_{0}}},\end{aligned}$$
(57)
$$\begin{aligned} V_{c}^2= & {} \frac{M \left( Q^2-M r e^{2 {\varPhi }_{0}}\right) }{Q^2 (r-M)+M r e^{2 {\varPhi }_{0}} (3 M-2 r)},\end{aligned}$$
(58)
$$\begin{aligned} c_{s}^{2}= & {} A_{4} \sqrt{\frac{r \left( 2 M r e^{2 {\varPhi }_{0}}-Q^2\right) }{Q^2 (M-r)+M r e^{2 {\varPhi }_{0}} (2 r-3 M)}}-1. \end{aligned}$$
(59)

The radial component of the 4-velocity of the fluid and the energy density are, respectively,

$$\begin{aligned} u(r)&=-\frac{\sqrt{r \left( A_{4}^2-(w+1)^2\right) +2 M (w+1)^2}}{\sqrt{r} (w+1)},\end{aligned}$$
(60)
$$\begin{aligned} \rho (r)&=-\frac{A_{2} M e^{2 {\varPhi }_{0}} (w+1)}{\sqrt{r} \sqrt{r \left( A_{4}^2-(w+1)^2\right) +2 M (w+1)^2} \left( M r e^{2 {\varPhi }_{0}}-Q^2\right) }. \end{aligned}$$
(61)

In Figs. 10 and 11, we plotted the radial component of the fluid flow velocity against the dimensionless radial coordinate x. We also represent the location of critical velocity by thick dots whose presence in the fluid flow profiles show that critical flow is a generic property of all fluids in the strong gravitational regimes. All velocity profiles \(u(x)>0\) are physically forbidden, since nothing can escape from the black hole. However, flows of dust, stiff matter, and quintessence are permissible under our assumptions of inward flows, \(u<0\) for all x.

Fig. 10
figure 10

Velocity profile versus \(x=\frac{r}{M}\) for \(A_{4}=2.1\), \(M=1\), \(Q=1.5\), \({\varPhi }_{0}=-0.1\), and different values of the state parameter. For each figure, the critical radius is marked with a point for every chosen state parameter

Fig. 11
figure 11

Velocity profile versus \(x=\frac{r}{M}\) for \(A_{4}=2.1\), \(M=1\), \(Q=1.5\), \({\varPhi }_{0}=-0.1\), and for \(w=1.0\). The critical radius is marked with a point

In Figs. 12 and 13, we plotted the energy density profiles of the fluids in the vicinity black hole. For phantom-like fluids, the energy density is negative while for the quintessence, dust, and stiff fluids the energy density is positive. It also shows that fluids will have higher densities compared to their asymptotic values.

Fig. 12
figure 12

Energy density versus \(x=\frac{r}{M}\) for \(A_{4}=2.1\), \(A_{2}=1\), \(M=1\), \(Q=1.5\), \({\varPhi }_{0}=-0.1\), and for different values of the state parameter

Fig. 13
figure 13

Energy density versus \(x=\frac{r}{M}\) for \(A_{4}=2.1\), \(A_{2}=1\), \(M=1\), \(Q=1.5\), \({\varPhi }_{0}=-0.1\), and for \(w=1\)

By using (19) we find the following constraint for the critical radius:

$$\begin{aligned} \frac{2 M^2 e^{2 {\varPhi }_{0}}}{r^2 \left( 2 M r e^{2 {\varPhi }_{0}}-Q^2\right) }>0. \end{aligned}$$
(62)

Therefore, the rate of change of the mass is given by

$$\begin{aligned} \dot{M}=-\frac{4 \pi A_{2}^{2}A_{4} M^3 e^{2 {\varPhi }_{0}} (w+1)}{\sqrt{r} \sqrt{r (A_{4}-w-1) (A_{4}+w+1)+2 M (w+1)^2} \left( M r e^{2 {\varPhi }_{0}}-Q^2\right) }. \end{aligned}$$
(63)

In Figs. 14 and 15, the rate of change in the BH mass \(\dot{M}\) is plotted against x for different values of state parameter. In all cases, it is observed that the BH mass will increase by the accretion of quintessence, dust or the stiff fluid when x is small. Strikingly, the maximum rate of increase in BH mass arises due to quintessence followed by dust and stiff fluid.

Fig. 14
figure 14

Rate of change of the mass of the black hole versus \(x=\frac{r}{M}\) for a barotropic fluid with different values of the state parameter and the following parameters: \(A_{4}=2.1\), \(A_{2}=1\), \(M=1\), \(Q=1.5\), and \({\varPhi }_{0}=-0.1\)

Fig. 15
figure 15

Rate of change of the mass of the black hole versus \(x=\frac{r}{M}\) for a barotropic fluid with \(w=1\) and the following parameters: \(A_{4}=2.1\), \(A_{2}=1\), \(M=1\), \(Q=1.5\), and \({\varPhi }_{0}=-0.1\)

4 Discussion

We have proposed a most general framework for the study of spherical accretion onto spherically symmetric compact objects. We explored various features of the fluid flow near black holes. Although we assumed all the fluids to satisfy a certain linear equation of state with distinct state parameters, the above analysis can alternatively be performed without specifying the equation of state, since the number of equations are sufficient to close the system of equations. Interestingly we found a link between the barotropic equation of state and the conservation laws. However, the equation of state helps us identify which kind of fluid is falling onto the black hole. In other words there is no multiple accretion scenario into play, though it can be done. In particular, we focused on dust, stiff matter, quintessence, and phantom dark energy accretion onto black holes unlike previous studies in the literature, which focused on only one kind of test fluid. We did not consider the case of the cosmological constant or vacuum energy since its accretion does not alter the evolution of black holes. It is found that different fluids with distinct state parameters have different evolutions in the black hole backgrounds. Certain fluids acquire positive or negative energy density near the black hole, while some fluids cause black hole masses to increase or decrease. Although we plotted all the fluid behaviors via single graphs, it is assumed that a single test fluid is accreted at one time. For a future work it will be interesting to perform a similar analysis with a dynamically spherically symmetric geometry or with a non-static fluid.