1 Introduction

The covariant conservation of the energy momentum tensor is a well known ingradient of Einstein’s theory of gravity. Further, due to Noether’s theorem this conservation of matter leads to conservation of globally defined quantities which are expressed as integrals of the energy–momentum tensor over some space-like hypersurface. Hence in general relativity, the total rest energy (mass) of a system remains conserved, but there is no experimental evidence in favour of this assertion. As a result, there are proposals for modification of general relativity which do not care about this covariant conservation of energy–momentum tensor. Long back in 1972 Rastall [1, 2] proposed such a modified theory of gravity and recently it has been discussed much in the literature. In this theory, the matter source is described by the energy momentum tensor as in general relativity and also by the metric of the external space. So in empty space this modified gravity theory coincides with Einstein gravity and hence it agrees with Mach’s principle [3].

The phenomenological nature of Rastall theory and absence of an action from which Rastall theory can be derived, are the major drawbacks of this modified theory while the rich structure of it can be associated with many fundamental aspects of a gravity theory. In curved space–time due to quantum effects, the classical energy momentum tensor is modified by quantities related to the curvature of the space–time [4]. Also in space–times bounded by horizon due to propagation of quantum fields there is violation of classical conservation law (Chirality of the quantum modes) which is termed as gravitational anomaly [5]. Hence, one may consider Rastall theory as a phenomenological way of determining the effects of quantum fields in curved space–time in a covariant way. Further, although there is no action from which Rastall theory can be derived but it is possible to have an action if an external field is introduced in the Einstein-Hilbert action through some Lagrange multiplier. Moreover, geometrical frameworks like Weyl geometry may lead to similar equations as Rastall theory [6, 7].

The Rastall gravity theory has been extensively used in various cosmological aspects [8,9,10]. Different cosmological scenarios are studied in the present work for this modified gravity theory mostly in the framework of particle creation mechanism. The particle creation process [10,11,12,13,14] and this modified gravity theory have similarity in cosmic evolution as both of them do not respect the conservation of the energy momentum tensor. In fact, in the present work we consider the generalized Rastall gravity with variable Rastall parameter. Emergent scenario is obtained for a particular choice of the Rastall parameter. Then it is found that a complete cosmic scenario is possible starting from inflation to the present late time acceleration by suitable choices of the Rastall parameter. Also Universal thermodynamics in Rastall gravity is briefly presented. The paper is organized as follows: basic equations are presented in Sect. 2, Sect. 3 deals with singular and non singular cosmological solutions. The equivalence of Rastall gravity with particle creation formulation in Einstein Gravity are shown to be equivalent in Sect. 4. Also a continuous cosmic evolution has been presented in this section. Section 5 deals with universal thermodynamics in this modified gravity theory. The paper ends with conclusion in Sect. 6.

2 Basics equation for Rastall gravity

In most of the gravity theories, the source of energy–momentum is described by a divergence free tensor which couples to the geometry in a minimal way. Although the resulting energy–momentum tensor satisfies the conservation law but it is not obeyed by the particle production process. So it is desirable to consider a known divergence free energy–momentum tensor in the modified gravity theory. Rastall theory is an example of such a modification to the gravity theory. In this theory the usual energy–momentum conservation law is not satisfied rather, it satisfies the following relation

$$\begin{aligned} T^{\mu \nu }_{;\mu }=lR_{,\mu }, \end{aligned}$$
(1)

where R and l are respectively the usual Ricci’s scalar and a constant known as Rastall constant. One may interpret the constant parameter l as a measure of the tendency of the geometry to couple with matter fields or vice-versa. Hence the Einstein’s field equation can be written as:

$$\begin{aligned} G_{\mu \nu }+\xi _{0}lg_{\mu \nu }R=\xi _{0}T_{\mu \nu }, \end{aligned}$$
(2)

i.e.,

$$\begin{aligned} G_{\mu \nu }=\xi _{0}S_{\mu \nu }, \end{aligned}$$
(3)

where \(\xi _{0}\) is the gravitational coupling constant to the Rastall theory and \(S_{\mu \nu }\) is termed as effective energy–momentum tensor having expression

$$\begin{aligned} S_{\mu \nu }=T_{\mu \nu }-\frac{\xi _{0}lT}{4\xi _{0}l-1}g_{\mu \nu }. \end{aligned}$$
(4)

