1 Introduction

Since the proof that the area of a black hole never classically decreases, it has been proposed that it can be interpreted as the entropy of a thermodynamic system [1, 2]. In this framework, one can construct a dictionary between gravitational and thermodynamic concepts, e.g, through the relation between mass and the internal energy, surface gravity and the temperature, and the area of the event horizon and the entropy. In the case of the Schwarzschild black hole one cannot naively introduce a work term, but for a more complex black hole such as the Kerr–Newman, work terms can be easily introduced based on the charge and angular momentum of the black hole. One feature of this classic black hole thermodynamics is the lack of the PdV mechanical work term. This missing term has been fully reintroduced only in the previous decade, by considering the cosmological constant as a state parameter, and not as a true constant [3].

In this extended framework, the pressure of the system is related to the cosmological constant, and the gravitational mass is no longer identified with the internal energy, but with the enthalpy. In this scenario, there is a possibility of the system to absorb heat and to perform mechanical work, and thus a next natural step would be to study the black hole itself as a heat engine. This idea has been put forward by Johnson for the case of the charged Schwarzschild–Anti de Sitter (AdS) metric [4], and since then several authors have studied other kinds of black holes both in general relativity and in some modified theories of gravity [5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]. The main purpose of this paper is to give our contribution to the subject, studying how the inclusion of a cosmological cloud of strings, in the background of an asymptotically anti-de Sitter black hole, would affect the correlated thermodynamic system and its configuration as a heat engine.

Another interesting result concerning the introduction of a mechanical work term is the possibility to study phase transitions on the PV plane. The first phase transition on the history of black hole thermodynamics has been discovered by Hawking and Page in their seminal paper on the thermodynamics of AdS black holes [23]. With the realization of Maldacena [24, 25] and others that gravitational systems in AdS spacetime admits a gauge duality with thermal fields, it is interesting to look how asymptotically spacetimes can be related to thermodynamic systems. With the introduction of charge in the anti-de Sitter spacetime, Kubiznak and Mann [26] were able to construct an equation of state for the charged AdS black hole analogue to the Van der Waals equation, and to show the existence of several new phase transitions. In this paper we will perform a similar analysis, but using a string cloud background instead of a electromagnetic field, and we will show that in higher dimensions we recover the same Van der Waals equation of state with the same critical parameters.

A cloud of strings (CoS) is the one-dimensional analogous of a cloud of dust and has been introduced, as far as we know, by Letelier [27]. For a radial configuration, its static nature can be maintained by the balance between the internal pull of the gravitational field with the external push of a negative pressure due to the string. Despite the fact that the string cloud has been introduced as a configuration for one-dimensional strings, it resembles some others purely energetic field configurations, such as the global monopole in four dimensions [28]. The advantage to consider a string cloud configuration is that it can be easily extended from four to arbitrary higher dimensional spacetimes. Thus apart from the physical interpretation of a parameter related to the string cloud, one can apply our whole discussion for the global monopole, for the usual fourth-dimensional spacetime.

In this paper we will consider black holes surrounded by a string cloud both in general relativity and in the framework of f(R) gravity. The latter is today a well-known alternative theory for gravity, that has received a great deal of attention in recent years due to the possibility to explain the current accelerated expansion of the universe by purely geometrical reasons (for reviews, the reader is refereed to [29,30,31]). Another reason to study f(R) theories is that it serves as a toy model for an effective theory of gravity, where we can consider the f(R) function as a Fourier expansion in the Ricci scalar.

The PV criticality of black holes and its realization as heat engines have already been studied in the framework of f(R) theories [16, 32], but only in the case of a constant Ricci scalar. In this regime, the f(R) gravity is equivalent to general relativity with a cosmological constant, and the theory lacks of interesting features like higher derivatives in the metric field. In the case of the analogous thermodynamic system, only when we consider a non-constant Ricci scalar we are forced to introduce, as we will see, the non-trivial definition of the thermodynamic volume.

This paper is organized as follows. In Sect. 2, we will briefly introduce the idea of the string cloud and its spacetime metric both in general relativity and in f(R) gravity. In Sect. 3, we will study the black hole as a thermodynamic system in the extended phase space, i.e., with the PdV mechanical work term in general relativity and its realization as a heat engine. In Sect. 4, we will do the same analysis, but in the framework of f(R) gravity. Finally, in Sect. 5 we will present our conclusions.

2 Black hole with a string cloud in f(R) gravity

A string cloud is the analogous of a cloud of dust for one-dimensional objects. If one consider a spherically symmetric spacetime, it can be seen as a flow of energy along a radial direction, away from the black hole, starting at its horizon.Footnote 1 In a four dimensional spacetime, it resembles the field of a global monopole, and the effect of the energy–momentum tensor on some background metric is to cause a solid angle deficit. In the case of a higher dimensional spacetime, the effect of the string cloud in the metric is far from trivial, but affects only its radial and time components. The energy–momentum of the string cloud is given by

$$\begin{aligned} T{^t_t} = T{^r_r} = - \frac{\sigma ^2}{r^{d-2}}, \end{aligned}$$
(1)

where \(\sigma \) is a parameter related to the strength of the cloud, and d is the spacetime dimension. All the other components of the energy–momentum tensor are null (for a discussion on the origin of this energy–momentum tensor, please see [27, 33]).

To study the string cloud in f(R) gravity, in principle, we can choose any functional form for the function f(R), and try to solve its field equations. In practice, it is generally not possible to find an exact solution for a non-constant Ricci scalar. The most used method to work in f(R) gravity is to propose a desired solution, in general one that can be analytically written, and then let the equations impose constraints on the f(R) functional form.