Note that here the matter fields and the geometry are non-minimally coupled and it is compatible with some observational data [15, 16]. As the usual particle production process during cosmic evolution does not satisfy the energy–momentum conservation law so, one may consider Rastall theory as classical background formulation of this phenomena.

Taking trace of Eq. (2), we have:

$$\begin{aligned} R\frac{(4\xi _{0}l-1)}{T}=\xi _{0}, \end{aligned}$$
(5)

where T is the trace of the energy–momentum tensor. From the above relation, it is clear that \(\xi _{0}l\ne \frac{1}{4}\) [2, 19]. Subsequently this theory has been modified (known as Generalized Rastall Theory) in which the Rastall parameter l is no longer a constant. So, the divergence of the energy–momentum tensor takes the form

$$\begin{aligned} T^{\mu \nu }_{;\mu }=(\lambda R)^{,\nu }, \end{aligned}$$
(6)

where \(\lambda \) is termed as varying Rastall parameter. As a consequence due to Bianchi Identity \((G^{;\nu }_{\mu \nu }=0)\) the Einstein’s equation now takes the form:

$$\begin{aligned} G_{\mu \nu }+\xi \lambda g_{\mu \nu }=\xi T_{\mu \nu } \end{aligned}$$
(7)

with \(\xi \), a constant.

One may note that although the Einstein’s field equations (2) and (7) apparently look identical but here \(\lambda \) is not a constant, measures the coupling between geometry and matter field. However, the original Einstein’s field equations can be obtained in the limit \(\lambda \rightarrow 0\) (the limit implies the matter field and geometry are couple to each other in a minimal way.) Also in the above modified Einstein’s field equations the Rastall parameter \(\lambda \) can be interpreted as a varying cosmological constant in Einstein Gravity.

In the present work we consider homogeneous and isotropic flat FLRW space time model having line element

$$\begin{aligned} ds^2=-dt^2+a^2(t)\big [dr^2+r^2 \big (d\theta ^2+\sin ^2 \theta d\phi ^2 \big )\big ], \end{aligned}$$
(8)

where a(t) is the usual scale factor and the curvature scalar k is assumed to be 0 for flat model. Also if it is assumed that the matter source in the Universe is a perfect fluid with barotropic equation of state, then the modified Friedmann equations in generalized Rastall theory are given by

$$\begin{aligned}&(12\xi \lambda -3)H^2+6\xi \lambda H=-\xi \rho , \end{aligned}$$
(9)
$$\begin{aligned}&(12\xi \lambda -3)H^2+(6\xi \lambda -2)\dot{H}=\xi p, \end{aligned}$$
(10)

where an over dot indicates derivative with respect to the cosmic time t. Also the explicit form of the energy conservation equation (6) can be written as

$$\begin{aligned} \frac{d}{dt}\left( \frac{\rho +6\lambda \dot{H}}{1-4\lambda \xi }\right) +3H(\rho +p)=0. \end{aligned}$$
(11)

It is to be noted that Eqs. (9)–(11) are not independent, infact Eq. (11) can be obtained from Eqs. (9) and (10). If we now rewrite the above modified Friedmann equations (9) and (10) as the usual Friedmann equations, then we have

$$\begin{aligned} 3H^2=\xi (\rho +\rho _e), \end{aligned}$$
(12)

and

$$\begin{aligned} 2\dot{H}=-\xi (\rho +\rho _{e}+p+p_{e}), \end{aligned}$$
(13)

where \(\rho _{e}=12\lambda H^2+6\lambda \dot{H}\) and \( p_{e}=-(12\lambda H^2+6\lambda \dot{H})\) are the additional energy density and thermodynamic pressure due to generalized Rastall theory. As \( p_{e}=-\rho _{e}\) so the additional matter field in the Rastall theory behave as varying cosmological parameter in Einstein gravity. In other words one may consider that generalized Rastall theory is equivalent to Einstein gravity with a varying cosmological parameter. This supports the claim in [20] even for generalized Rastall gravity.

3 Singular and non-singular universe in Rastall gravity

In this section it will be examined whether it is possible to have a non-singular cosmological solution (i.e., emergent scenario) for the above generalized Rastall theory. From the field equations (9) and (10) one obtains (after some simplifications):