In this paper we will use a f(R) such that \(df(R)/dR = 1 + \psi _0 r\), where \(\psi _0\) is the parameter that indicates departures from general relativity, and we shall consider \(\psi _0r<<1\). One should notice that this restricts the validity of the metric, but as long as we assume \(\psi _0\) as a small parameter we can still consider high values of r. This constraint imposes that our f(R) theory is a small modification of general relativity. This is not a random guess, but is a constraint imposed by the field equations so that the metric can be found analytically, has a Schwarzschild-like form (\(g_{tt}=-g_{rr}^{-1}\)) and reduces to the Schwarzschild-Tangherlini-AdS metric in the weak-field limit, i.e., as \(\psi _0 \rightarrow 0\) and \(\sigma \rightarrow 0\).

For this f(R) function, a spacetime solution can be found for the static spherically symmetric configuration as some of us derived in [33]. In fact, for the metric

$$\begin{aligned} ds^2 = -A(r) dt^2 + B(r) dr^2 + r^2 \gamma _{ij} dx^i dx^j, \end{aligned}$$
(2)

where \(\gamma _{ij}\) is a \((d-2)\)-dimensional sphere, and the latin indices \((i,j,\ldots )\) run from 2 to d. Using the f(R) field equations

$$\begin{aligned}&F(R) R_{\mu \nu } - \frac{1}{2}f(R) g_{\mu \nu } - \nabla _{\mu } \nabla _{\nu } F(R) + g_{\mu \nu } \Box F(R)\nonumber \\&\quad = \kappa ^2 T_{\mu \nu }, \end{aligned}$$
(3)

where \(F(R)=df/dR\), and the components of the Ricci tensor

$$\begin{aligned} R{^t_t}&= - \frac{1}{4} \frac{-A'B'Ar + 2 A''ABr - A'^2Br + 2(d-2) A'BA }{A^2 B^2 r}, \end{aligned}$$
(4)
$$\begin{aligned} R{^r_r}&= - \frac{1}{4} \frac{-A'^2 Br + 2A''BAr - A'B'Ar - 2(d-2) B'A^2}{A^2 B^2 r}, \end{aligned}$$
(5)
$$\begin{aligned} R{^i_i}&= \frac{1}{2} \frac{-A'Br + B'Ar + 2(d-3)B^2A - 2(d-3)BA}{A B^2 r^2}\, , \end{aligned}$$
(6)

we derive the metric solution

$$\begin{aligned} ds^2 = - (1 + A(r)) dt^2 + (1 - A(r)) dr^2 + r^2 \gamma _{i j} dx^i dx^j, \nonumber \\ \end{aligned}$$
(7)

where

$$\begin{aligned} A(r)= & {} D_1r^{3-d} + D_2r^2 - \frac{16 \pi G \sigma ^2}{d-2}r^{4-d}\nonumber \\&- \frac{2 \psi _0 r}{d-2} + \frac{8 \pi G \sigma ^2 \psi _0}{d-3}r^{5-d}. \end{aligned}$$
(8)

In this equation \(D_1\) and \(D_2\) are integration constants related to the black hole mass parameter and a negative cosmological constant, which leads to:

$$\begin{aligned} A(r)= & {} -\frac{16 \pi GM}{(d-2) \varOmega _{d-2}}r^{3-d} + \frac{r^2}{l^2} - \frac{16 \pi G \sigma ^2}{d-2}r^{4-d}\nonumber \\&- \frac{2 \psi _0 r}{d-2} + \frac{8 \pi G \sigma ^2 \psi _0}{d-3}r^{5-d} \end{aligned}$$
(9)

where G is Newton’s gravitational constant, \(\varOmega _{d-2}\) is the unitary radius for the \(S^{d-2}\)-sphere which will be better defined latter, M is a parameter to be related to the black hole mass, and \(l^2\) is a squared radius related to the negative cosmological constant \(\varLambda \).

Using this solution we can reconstruct the f(R)-function. In fact, the metric that we found defines a Ricci scalar R, which is a function of the radial coordinate \(R=h(r)\). When it is possible to invert this equation as \(r=h^{-1}(R)\), we can use our ansatz to recover the function \(df(R)/dR=1+\psi _0h^{-1}(R)\). Integrating this equation, we are able to recover the original function f(R) that generated this solution.

In particular, for our case of a string cloud solution, we can analytically derive a function only in four dimensions:

$$\begin{aligned} f(R)=&\,R-2\psi _0\sqrt{9\psi _0^2+16\pi G\sigma ^2R+192\pi G\frac{\sigma ^2}{l^2}}\nonumber \\&-3\psi _0^2\ln \left( \frac{\sqrt{9\psi _0^2l^2+16\pi G\sigma ^2l^2R+192\pi G\sigma ^2}-3\psi _0l}{\sqrt{9\psi _0^2l^2+16\pi G\sigma ^2l^2R_0+192\pi G\sigma ^2}-3\psi _0l}\right) \nonumber \\&+3\psi _0^2\ln \left( \frac{\sqrt{9\psi _0^2l^2+16\pi G\sigma ^2l^2R+192\pi G\sigma ^2}+3\psi _0l}{\sqrt{9\psi _0^2l^2+16\pi G\sigma ^2l^2R_0+192\pi G\sigma ^2}+3\psi _0l}\right) \nonumber \\&+3\psi _0^2\ln \left( \frac{l^2R+12}{l^2R_0+12}\right) , \end{aligned}$$
(10)

where \(R_0\) is an integration constant. For dimensions greater than four approximative methods should be employed for deriving an effective f(R) function.

For the case of the black hole with a string cloud in general relativity, we assume that when \(\sigma \rightarrow 0\) we obtain the Schwarzschild-Tangherlini-AdS metric, not only in the weak field limit. This means that, for general relativity, the spacetime for the black hole with a string cloud will be given by the metric

$$\begin{aligned} ds^2 = - B(r) dt^2 + B(r)^{-1} dr^2 + r^2 \gamma _{i j} dx^i dx^j, \end{aligned}$$
(11)

where

$$\begin{aligned} B(r) = 1 - \frac{16 \pi GM}{(d-2) \varOmega _{d-2}}r^{3-d} + \frac{r^2}{l^2} - \frac{16 \pi G \sigma ^2}{d-2}r^{4-d}.\nonumber \\ \end{aligned}$$
(12)

For a detailed discussion on how to obtain the above metrics, and for a study on the classical thermodynamics of the black hole string cloud in f(R) gravity, the reader is referred to [33].

In the following section we will study the PV criticality and the realization of the black hole as a heat engine in general relativity.

3 Black hole thermodynamics in general relativity

In this section we will briefly review the thermodynamics of black holes in general relativity and apply it for the case of a black hole with a string cloud. In the next section, we will extend our study for f(R) gravity.

The radius of the event horizon, also called the horizon radius, \(r_+\), satisfies the following equation

$$\begin{aligned} 1 - \frac{16 \pi GM}{(d-2) \varOmega _{d-2}}r_+^{3-d} + \frac{r_+^2}{l^2} - \frac{16 \pi G \sigma ^2}{d-2}r_+^{4-d} = 0, \end{aligned}$$
(13)

which allows us to write the integration constant, M, as

$$\begin{aligned} M = \frac{(d-2) \varOmega _{d-2} r_+^{d-3}}{16 \pi G} \left( 1 + \frac{r_+^2}{l^2} - \frac{16 \pi G \sigma ^2 r_+^{4-d}}{d-2}\right) . \nonumber \\ \end{aligned}$$
(14)

By our convention, the ADM mass of the system is related to the integration constant by \(M_{adm} = 4\pi M / \varOmega _{d-2}\), where

$$\begin{aligned} \varOmega _{d-2}=\frac{2\, \pi ^{(d-1)/2}}{\varGamma ((d-1)/2)}. \end{aligned}$$
(15)

As can be seen, in four dimensions the ADM mass is equal to the integration constant M, and for an arbitrary dimensional we have

$$\begin{aligned} M_{adm} = \frac{1}{4Gl^2} \frac{1}{r_+^{3-d}} [(d-2)(r_+^2+l^2) - 16 \pi G \sigma ^2 l^2 r_+^{4-d}].\nonumber \\ \end{aligned}$$
(16)

The Hawking temperate can be found using the Euclidean trick, and it can be identified as

$$\begin{aligned} T= & {} \frac{\hbar }{\kappa _B \varOmega _{d-2}}\left[ \frac{dg(r)}{dr}\right] _{r=r_+} = \frac{\hbar }{\kappa _B \varOmega _{d-2}} \frac{1}{l^2 r_+} \nonumber \\&\times \left[ (d-3)l^2 + (d-1) r_+^2 - \frac{16 \pi G \sigma ^2 l^2}{d-2}r_+^{4-d}\right] , \end{aligned}$$
(17)

where \(\hbar \) is the reduced Planck constant and \(\kappa _B\) is the Boltzmann constant. The Bekenstein-Hawking entropy is related to the area of the black hole, and is given by

$$\begin{aligned} S = \frac{\kappa _B}{4G\hbar } \varOmega _{d-2} r_+^{d-2}, \end{aligned}$$
(18)

and we are now ready to express the first law of thermodynamics.

As was shown in the last section, the black hole mass M and the cosmological constant l were recognized from integration constants when we derived the metric from the field equations. Therefore, the cosmological constant l contributes to the metric as a parameter of the black hole geometry, just as a the mass M. Then it is relevant to consider not just M, but also l as varied when analyzing the black holes mechanics/thermodynamics. A similar role of the cosmological constant was also contemplated in the seminal paper [34] on this subject (see also [35] for the treatment of the cosmological constant as a dynamical field) Allowing l to vary, the differential of the ADM mass can be written as

$$\begin{aligned} dM_{adm} = T dS - \frac{1}{4 G r_+^{3-d}}2 (d-2) \frac{r_+^2}{l^3} dl, \end{aligned}$$
(19)

and thus can be compared with the thermodynamic definition of enthalpy, \(dH = TdS + VdP\), where V is the thermodynamic volume of the system and P is its pressure. Let us note that, in the absence of the cosmological constant, one simply obtains \(dM_{adm} = T dS\). Equation (19) allows us to identify the ADM mass with the enthalpy, and, defining the \((d-1)\)-dimensional volume as

$$\begin{aligned} V_{d-1} = \frac{\pi ^{(d-1)/2}}{\varGamma ((d+1)/2)} r_+^{d-1}, \end{aligned}$$
(20)

one can identify the pressure of the thermodynamic system as

$$\begin{aligned} P = \frac{d-2}{4G} \frac{\varGamma ((d+1)/2)}{\pi ^{(d-1)/2}} \frac{1}{l^2}. \end{aligned}$$
(21)

Another motivation for this identification follows from recognizing that that a negative cosmological constant induces a positive vacuum pressure in the spacetime, as pointed out in the review [36].

For \(d=4\), we get the usual identification \(P = 3/8\pi G l^2\). Using the relations (20) and (21), we can rewrite (17) as an equation of state, given by

$$\begin{aligned} P= & {} \frac{(d-2)}{(d-1)} \frac{\varGamma (\frac{d+1}{2})^{(d-2)/(d-1)}}{4G \pi ^{(d-2)/2}}\nonumber \\&\times \left[ \frac{\kappa _B \varOmega _{d-2} T}{\hbar V^{1/(d-1)}}- \frac{(d-3) \sqrt{\pi }}{\varGamma (\frac{d+1}{2})^{1/(d-1)} V^{2/(d-1)}}\right. \nonumber \\&\left. + \frac{16 \pi G \sigma ^2}{(d-2)} \frac{\pi ^{(d-3)/2}}{\varGamma (\frac{d+1}{2})^{(d-3)/(d-1)} V^{(d-2)/(d-1)}} \right] \, . \end{aligned}$$
(22)

We can also write the temperature as a function of the entropy and the pressure, as