$$\begin{aligned} \frac{2\dot{H}}{3 H^2}=\gamma \frac{(1-4\xi \lambda )}{(3\xi \lambda \gamma -1)}, \end{aligned}$$
(14)

where \(w=\gamma -1\) is the equation of state parameter of the perfect fluid. Now choosing the Rastall parameter \(\lambda \) as

$$\begin{aligned} \lambda =\frac{1+d_0 H}{3\xi \gamma }, \end{aligned}$$
(15)

(\(d_0\), an arbitrary constant), the cosmic evolution is given by

$$\begin{aligned} 2\dot{H}=\frac{(3 \gamma -4)}{d_0} H-4H^2. \end{aligned}$$
(16)

Now, depending on the sign of \(\beta =\frac{(3 \gamma -4)}{d_0}\), the possible solutions are

Case-I: \(\beta >0\), i.e., \(\gamma >\frac{4}{3}\)

$$\begin{aligned}&\left( \frac{a}{a_{0}}\right) ^2=\left[ 1+\frac{4H_0}{\beta }\left\{ e^{\frac{\beta }{2}}(t-t_0)-1 \right\} \right] , \nonumber \\&\frac{H}{H_{0}}=\frac{\frac{\beta }{4}}{\left[ H_0-(H_0-\frac{\beta }{4})e^{-\frac{\beta }{2}(t-t_0)}\right] }. \end{aligned}$$
(17)

or

$$\begin{aligned}&\left( \frac{a}{a_{0}}\right) ^2=1+e^{4H_0(t-t_0)}, \nonumber \\&\frac{H}{H_{0}}=\frac{2}{\left[ 1+e^{-4H_0(t-t_0)}\right] }. \end{aligned}$$
(18)

according as \(H>\frac{\beta }{4}\) or \(H<\frac{\beta }{4}\).

Case-II: \(\beta =0\), i.e., \(\gamma =\frac{4}{3}\)

$$\begin{aligned}&\left( \frac{a}{a_{0}}\right) ^2=1+2H_0(t-t_0), \nonumber \\&\frac{H_0}{H}=1+2H_0(t-t_0). \end{aligned}$$
(19)

Case-III: \(\beta <0\), i.e., \(\gamma <\frac{4}{3}\)

$$\begin{aligned}&\left( \frac{a}{a_{0}}\right) ^2=\left( 1+\frac{4H_0}{\mu ^2}\right) -\frac{4H_0}{\mu ^2}e^{-\frac{\mu ^2}{ 2}(t-t_0)}, \nonumber \\&\frac{H}{H_0}=\frac{\frac{\mu ^2}{ 4}}{\left[ \left( H_0+\frac{\mu ^2}{ 4}\right) e^{\frac{\mu ^2}{ 2}(t-t_0)}-H_0\right] }. \end{aligned}$$
(20)

with \(\mu ^2=-\beta \).

In the above solutions we have \(t_0\) and \(a_0\) are integration constants with \(a=a_0\), \(H=H_0\) at \(t=t_0\). Among the above solutions, the solution (18) represents a non-singular model of the Universe. For this emergent solution we have

$$\begin{aligned}&{\text {(i)}}\; a\rightarrow a_0,~H\rightarrow 0 ~\hbox {as}~ t\rightarrow -\infty \\&{\text {(ii)}}\; a\sim a_0,~H\sim 0 ~\hbox {for}~ t<< t_0 \\&{\text {(iii)}}\; a\sim \exp \{4H_0(t-t_0)\},~H\sim 2H_0 ~\hbox {for}~ t>> t_0. \end{aligned}$$

Thus it is possible to have a scenario of emergent Universe in generalized Rastall theory. The other three solutions represented by Eqs. (17), (19) and (20) represent big-bang model of the Universe. The big-bang singularity occurs at

$$\begin{aligned} t_c=\left\{ \begin{array}{lll} t_0+\frac{2}{\beta }\ln \left| 1-\frac{\beta }{4H_0}\right| &{} \text { for the solution}\; (17) \\ t_0-\frac{1}{2H_0} &{} \text { for the solution}\;(19) \\ t_0-\frac{2}{\beta }\ln \left| \frac{H_0}{H_0-\frac{\beta }{4}}\right| &{} \text { for the solution}\; (20) \\ \end{array} \right\} , \end{aligned}$$

The Universe evolves undoubtedly in an exponential manner after the big-bang for the solution (17) and in a power law form for the solution (19) while there is finite evolution for the solution (20).

4 Particle creation in Rastall theory: continuous cosmic evolution

This section is an attempt to show whether the generalized Rastall theory can be considered as a particle creation formulation in Einstein Gravity and it is examined whether a continuous cosmic evolution is possible with proper choices of the Rastall parameter. From the usual Friedmann equations with particle creation mechanism the cosmic evolution can be described as [17]

$$\begin{aligned} \frac{2\dot{H}}{3 H^2}=\gamma \left( \frac{\Gamma }{3H}-1\right) , \end{aligned}$$
(21)

where, \(\Gamma \) is the particle creation rate of the cosmic fluid particles. Thus, comparing (21) with the evolution equation (14) in generalized Rastall Theory, We have:

$$\begin{aligned} \Gamma =\frac{3 H\xi \lambda (3\gamma -4)}{(3\xi \lambda \gamma -1)}. \end{aligned}$$
(22)

Hence, Generalized Rastall Theory may be considered as a particle creation mechanism in Einstein Gravity and the particle creation rate is determined by the Rastall parameter \(\lambda \) in Eq. (22). Thus generalized Rastall theory may be considered as Einstein gravity with imperfect fluid (i.e., viscous).

Due to the variable nature of the parameter \(\lambda \) in the generalized Rastall theory, it will be examined whether for a continuous choice of \(\lambda \), it is possible to have a complete cosmic evolution from early inflationary era to present late time acceleration. In previous section it is seen that with proper choice of \(\lambda \) (phenomenological) it is possible to have cosmological solution for emergent scenario.

In an earlier work [17, 18] it has been shown that it is possible to choose the particle creation rate from thermodynamical point of view, so that the entire cosmic evolution can be obtained in FLRW model. Inspired by that work in the following there are choices for the parameter \(\lambda \) for which three phases of cosmic evolution namely early inflationary era, intermediate matter dominated era and finally late time acceleration phase can be obtained. Here it should be noted that similar to particle creation mechanism there is no physical ground for these choices for \(\lambda \), they are purely phenomenological in nature.

Let \(t_1\) be the time instant in which Universe evolves from inflationary era to the matter dominated era. Similarly \(t_2>t_1\) be the time at which the Universe makes a transition to the late time acceleration. Let \((a_1, H_1)\) and \((a_2, H_2)\) be the scale factor and Hubble parameter at these time instants.

Early inflationary era: (\(t<t_1\))

The choice for \(\lambda \) and the cosmic solution is the following

$$\begin{aligned} \lambda =\frac{\eta \big (\frac{H}{H_1}\big )}{\xi \big [3\eta \gamma \frac{H}{H_1}-(3\gamma -4) \big ]}, \end{aligned}$$
$$\begin{aligned}&\left( \frac{a}{a_1}\right) ^{\eta } e^{2\frac{(1-\eta )}{3\gamma }\left[ \left( \frac{a}{a_1}\right) ^{\frac{3\gamma }{2}}-1\right] }=e^{H_1(t-t_1)}, \\&\frac{H}{H_1}=\left[ \eta \{Lambert~ W\left( \frac{1-\eta }{\eta }\exp \left\{ \frac{2(1-\eta )+3\gamma H_1(t-t_1)}{2\eta } \right\} \right) +1 \}\right] ^{-1}, \\&\frac{\rho }{\rho _1}=\left[ \eta \{Lambert~ W\left( \frac{1-\eta }{\eta }\exp \left\{ \frac{2(1-\eta )+3\gamma H_1(t-t_1)}{2\eta } \right\} \right) +1 \}\right] ^{-2}, \end{aligned}$$

where \(\eta \) is a constant and the function Lambert W(x) is defined by \(Lambert~W(x) e^{Lambert~W(x)}=x\).

Intermediate matter dominated era: (\(t_1<t<t_2\))

Here we choose \(\lambda =\lambda _0\), a constant, where \(\lambda _0=\frac{\frac{\eta }{\xi }}{3\eta \gamma -(3\gamma -4)}\) and the cosmological solutions for this phase is given by