$$\begin{aligned} T= & {} \frac{\hbar }{\kappa _B \varOmega _{d-2}}\frac{1}{\tilde{S}^{1/(d-2)}}\left[ d-3+(d-1)\tilde{S}^{2/(d-2)}\tilde{P}\right. \nonumber \\&\left. - \frac{16 \pi G\sigma ^2}{d-2} \tilde{S}^{(4-d)/(d-2)}\right] , \end{aligned}$$
(23)

where \(\tilde{S} \doteq 4 G\hbar S / \kappa _B \varOmega _{d-2}\) and \(\tilde{P} \doteq 4 G \pi ^{(d-1)/2} P / (d-2) \varGamma ((d+1)/2)\). With this equation, we can compute the heat capacity as \(C = T \partial S / \partial T\), obtaining the following result

$$\begin{aligned} C= & {} \frac{\kappa _B \varOmega _{d-2}}{4 G \hbar } (d-2)\tilde{S} \left( 1 - \frac{\hbar (d-1)}{\kappa _B \varOmega _{d-2}} \tilde{S}^{1/(d-2)}\frac{\partial \tilde{P}}{\partial T}\right) \nonumber \\&\times \frac{[(d-1)\tilde{P}\tilde{S}^{d/(d-2)} + (d-3)\tilde{S} - 16 \pi \sigma ^2 \tilde{S}^{2/(d-2)}/(d-2)]}{[(d-1)\tilde{P}\tilde{S}^{d/(d-2)} - (d-3)\tilde{S} + 16 (d-3) \pi \sigma ^2 \tilde{S}^{2/(d-2)}/(d-2)]}.\nonumber \\ \end{aligned}$$
(24)

If one calculates \(\partial \tilde{P} / \partial T\) at constant volume, one will find that the above quantity vanishes. This means that the heat capacity at constant volume, \(C_V\), is null. This result is a consequence of the fact that both the volume and entropy are functions of the horizon radius only, as will be clear when we study the same object in f(R) gravity. Thus for any process involving the system, isochorics are also adiabatics, a feature that will be explored when we define the cyclic process of our heat engine.

To follow up our analysis, we will work with the functional form of the pressure depending on the horizon radius and the temperature. This choice is motivated by the fact that the quantity \(\nu =2\ell _P^2r_+\) plays the role of the specific volume of the system, i.e, it is the thermodynamic volume divided by the number of degrees of freedom of the horizon \(N=A/\ell ^2_P\), where \(\ell _P\) is the Planck length. In the major part of the literature that compares the black hole behavior with a Van der Waals fluid, this quantity is used to represent the corresponding specific volume. Using the definition of \(\varOmega _{d-2}\) and the recurrence relation \(\varGamma (\alpha +1)=\alpha \varGamma (\alpha )\), one can rewrite the pressure (22) as

$$\begin{aligned} P(r_+,T)= & {} \frac{(d-2)}{4G(d-1)}\left[ \frac{(d-1)k_B}{\hbar }\frac{T}{r_+}\right. \nonumber \\&-\frac{(d-3)}{r_+^2}\pi ^{\frac{1-d}{2}}\varGamma \left( \frac{d+1}{2}\right) \nonumber \\&\left. +\frac{16\pi G \sigma ^2}{d-2} \pi ^{\frac{1-d}{2}}\varGamma \left( \frac{d+1}{2}\right) r_+^{2-d}\right] \, . \end{aligned}$$
(25)

The critical temperature, \(T_c\), and radius, \(r_c\), can be found by solving the following system of equations

$$\begin{aligned}&\left( \frac{\partial P}{\partial r_+}\right) \Big |_T=0, \end{aligned}$$
(26a)
$$\begin{aligned}&\left( \frac{\partial ^2 P}{\partial r_+^2}\right) \Big |_T=0, \end{aligned}$$
(26b)

where it is straightforward to find that

$$\begin{aligned} T_c&=\frac{\hbar \,}{k_B}\frac{(2d-8)}{d-1}(8G\sigma ^2)^{\frac{1}{4-d}}\pi ^{\frac{(d-2)(d-3)}{2(4-d)}}\varGamma \left( \frac{d+1}{2}\right) \, , \end{aligned}$$
(27)
$$\begin{aligned} r_c&=\left( 8\pi G \sigma ^2\right) ^{\frac{1}{d-4}}\, . \end{aligned}$$
(28)

As can be inferred from the equations above, there is no criticality for \(d=4\), i.e., the critical temperature and radius are not defined, which is a behavior that is in contradiction with previous cases like the Reissner–Nordstrom–AdS (RN-AdS) black hole [26]. We should also note that for \(d=3\), the critical temperature is negative. The most interesting cases occur for \(d>4\), where the behavior of the thermodynamic quantities are similar to previous cases and the criticality can be fully realized.

We also draw attention to the interesting relation between the critical quantities, given by

$$\begin{aligned} \frac{P_c\, r_c}{T_c}=\frac{(d-3)}{8}\frac{k_B}{G\hbar }\, , \end{aligned}$$
(29)

where \(P_c\doteq P(r_c,T_c)\). This is a universal relation, which is valid for any string cloud, since it does not depend on \(\sigma \). For \(d=6\), one find

$$\begin{aligned} \frac{G\hbar }{k_B}\frac{P_c\, r_c}{T_c}{\Big |}_{d=6}=\frac{3}{8}, \end{aligned}$$
(30)

which turns out to be the same numerical value found when analyzing a Van der Waals fluid by a RN-AdS black hole system. This happens because only in \(d=6\), the string cloud can emulate the contribution due to the electronic charge in four-dimensions, which is a \(r_+^{-4}\) contribution in the equation of state for the pressure (25) (to be compared with Eq. (3.18) in [26]).