$$\begin{aligned}&\frac{a}{a_1}=\left[ 1+\frac{3\gamma }{2}(1-\eta )H_1(t-t_1)\right] ^{\frac{2}{3\gamma (1-\eta )}}, \\&\frac{H}{H_1}=\left[ 1+\frac{3\gamma }{2}(1-\eta )H_1(t-t_1)\right] ^{-1}, \\&\frac{\rho }{\rho _1}=\left[ 1+\frac{3\gamma }{2}(1-\eta )H_1(t-t_1)\right] ^{2}, \end{aligned}$$

Late time acceleration: (\(t>t_2\))

If we choose \(\lambda =\frac{\big [\frac{\psi H_2}{\xi }\big ]}{\big [3\gamma \psi H_2-(3\gamma -4)H^2\big ]}\), then the cosmological parameters are given by

$$\begin{aligned}&\left( \frac{a}{a_2}\right) ^{\frac{3\gamma }{2}}=\frac{1}{\sqrt{\psi H_2}}\sinh \left[ \sqrt{\psi H_2}(t-t_0)\right] , \\&H=\sqrt{\psi H_2}\coth \left[ \sqrt{\psi H_2}(t-t_0)\right] , \\&\frac{\rho }{\rho _2}=\frac{\psi }{H_2}\coth ^2\left[ \sqrt{\psi H_2}(t-t_0)\right] , \end{aligned}$$

From the above solutions one can easily verify the continuity of the parameter \(\lambda \) and all the geometrical and physical parameters presented above across \(t=t_1\) while there will be continuity at \(t=t_{2}\), provided the arbitrary parameters involved in the solutions are constrained by the following relations.

$$\begin{aligned}&\lambda :~\psi =\eta H_2 \\&H:~\left( \frac{a_1}{a_2}\right) ^{\frac{3\gamma (1-\eta )}{2}}=\frac{H_2}{H_1},~H_2^2=\psi H_2+1 \\&~\text {i.e.,}~H_2^2(1-\eta )=1. \end{aligned}$$

5 Universal thermodynamics in Rastall theory of gravity

In this section, we consider universal Thermodynamics with Universe as a non–stationary gravitational system. As from cosmological point of view the homogeneous and isotropic FLRW Universe may be considered as dynamical spherically symmetric spacetime so there is only inner trapping horizon which for the present model coincides with the apparent horizon. Using Hayward’s [21,22,23,24,25] thermodynamical analysis for dynamical BH one may consider unified first law to study universal thermodynamics. In this context, Cai and Kim [26] derived the usual Friedmann equations from the Clausius relation \(\delta Q=T ds\) at the apparent horizon of the FLRW Universe, considering Hawking temperature and Bekenstein entropy on the (apparent) horizon as

$$\begin{aligned} T_H=\frac{1}{2 \pi R_A},~~S_B=\frac{\pi R_A^2}{G}, \end{aligned}$$
(23)

with \(R_A\) is the geometric radius of the apparent horizon and \(S_B\) is the usual Bekenstein entropy. Also even in modified gravity theories namely in Gauss–Bonnet gravity and in Lovelock gravity, they were able to show the equivalence between the modified Einstein field equations and the thermodynamical laws. As an extension to these works, Cai et al. [27, 28] studied the unified first law in Einstein gravity as well as in modified gravity theories namely Lovelock gravity, scalar–tensor theory and Brane-World scenario [29, 30, 32]. Elling et al. [43] on the otherhand showed that Clausius relation should be modified by introducing entropy production term in f(R) gravity theory. In the present work we shall modify the horizon entropy suitably so that Clausius relation is automatically satisfied for Rastall gravity theory (Figs. 1, 2).

Fig. 1
figure 1

Shows the evolution of the deceleration parameter against the scale factor a

Fig. 2
figure 2

Continuous evolution of the Rastall parameter \(\lambda \)

The line element for FLRW space time can be written as

$$\begin{aligned} ds^2=h_{ab}dx^a dx^b+R^2 d \Omega _2^2, \end{aligned}$$
(24)

or in double-null form as

$$\begin{aligned} ds^2=-2dl dm+R^2 d \Omega _2^2, \end{aligned}$$
(25)

where,

$$\begin{aligned} \partial _{l, m}=\frac{\partial }{\partial _{l, m}}=-\sqrt{2}\left( \partial _t \pm \frac{\sqrt{1-k r^2}}{a}\partial _a\right) , \end{aligned}$$
(26)