This duality between four and six dimensions is useful for the study of criticality, when considering the ADM mass as the enthalpy of the system, but this would be also the case if we work with the Gibbs free energy \(G(T,P)=H-ST\) and the free energy \(F(T,V)=G-PV\) for finding the critical exponents. However, this is not a perfect duality, since the ADM masses are not equivalent in these distinct cases, which will lead to a distinct behavior of the efficiency of this black hole as a heat engine for the square circle PV diagram, as we will see in the next section, in Eq. (34).

We illustrate the \(P-r_+\) diagrams in Figs. 1 and 2 (we set \(\hbar =k_B=G=1\)). As can be seen, there are no critical values for d \(=4\), which implies that the diagram always follow the same behavior, i.e., \(\partial P/\partial r_+\) at constant temperature is always negative. For a van de Waals fluid, \(T_c\) means the temperature above which it is not possible to distinguish liquid and gas phases; for the black hole chemistry the analogy consists in translating liquid/gas to small/large black hole. Therefore, in our case of a string cloud configuration, in \(d=4\), due to the absence of a critical temperature, the thermodynamic behavior is the same for small and large black holes.

For \(d>4\), there exist critical quantities, which implies that below \(T_c\), there are regions in the \(P-r_+\) diagram that allow for distinctions between the different “phases” of small/large black holes. For instance, in Fig. 2, we depicted the diagram for seven dimensions, in which can be seen the qualitative behavior of the pressure \(P(r_+)\) for \(T<T_c\), where a phase transition occurs. We again remark that the qualitative behavior is similar to the RN-AdS black hole analyzed in [26]. For a discussion of the phase transitions based on the non-extended phase space, i.e., without the PdV working term, the reader is refereed to [37].

Fig. 1
figure 1

\(P-r_+\) diagram in the four-dimensional case, for \(\sigma =1\)

Fig. 2
figure 2

\(P-r_+\) diagram in the seven-dimensional case, for \(\sigma =10^{-2}\)

3.1 Heat engines

The subject of thermodynamics has been developed as a tool to study the behavior and efficiency of heat engines, i.e., machines that produce work using some substance as its fuel. In this framework it is natural that, after considering black holes as thermodynamic systems, one can consider such system as a heat engine, where the substance used by such engine is defined by its equation of state, given by Eq. (22) in the case of the present paper.

Fig. 3
figure 3

A 2T heat engine

The most natural heat engines are the ones working between two reservoirs of temperature, as sketched in Fig. 3, where \(Q_H\) stands for the amount of heat extracted by the warmer reservoir \(T_1\), and \(Q_C\) is the amount of heat rejected on the colder reservoir \(T_2\). The main function of the engine is to produce some positive work, represented by the letter W.

It has been proved by Carnot that any other heat engine has lower or at least equal efficiency compared with a heat engine that operates a reversible cycle, such as the one named Carnot cycle, constructed by two isothermals and two adiabatics. As is well-know, the efficiency of a heat engine is defined by

$$\begin{aligned} \eta \doteq \frac{W}{Q_H}, \end{aligned}$$
(31)
Fig. 4
figure 4

A Carnot cycle for null \(C_V\)

where W and \(Q_H\) has already been introduced. For the case of black hole heat engines, since isochorics are adiabatics, the Carnot cycle for our static black hole is simpler and can be represented by Fig. 4. One feature of the Carnot engine is that its efficiency depends only on the temperature of the reservoirs, and it is given by

$$\begin{aligned} \eta = 1 - \frac{T_C}{T_H}, \end{aligned}$$
(32)

where \(T_C\) and \(T_H\) are the temperatures of the two reservoirs, considering that \(T_H > T_C\). Calculating the efficiency of the black hole as a Carnot heat engine is straightforward, since we can use Eq. (32) with the temperature of the black holes.

Fig. 5
figure 5

A square cycle in the P–V diagram

For an arbitrary cycle, the efficiency should be calculated by Eq. (31), and hardly it will be possible to find an analytic formula, given the complexity of the equation of state (22). In his pioneering paper [4], Johnson has proposed a simple enough cycle so one could calculate an exact expression for the efficiency. This cycle is composed by two adiabatics/isochorics and two isobarics, as represented in Fig. 5. The work done by this heat engine is the area of the rectangle \(1 \rightarrow 2 \rightarrow 3 \rightarrow 4\), and the heat absorbed by the system along the isobar \(1 \rightarrow 2\) can be easily found using the first law of thermodynamics,

$$\begin{aligned} dH = \delta Q + V dP. \end{aligned}$$
(33)

Since the pressure is constant, we have that the heat absorbed is simply the enthalpy, that is the ADM mass of the black hole. For this reason, the efficiency of the rectangular cycle is given by

$$\begin{aligned} \eta = \frac{W}{Q_A} = 1 - \frac{Q_R}{Q_A} = 1 - \frac{M_3 - M_4}{M_2 - M1}, \end{aligned}$$
(34)

where \(Q_R\) is the heat emitted by the system, and \(Q_A\) the heat absorbed by the system. We should stress out the fact that this is not a heat engine operating between two reservoirs. As we mentioned before, due to the dimension-dependence of the ADM mass from Eq. (16), we see that the duality between the four-dimensional RN-AdS and six-dimensional CoS-AdS black holes is not perfect, since the efficiency of this square cycle allows us to distinguish between these configurations.

Given these considerations, we are now able to study the heat engine in more details. We will not explicitly write the formulas for Eqs. (32) and (34) since it can be easily found if one substitute the values for mass and temperature given by Eqs. (16) and (17), respectively. Instead, we will plot the Carnot efficiency and the squared cycle efficiency as functions of the string cloud parameter \(\sigma \). Our aim is to analyze the effect of the introduction of a string cloud in the efficiency of the black hole as a heat engine.

Fig. 6
figure 6

Efficiency of the Carnot cycle as a function of the string cloud parameter \(\sigma \)

In Fig. 6, we analyze the efficiency of the Carnot cycle for \(\tilde{S}_H = 1, \tilde{P}_H = 8, \tilde{S}_C = 10\) and \(\tilde{P}_C = 1\), where the subscripts H and C stands for Hot and Cold. All other constants are set to be equal unity. The choice criteria was that both the temperatures should be positive, and \(T_H\) greater than \(T_C\). As can be seen in the mentioned figure, the efficiency of the heat engine decreases as the string parameter increases, for dimensions four to six. It is not possible, however, to conjecture that this behavior will be valid for all temperatures, given the relation between temperature, dimension and string parameter.

Fig. 7
figure 7

Efficiency of the squared cycle as a function of the string cloud parameter \(\sigma \)

In Fig. 7, we analyze the efficiency of the cycle depicted in Fig. 5, for the following values: \(\tilde{S}_1 = \tilde{S}_4 = 1, \tilde{P}_1 = \tilde{P}_2 = 4, \tilde{S}_2 = \tilde{S}_3 = 3 \) and \(\tilde{P}_3 = \tilde{P}_4 = 1\). All the other parameters are set to be equal unity, and the choice criteria was that \(M_3 > M_4\) and \(M_2 > M_1\). For this cycle, we found that the efficiency of the engine increases as long as we increase the parameter \(\sigma \). It actually appears that it will be greater than unity for \(\sigma \) larger than 0.25, but this value is the limit for all masses to be positive. Once again, it is not possible to conjecture that the efficiency of the heat engine will be increased for all masses and dimensions, due to a increase of the string cloud parameter \(\sigma \), but we can affirm so at least for a range of parameters.

4 Black hole thermodynamics in f(R) gravity

A more detailed account of the thermodynamics of a black hole with a string cloud, in f(R) gravity, has already been studied in [33]. However, this previous study has been performed in the non-extended phase space, i.e., without a mechanical work term, and by this reason neither a proper definition of pressure nor the PV criticality have been studied. We will perform this study in this section.

The extended phase space approach for black hole thermodynamics for a particular example of f(R) gravity has been recently studied in [16, 32], however these papers only considered the case of a constant Ricci scalar, which relates to the cosmological constant. In our case, we study the effects of modified gravity for a coordinate-dependent contribution coming from the f(R)-function. As we will see, non-trivial contributions will emerge from our approach, like the need for a redefinition of the thermodynamic volume (an issue that also occurs in other theories of gravity, as can be seen in [36]), and a the need to combine the string cloud and f(R) parameters, \(\sigma \) and \(\psi _0\) for achieving maximum efficiency of the heat engine.

It has been argued (see Ref. [38] and references therein) that, for f(R) gravity, the entropy of black holes is modified by a factor proportional to the derivative of the f(R) functional form in respect to the Ricci scalar. Thus, we should modify our previous definition of entropy, Eq. (18), to the following definition

$$\begin{aligned} S = \frac{\kappa _B}{4 G \hbar } \varOmega _{d-2} r_+^{r-2} f'(R), \end{aligned}$$
(35)