are future pointing null vectors, \(R=ar\) is the geometric radius (or area radius), \(h_{ab}=\hbox {diag}(-1, \frac{a^2}{1-k r^2})\) is the metric on the 2-space (\(x^0=t, x'=r\)) and \(k=0, \pm 1\) stands for the curvature scalar.

According to Hayward, the trapping horizon (denoted as \(R_T\)) is defined as \(\partial _l R|_{R=R_T}=0\) and hence we have

$$\begin{aligned} R_T=\frac{1}{\sqrt{H^2+\frac{k}{a^2}}}=R_A. \end{aligned}$$
(27)

For any horizon having area radius \(R_h\) the surface gravity is defined as

$$\begin{aligned} s_g=\frac{1}{2 \sqrt{-h}}\partial _a \left( \sqrt{-h} h^{ab} \partial _b R\right) |_{R=R_h} \end{aligned}$$
(28)

or explicitly

$$\begin{aligned} s_g=-\left( \frac{R_h}{R_A}\right) ^2\left( \frac{1-\frac{{\dot{R}}_A}{2HR_A}}{R_h}\right) , \end{aligned}$$
(29)

which simplifies for apparent horizon as

$$\begin{aligned} s_A=-\frac{(1-\epsilon )}{R_A}, \end{aligned}$$
(30)

with \(\epsilon =\frac{{\dot{R}}_A}{2HR_A}.\)

Note that , for \(\epsilon < 1\), the surface gravity \(\kappa \) to be negative so that the apparent horizon coincides with the inner trapping horizon (for outer trapping horizon the surface gravity is positive) [41].

Now the Misner–Sharp energy [42]

$$\begin{aligned} E=\frac{R}{2G}\left( 1-h^{ab}\partial _a R \partial _b R\right) , \end{aligned}$$
(31)

measures the total energy inside a sphere of radius R. although it is a purely geometric quantity but it is related to the structure of the space–time as well as to the Einstein’s equations. For FLRW model, Universe bounded by the apparent horizon this energy simplifies to

$$\begin{aligned} E=\frac{R_A}{2G}=\frac{1}{2G\sqrt{H^2+\frac{k}{a^2}}}. \end{aligned}$$
(32)

Further, according to Hayward [25] the unified first law

$$\begin{aligned} dE=A\psi +WdV=A\psi _a dx^a+WdV, \end{aligned}$$
(33)

is equivalent to the (0, 0) component of the (modified) Einstein equations in Rastall gravity. Here \(A=4 \pi R^2, V=\frac{4}{3} \pi R^3\) are respectively the surface area and volume of a sphere of radius R, the energy supply vector \(\psi _a\) and work density W are formally defined as

$$\begin{aligned} \psi _a=T^b_a \partial _b R+W \partial _a R,~W=-\frac{1}{2} T^{ab}h_{ab}. \end{aligned}$$
(34)

For the present Rastall gravity model we have

$$\begin{aligned} W= & {} \frac{1}{2}\left( \rho _t-p_t\right) \nonumber \\= & {} \frac{1}{2}\left( \rho -p\right) +\frac{1}{2}\left( \rho _e-p_e\right) =W_m+W_e, \end{aligned}$$
(35)

and \(\psi =\psi _m+\psi _e\), with

$$\begin{aligned} \psi _m=-\frac{1}{2}\left( \rho +p\right) HR dt+\frac{1}{2}\left( \rho +p\right) a dr, \end{aligned}$$
(36)

and

$$\begin{aligned} \psi _e=-\frac{1}{2}\left( \rho _e+p_e\right) HR dt+\frac{1}{2}\left( \rho _e+p_e\right) a dr. \end{aligned}$$
(37)

Now using the double null vectors \(\partial _{l, m}\) as the basis vectors in the 2-space, the vector U tangential to the apparent horizon surface can be written as

$$\begin{aligned} U=U_l \partial _l+U_m \partial _m. \end{aligned}$$
(38)

As by definition trapping horizon is identified as

$$\begin{aligned} \partial _l R_T=0, \end{aligned}$$

so on the marginal sphere

$$\begin{aligned} U(\partial _l R_T)=0 \end{aligned}$$

i.e,

$$\begin{aligned}U_l(\partial _l \partial _l R_T)+U_m(\partial _m \partial _l R_T)=0, \end{aligned}$$

or

$$\begin{aligned} \frac{U_l}{U_m}=-\frac{\partial _m \partial _l R_T}{\partial _l \partial _l R_T}. \end{aligned}$$
(39)

Considering \(R_T=R_A\) for the present model

$$\begin{aligned} \frac{U_l}{U_m}=\frac{(1-\epsilon )}{\epsilon }. \end{aligned}$$
(40)

Hence in (rt) co-ordinate U can be written as

$$\begin{aligned} U=\frac{\partial }{\partial t}-(1-2\epsilon )Hr \frac{\partial }{\partial r}. \end{aligned}$$
(41)

Now, the actual first law of thermodynamics on the apparent horizon can be obtained [41] from the above unified first law by projecting along the above tangent vector U, i.e.,

$$\begin{aligned} \big<dE, U\big>=\frac{s_g}{8 \pi G}\big<dA, U\big>+\big <W dV, U\big >. \end{aligned}$$
(42)

As the projection of the pure matter energy supply \(A\psi _m\) along the apparent horizon gives the heat flow \(\delta Q\) in the Clausius relation \(\delta Q=T dS\), so from the above Eq. (42) we obtain [32,33,34,35,36,37,38,39,40]

$$\begin{aligned} \delta Q=\big<A\psi _m, U\big>=\frac{s_g}{8 \pi G}\big<dA, U\big>-\big <A\psi _e, U\big >. \end{aligned}$$
(43)

For the Rastall gravity, as the effective matter behaves as cosmological parameter so \(\rho _e+p_e=0\) i.e., \(\psi _e=0\), hence we have

$$\begin{aligned} \delta Q=\frac{s_g}{8 \pi G}\big <dA, U\big >. \end{aligned}$$
(44)

Using Hawking temperature on the apparent horizon as

$$\begin{aligned} T_A=\frac{|s_A|}{2 \pi }=\frac{1-\epsilon }{2\pi R_A}, \end{aligned}$$
(45)

we have

$$\begin{aligned} \delta Q=\big <A \psi _m, U\big >=T_A \frac{d(A_A)}{4G}. \end{aligned}$$

Thus Clausius relation gives

$$\begin{aligned}S_A=\frac{A_A}{4G},\end{aligned}$$

which is nothing but the Bekenstein entropy. Hence for Rastall gravity there is no correction term in the Bekenstein entropy on the apparent horizon. Finally, it should be noted that due to \(\psi _{e}=0\) there will no longer be any correction term for the entropy at other horizon also.

6 Conclusion

An explicit cosmological investigation for generalized Rastall gravity is presented in this work. At first it is examined whether any non-singular model of the universe is possible for this gravity theory and it is found that for suitable choice of the Rastall parameter with restriction on the equation of state parameter a model of emergent scenario can be formulated. For homogeneous and isotropic FLRW model this gravity model is shown to be equivalent to Einstein gravity with particle creation mechanism. Interestingly, it is possible to have a complete cosmic scenario from early inflationary era to the present accelerating phase through the matter dominated era of evolution for this model of gravity with a continuous choice of Rastall parameter. Finally universal thermodynamics is formulated with the present gravity theory and there is no modification (or correction) to the Bakenstein entropy not only at the apparent horizon but also at any other horizon.

It is well known that for the last few months a debate has been going on the Rastall gravity theory whether it is modified gravity theory or it is essentially an Einstein gravity with some specific choices for the matter content. As a result a lot of curiosity has been developed to study this model and it motivates the authors for the present work. The results of the present study in comparison with Einstein gravity can be stated point wise as follows:

  • The generalized Rastall gravity is equivalent to Einstein gravity with non-interacting variable cosmological parameter.

  • The generalized Rastall gravity is equivalent to Einstein gravity with particle creation mechanism and the particle creation parameter is related to the variable Rastall parameter.

  • Both generalized Rastall gravity and Einstein gravity with particle creation mechanism [17] exhibit continuous cosmic evolution from inflationary era to the present epoch.

  • A phase of emergent scenario is possible for generalized Rastall gravity as well as for particle creation mechanism in Einstein gravity [31].

  • In the contest of universal thermodynamics both the gravity theories have same thermodynamical parameters namely Bekenstein entropy and Hawking temperature on the horizon.

Therefore, one may conclude that generalized Rastall gravity is equivalent to Einstein gravity in non-equilibrium thermodynamical presentation at least for homogeneous and isotropic FLRW model.