where \(f'(R) = df(R)/dR\).

The temperature of the black hole has the same definition as in general relativity. Thus, for the metric given by Eqs. (7) and (8), in the leading order, one can find the temperature as

$$\begin{aligned} T= & {} \frac{\hbar }{\kappa _B \varOmega _{d-2}} \frac{1}{l^2 r_+} [(d-3)l^2 + (d-1) r_+^2\nonumber \\&- \frac{16 \pi G \sigma ^2 l^2}{d-2}r_+^{4-d} - 2 \psi _0 l^2 r_+]. \end{aligned}$$
(36)

To proceed, we now argue that the first law is valid, providing us with a method to find the enthalpy of the system as

$$\begin{aligned} dH = T dS|_{p}, \end{aligned}$$
(37)

were the pressure is kept constant. Integrating the above equation one finds that

$$\begin{aligned} H= & {} \frac{1}{4Gl^2} \left[ (d-2)l^2 r_+^{d-3} - 16 \pi G l^2 \sigma ^2 r_+\right. \nonumber \\&+\frac{(d^2 - 6d + 7)}{d-2} l^2 \psi _0 r_+^{d-2} + (d-2) r_+^{d-1}\nonumber \\&\left. + \frac{(d-1)^2}{d} \psi _0 r_+^d\right] . \end{aligned}$$
(38)

The pressure of the system can be defined keeping the volume constant and taking the differential of the above equation, in an analogous way as we did for general relativity. However, unlike general relativity, the definition of the thermodynamic volume will not be so straightforward. The differential of (38) for constant horizon radius is given by

$$\begin{aligned} dH|_{r^+} = - \frac{2}{4Gl^3}\left( (d-2) r^{d-1} + \frac{(d-1)^2}{d} \psi _0 r^d\right) dl, \nonumber \\ \end{aligned}$$
(39)

and it can be seen that or the pressure or the thermodynamic volume (or both) should incorporate the parameter \(\psi _0\).

In previous works on PV criticality in black holes in f(R), it has been argued that the pressure should be redefined in the same way as the entropy, i. e., \(P \propto f'(R)\) (see [16, 32]). However, this was possible only because such works deal with the case where the Ricci scalar is a constant. In such case, the volume can be defined as the usual volume \(V_{d-1} \propto r^{d-1}\), and the pressure can be a function only of the parameter l. This happens because f(R) gravity with a constant Ricci scalar is equivalent to general relativity with a cosmological constant. In a general f(R) theory of gravity, it is not possible to do both choices at the same time, i.e., one must give up to define the thermodynamic volume as the naive volume proportional \(r_+^d\) or to define the pressure as a pure function of the length parameter l. This is not an issue only for f(R) gravity. Even for a Kerr-AdS black hole in general relativity, its thermodynamic volume should be redefined to include its angular momentum (for a deeper discussion, see [36]).

For consistency, the pressure of the system should depend only on the cosmological parameter l, and not on the horizon radius, since the entropy (that depends only on \(r_+\)) and the pressure are supposed to be independent variables. Thus, the thermodynamic volume should be redefined to include the parameter \(\psi _0\). To do so, we maintain the definition of the pressure as

$$\begin{aligned} P = \frac{(d-2)}{4G} \frac{\varGamma ((d+1)/2)}{\pi ^{(d-1)/2}} \frac{1}{l^2}, \end{aligned}$$
(40)

so that, to be able to write Eq. (39) as the mechanical displacement \( V_{d-1} dP\), one must define the thermodynamic volume as

$$\begin{aligned} V_{d-1} = \frac{\pi ^{(d-1)/2}}{\varGamma ((d+1)/2)} r_+^{d-1} \left( 1 + \frac{(d-1)^2}{d(d-2)} \psi _0 r_+ \right) . \end{aligned}$$
(41)

Despite the fact that we are working in one particular f(R) theory of gravity, it is expected that the thermodynamic volume of a generic f(R) gravity will be modified in relation to is naive definition of volume. Due to this reason, it is no longer a straightforward procedure to find the equations P(VT) and T(SP). It is possible, however, to find an equation of state of the form \(P(r_+,T)\), and to use it to study the criticality of the system.

With these informations, we can calculate the equation of state for the pressure \(P(r_+,T)\) with the f(R) correction as

$$\begin{aligned} P^{f(R)}(r_+,T)= & {} P^{\text {GR}}(r_+,T)\nonumber \\&+\frac{(d-2)}{4G}\frac{\psi _0}{r_+}\pi ^{\frac{1-d}{2}}\varGamma \left( \frac{d-1}{2}\right) , \end{aligned}$$
(42)

where \(P^{\text {GR}}\) is the pressure calculated from general relativity (25). From the equation above, one can see that for \(\psi _0>0\), the pressure increases when compared to general relativity, specially for small black holes. This contribution is proportional to \(r_+^{-1}\), which adds up to the temperature term, as can be inferred from Eq. (25). This implies that also in the f(R) case, critical quantities do not exist in four dimensions, since in order to exist solutions to the criticality conditions given by Eq. (26), it is mandatory for the pressure to exhibit terms other than \(r_+^{-1}\) and \(r_+^{-2}\). We draw the behavior of the \(P-r_+\) diagram in four dimensions in Fig. 8; where it can be seen that the f(R) correction is highly suppressed by the general relativity contribution. This behavior is found also for arbitrary dimensions.

Fig. 8
figure 8

\(P-r_+\) diagram in the four-dimensional case for \(\sigma =0.2\)

As in the previous case, the criticality conditions (26) can be solved for \(d>4\), as

$$\begin{aligned} T_c^{f(R)}= & {} T_c^{\text {GR}}-\pi ^{\frac{1-d}{2}}\frac{\hbar }{k_B}\psi _0\, \varGamma \left( \frac{d-1}{2}\right) ,\end{aligned}$$
(43)
$$\begin{aligned} r_c^{f(R)}= & {} r_c^{\text {GR}}, \end{aligned}$$
(44)

where \(T_c^{\text {GR}}\) and \(r_c^{\text {GR}}\) are given by Eqs. (27) and (28), respectively. The critical radius do not depend on \(\psi _0\) and the critical temperature is reduced, although the isotherm \(P(r,T_c)\) of the critical temperature does not depend on \(\psi _0\) and is the same as the one of general relativity, i.e., the thermal boundary between the distinguishability and indistinguishability of black hole phases (small/large) is unaffected by f(R) gravity.

The \(\psi _0\) contribution is suppressed by the other terms in Eq. (42), hence there is no significant difference between the diagrams for f(R) and general relativity (for instance depicted in Fig. 2 for \(d=7\)). Then we ask the reader to refer to the graphs of Sect. 3 for a qualitative outlook of the pressure behavior in the f(R) case too. As we will see, this will not be the case for the analysis of the heat engine.

We also calculate the corrected relation between the critical quantities \((P_c,T_c,R_c)\), as

$$\begin{aligned}&\left( \frac{P_cr_c}{T_c}\right) ^{f(R)}=\left( \frac{P_cr_c}{T_c}\right) ^{\text {GR}}\nonumber \\&\quad +\frac{(d-3)k_B[(8G)^{5-d}\pi \sigma ^{2}]^{\frac{1}{d-4}}}{\hbar (d-4)} \psi _0. \end{aligned}$$
(45)

In this case, there is no a universal relation for any string cloud configuration, since there is an explicit dependence on the parameter \(\sigma \).

4.1 Heat engine

One of the special features of black holes as heat engines is that isochorics are equal to adiabatics. We have shown this important result for general relativity, and now we discuss it in the framework of f(R) gravity. As we do not have an explicit equation of the form T(SP), we can calculate the heat capacity at constant volume as

$$\begin{aligned} C_V = \left( \frac{\partial U}{ \partial T}\right) \Big |_V \end{aligned}$$
(46)

where U is the internal energy of the system, \(U = H - PV\). After some straightforward algebra, it can be shown that

$$\begin{aligned} U = \frac{d-2}{4 G } \left( r_+^{d-3} - \frac{16 \pi G \sigma ^2 r_+}{d-2} + \frac{d^2 - 6d + 7}{(d-2)^2} \psi _0 r^{d-2} \right) ,\nonumber \\ \end{aligned}$$
(47)

which means that the internal energy does not depend of the pressure of the system. This is an expected result, since the internal energy is a function of the entropy and the volume, and both are functions only of the horizon radius. Thus we can conclude that \(C_V\) vanishes, as in general relativity.

To study the heat engine for the Carnot and squared cycles presented in the previous section, it is not necessary to calculate the heat capacity at constant pressure, but we will calculate it for completeness. We cannot do in the same way as we did for general relativity, since we do not have a function of the form T(SP). However, for constant pressure, the heat involved in a process is given by the change of enthalpy of the process, i.e., we have that

$$\begin{aligned} C_P \equiv \frac{\delta Q}{d T}\Big |_P = \left( \frac{dH}{dr_+} \Big / \frac{dT}{dr_+} \right) \Big |_{P(l)}, \end{aligned}$$
(48)

and it is given by

$$\begin{aligned}&C_P^{f(R)} = C_P^{GR} + \psi _0 \frac{\kappa _b \varOmega _{d-2}}{4 G \hbar } \tilde{S}\nonumber \\&\quad \times \frac{(d^2-6d+7) \tilde{S}^{(d-3)/(d-2)} + (d-1)^2 \tilde{P} \tilde{S}^{(d-1)/(d-2)}}{(d-1) \tilde{S}\tilde{P} - (d-3) \tilde{S}^{(d-4)/(d-2)} + 16 \pi G \sigma ^2 (d-3)/(d-2)}\nonumber \\ \end{aligned}$$
(49)

One can now analyze the black hole as a heat engine in f(R) gravity. We will perform the same analysis as in the case of general relativity, and to study how the efficiency of the heat engine is affected by the introduction of the string cloud, for different values of the parameter \(\psi _0\). We will do this only for the squared cycle, since the temperature in f(R) gravity is corrected only by a constant, thus maintaining the discussion at the same level, i.e., the efficiency of the Carnot cycle for f(R) gravity will not be qualitatively different from the one in general relativity.

The study of the efficiency of the squared cycle in f(R) gravity can be performed in several forms. As the theory has many free parameters, we will keep our discussion at four dimensions only, and maintain the same parameters we used in general relativity, namely, \(\tilde{S}_1 = \tilde{S}_4 = 1, \tilde{P}_1 = \tilde{P}_2 = 4, \tilde{S}_2 = \tilde{S}_3 = 3 \) and \(\tilde{P}_3 = \tilde{P}_4 = 1\). With this choice, we are left with only two parameters one can modify, the string cloud parameter \(\sigma \) and the f(R) parameter \(\psi _0\).

Fig. 9
figure 9

Efficiency of the squared cycle as a function of the string cloud parameter \(\sigma \) for f(R) gravity, for several values of the parameter \(\psi _0\)

Fig. 10
figure 10

Efficiency of the squared cycle as a function of the parameter \(\psi _0\), related to f(R) gravity, for several values of the parameter \(\sigma \)

In Fig. 9, we plot the efficiency of the heat engine as a function of the cloud parameter \(\sigma \), for four different values of the parameter \(\psi _0\), namely, \(\psi _0 = 0, 0.1, 0.5\) and 0.8. As one can see, the efficiency of the heat engine always increase, but not in a trivial manner. To reach a maximum efficiency, one has to choose a proper combination of the parameters \(\sigma \) and \(\psi _0\). In Fig. 10 we show this relation in a different manner. This time, we vary the f(R) parameter \(\psi _0\) for four choices of the parameter \(\sigma \), namely, \(\sigma = 0.0, 0.1, 0.2\) and 0.3. As one can see, the efficiency increases as the parameter \(\sigma \) increases, but it can increase or decrease as the parameter \(\psi _0\) increases. Once again this plot shows that, to find a maximum efficiency for the heat engine, one must find a proper combination of the parameters \(\sigma \) and \(\psi _0\). This set of parameters can be found, in principle, minimizing the analytic formula for the efficiency as a function of two parameters, but we are interested here only in the qualitative behavior of the theory, and on how the introduction of an f(R) additional term affects the efficiency.

5 Conclusions

In this paper, we study the thermodynamics on the extended phase space of a black hole surrounded by a string cloud, both in general relativity and in the framework of f(R) gravity. Our focus was to probe the PV criticality of the theory and the efficiency of these black holes as heat engines. For both scenarios, we have been able to find the thermodynamic equation of state related to the gravitational system, and to verify if the system presents a phase transition.

For general relativity, we obtained an explicit formula for the equations of state P(VT) and T(SP), and we were able to explicitly show that the heat capacity at constant volume is null. This means that one can consider isochorics as isobarics, a well-known feature for several others black holes. In the framework of f(R) gravity, we have been unable to find an explicit equation of state of the form T(SP), but we conjecture that \(C_V\) will also vanishes, since the internal energy depends only on the horizon radius, and not on the pressure. For the heat capacity at constant pressure, we have have found an explicit formula for both general relativity and f(R) gravity.

An interesting result we obtained in the context of general relativity is that the relation between the critical pressure, volume and temperature is the same of the Van der Waals fluid, as long as the dimension of the spacetime is six. For others dimensions, we obtained an analytic formula for such relation. It is important to notice that such formula does not involve the string cloud parameter \(\sigma \). This feature does not happens for f(R) gravity, where in the relation there is an explicit dependence on the parameter \(\sigma \).

Another interesting result is that we have found, for f(R) gravity, a non-trivial formula for the thermodynamic volume of the theory, i.e., the conjugate quantity to the pressure. As long as we know, this is the first time a non-trivial thermodynamic volume is found for f(R) gravity. The existence of non-trivial thermodynamic volumes is well-know in the literature, even for stationary black holes in general relativity, such as the Kerr–Newman spacetime. The meaning of such volumes is not clear until this moment.

Finally, we study the black holes as heat engines and analyzed its efficiency, both for general relativity and for f(R) gravity. We considered two cycles, the Carnot cycle and a squared cycle in the PV plane. The reason to use a squared cycle is that one can find an analytic formula for it, and exploit its properties graphically. We found that the efficiency of the Carnot cycle decreases as we introduce the string cloud, but it is not possible to conjecture that this is an universal behavior, since the temperature has a non trivial dependence on a large set of parameters. This argument is more clear when we move to f(R) gravity, since it introduces a new parameter which can be varied. For the squared cycle, we showed that the efficiency increases as we increase the parameter \(\sigma \), but the maximum efficiency appears to depend on a combination of both parameters, the one related to the string cloud and the one related to the gravitational theory. In any case, it is important to note that the introduction of a string cloud background will affect the behavior of the black hole as a heat engine.