1 Introduction

Dark energy (DE) that could be one of the reasons behind the accelerating expansion of the Universe, is the mysterious force that exerts a negative or repulsive pressure. It can be considered as a fundamental ingredient in the study of expanding Universe. Moreover, 68% of the Universe is made up of dark energy and rest of it with dark matter (DM) and 5% of baryonic matter. Survey of DE has been extensively explained in [1,2,3]. Due to new outcomes observed in the field of high-energy physics and cosmology, the modification in the theory of gravity has gained significant attention. The observational proofs of the expansion of the Universe motivate us to modify the theories of gravity. In the field equations, Einstein’s constant can describe the acceleration in the Universe [4], but the dynamical effects [5] enforce the modifications in the action integral. Thus, various modifications have been made in Einstein’s general relativity by introducing different functions in the Lagrangian.

The simplest theory of gravity is f(R), in which f(R) is used in place of R [6]. Faulkner et al [7] calculated the f(R) gravity with scalar tensor theories. It is known that weak-field solar system constraints [8, 9] are not satisfied by most of the f(R) models. Model of a stable neutron star was discussed by Astashenok et al [10]. They also discussed the viability of neutron star [11] theory in f(R) gravity. Olmo and Garcia [12] studied the existence as well as the formation of stellar structures, such as black holes in f(R) gravity. Recently, Malik et al [13] explained the energy bounds in \(f(R,\phi )\) gravity. Yousaf [14] defined the complexity factor in the Palatini f(R) theory in his recent work.

This simplest generalisation is replaced with f(RT) to include the matter contents, where the trace of the stress-energy tensor is denoted by T. It was proposed in 2011 by Harko and collaborators. New degree of freedom in the Lagrangian is the indication of this modification and such Lagrangians are much remarkable to analyse the DM and DE complications. This theory yields testable and interesting results by applying it to cosmology and astrophysics and acceleratory phase of the Universe is described by eliminating the cosmological constant (for more information about modified theories, see [15,16,17,18,19,20,21,22,23,24,25,26,27]. Bianchi-1 and Bianchi-3 Universe models have also been studied in f(RT) gravity [28, 29].

Another extension of the Einstein’s Universe is the \(f\mathcal {(G)}\) theory of gravity, where \({\mathcal {G}} = R^{\alpha \beta \mu \nu }R_{\alpha \beta \mu \nu } - 4R^{\alpha \beta }R_{\alpha \beta } + R^{2}\) is the Gauss–Bonnet (GB) invariant. It plays a vital role in analysing the expanding Universe and formulated in the absence of scalar field coupling by the addition of \(f\mathcal {(G)}\) (a generic function) in the Lagrangian. This theory describes the transition of the Universe from deceleration to acceleration and regarded as the alternate of DE. The important advantage of \(f\mathcal {(G)}\) gravity compared to the other modified theories is that, the usable \(f\mathcal {(G)}\) models remain consistent with solar system limitations. Also in this theory, the highest degree of derivative in the modified field equations is two. The GB gravity was proposed by Nojiri and Odintsov [30], which represents the main attributes of the Universe [31, 32]. This modification is connected to the string-inspired dilation (SID) theory [33]. The viable model of \(f\mathcal {(G)}\), which remains consistent with solar system constraints, was discovered by Felice and Tsujikawa [34, 35]. Nojiri et al [36] explained how different theories can be considered to describe our Universe. Moreover, Olmo et al [37] explained the models of stellar structure by using different modified theories. Bhatti et al [38] have done the dynamical analysis of stars in GB gravity.

The phenomena of evolution of new heavenly bodies like stars, galaxies and clusters are due to the gravitational collapse of burning stars. Pressure anisotropy is another significant factor for analysing the distribution of matter in compact self-gravitating objects under different circumstances. Irregularity in the fluid plays a vital role in gravitational collapse. Collapsing phenomena in the fluid, appearing in a highly inhomogeneous initial state, can be described in terms of distribution of the inhomogeneity.

For the compact self-gravitating fluid, the role of energy–density inhomogeneity has been extensively discussed in the literature. The Tolman–Bondi model was examined by Dwivedi and Joshi [39] for observing the naked singularities for inhomogeneous gravitational collapse. Transport equation for the collapsing fluid was discovered by Triginer and Pavón [40]. Gravitational collapse of spherically symmetric self-gravitating compact fluid with the Weyl tensor was discussed by Herrera et al [41]. Its importance in dust collapse was observed by Mena and Tavakol [42]. Yousaf et al [43] discussed the causes of irregular energy–density. Formation of inhomogeneity factors under f(R) theory was discussed by Yousaf et al [44]. Bamba et al [45] discussed the energy conditions in \(f\mathcal {(G)}\) gravity. Bhatti et al [46] studied the effect of \(f\mathcal {(G)}\) on the complexity of self-gravitating relativistic fluids. Bhatti and Yousaf [47] explored the causes of instability and stability of a self-gravitating anisotropic fluid. Sharif and Yousaf [48, 49] studied the dynamical instability of stars under an electromagnetic field in modified gravity. Moreover, Yousaf [50] discussed the stability of energy–density for a charged dissipative system. Yousaf et al [51] proposed that curvature terms affect the dynamics of the evolving charged fluid in f(RT) gravity.

Einstein–Hilbert action can be made more general by incorporating higher-order curvature elements that logically follow from the diffeomorphism characteristic of the action. One of the candidates in the higher curvature gravitation theory is the Gauss–Bonnet, or more generally the Lanczos–Lovelock gravity. As the star continues to collapse, the curvature inside a star gradually increases and at the final stage of the collapse, it becomes very large. The greater curvature terms are therefore anticipated to be significant for a collapsing geometry. This concept served as the inspiration for the recent discussions about collapsing scenarios in the context of F(R) gravity [52,53,54]. Further, researchers extend the idea of collapse in the regime of GB theory. The benefit of GB gravity is the absence of higher derivative terms (greater than two) of the metric in the equations, resulting in ghost-free solutions. Moreover, \(f({\mathcal {G}})\) theory could be viewed as an intriguing gravitational model for the systematic description of relativistic fluid and DE. These theories are suitable for understanding a variety of phenomena, including inflation, dynamics of the cosmos and accelerated nature of the cosmos.

Kanti et al [55] investigated the wormhole solutions in the context of the dilatonic Einstein-\(f({\mathcal {G}})\) gravity, without introducing any exotic matter, demonstrating that observations are entirely dependant on the higher curvature \(f({\mathcal {G}})\) components. They explored the solutions and stability of the wormhole in the regime of dark source terms. They also discussed the stability of the corresponding solutions. The early evolution of the cosmos was the focus of Kanti et al [56] and they demonstrated that the Ricci scalar (R) is sub-dominant to the GB term and so may be ignored. They noticed that the scalar field reduced exponentially during inflation, and that the GB terms themselves supply the required potential for the particular scalar field. The idea of bounce cosmology offers a fascinating substitute for the usual inflationary model. These theories are very tempting because they do not suffer from the most serious flaw of inflationary paradigm – the initial singularity problem. Oikonomou [57] observed how \(f({\mathcal {G}})\) gravity behaved at the region of bouncing, particularly at a specific bounce that included a type-IV singularity. Kanti et al [58] discussed the dynamics of the early cosmos and looked for cosmic solutions. They showed that the coupled system of the scalar field and \(f({\mathcal {G}})\) terms, rather than the presence of R, dominates and controls the cosmic evolution in the initial stages when the curvature is strong. It could be possible to analyse the early cosmos thoroughly using all their calculated solutions.

In this paper, we continue the work of Herrera [59] and study the energy–density inhomogeneity and how different factors affect the inhomogeneity in the modified GB gravity.

The paper is designed as follows. The modified field equations and kinematical variables are explained in §2. The Misner mass function and variation in mass function due to different quantities are given in §3. Sections 4 and 5 consist of Bianchi identities and two differential equations for Weyl tensor from which we get help to study the inhomogeneity in the fluid. The non-zero components of Weyl curvature tensor and its combination with field equations and mass functions are described in the same section. It also contains the transport equation which is obtained from the casual dissipative theory of Müller–Israel–Stewart. Section 6 is dedicated to the study of different causes of energy–density inhomogeneity by taking different aspects of fluids in the modified GB theory. Finally, in the end we talk about the results of our work.

2 Spherically symmetric fluid distribution with \(f({\mathcal {G}})\) formalism

We have considered the distribution of the collapsing fluid in a spherically symmetric space–time,  bounded by a surface \(\Sigma \) which is spherical. The considered locally anisotropic fluid goes through dissipation in the shape of null radiation and flow of heat. The line element of the co-moving coordinates inside \(\Sigma \) is given by

$$\begin{aligned} \textrm{d}s^2=-X^2\textrm{d}t^{2}+Y^2\textrm{d}r^{2}+C^2(\textrm{d}\theta ^2+\sin ^2\theta \textrm{d}\phi ^2), \end{aligned}$$
(1)

where XYZ are assumed to be positive and functions of r and t. The coordinates are numbered as  \(x^{1}~=t\),  \(x^{2}~=r\),  \(x^{3}~=\theta \),  \(x^{4}~=\phi \).

The modified field equations for \(f({\mathcal {G}})\) theory can be written as [30]

$$\begin{aligned} \frac{G_{\alpha \beta }}{8\pi } =T^{\mathrm {(tot)}}_{\alpha \beta } =T^{({\mathcal {G}})}_{\alpha \beta } +T^{(m)}_{\alpha \beta }, \end{aligned}$$
(2)

where the superscript \(({\mathcal {G}})\) and (m) indicate the \(f({\mathcal {G}})\) and matter parts of \(T^{(\textrm{tot})}_{\alpha \beta }\), respectively. \(T^{\mathcal {(G)}}_{\alpha \beta }\) is the modified contribution in eq. (2), which is written as

$$\begin{aligned} \kappa T^{({\mathcal {G}})}_{\alpha \beta }&=[\big ({4R_{\alpha \mu \beta \nu }} R^{\mu \nu } +4R_{\alpha \mu }R^{\mu }_{\beta } -2RR_{\alpha \beta }\nonumber \\&\quad -2R_{\alpha \mu \eta \nu }R^{\mu \eta \nu }_{\beta }\big )f_{\mathcal {G}} +{\big (4R_{\alpha \beta } -2Rg_{\alpha \beta }\big )}\nabla ^{2}f_{{\mathcal {G}}}\nonumber \\&\quad +\frac{1}{2}g_{\alpha \beta }f{({\mathcal {G}})} -4R^{\mu }_{\alpha }\nabla _{\beta }\nabla _{\mu }f_{{\mathcal {G}}} +2R\nabla _{\alpha }\nabla _{\beta }f_{{\mathcal {G}}} \nonumber \\&\quad + 4g_{\alpha \beta }R^{\mu \nu }\nabla _{\mu }\nabla _{\nu }f_{{\mathcal {G}}} \nonumber \\&\quad -4R^{\mu }_{\beta }\nabla _{\alpha }\nabla _{\mu }f_{{\mathcal {G}}} -4R_{\alpha \mu \beta \eta }\nabla ^{\mu }\nabla ^{\eta }f_{{\mathcal {G}}}], \end{aligned}$$
(3)

where \(\nabla ^{2}~=~\nabla _{\eta }\nabla ^{\eta }\) is the d’Alembert operator,  \(f_{{\mathcal {G}}}~=~\frac{\textrm{d}f{({\mathcal {G}})}}{\textrm{d}{\mathcal {G}}}\), \(\nabla ^{\eta }\) shows contravariant and \(\nabla _{\eta }\) represents the covariant derivatives. \(T^{(m)}_{\alpha \beta }\) inside the spherical surface \(\Sigma \) is described as

$$\begin{aligned} T^{(m)}_{\alpha \beta }&=\,(P_{\bot }+\mu )V_\beta V_\alpha +g_{\alpha \beta }P_{\bot }+ (-P_\bot + P_r)\chi _\beta \chi _\alpha \nonumber \\ {}&\quad +q_\beta V_\alpha + V_\beta q_\alpha +l_\beta l_\alpha {\epsilon }, \end{aligned}$$
(4)

where \(q^{\alpha }\) is the heat flux which indicates the dissipation in the diffusion approximation, \(\mu \) is the energy density, \(\epsilon \), the energy density of the null fluid indicates the dissipation in the free streaming approximation, \(P_{\bot }\) is the tangential pressure and \(P_{r}\) is the radial pressure. All the above quantities are functions of r and t.

We have assumed co-moving coordinates,

$$\begin{aligned} l^{\eta }&=X^{-1}\delta ^{\eta }_{1} + Y^{-1}\delta ^{\eta }_{2},~~\chi ^{\eta } =Y^{-1}\delta ^{\eta }_{2},~~\nonumber \\ q^{\eta }&=qY^{-1}\delta ^{\eta }_{2},~~V^{\eta } =X^{-1}\delta ^{\eta }_{1}, \end{aligned}$$
(5)

with q satisfying \(q^{\eta }= q\chi ^{\eta }\).

$$\begin{aligned} \chi ^{\eta }\chi _{\eta }=1,~q_{\eta }V^{\eta }=0,~V^{\eta }V_{\eta }=-1, \end{aligned}$$
(6)
$$\begin{aligned} l^{\eta }l_{\eta }=0,~V_{\eta }l^{\eta }=-1,~V_{\eta }\chi ^{\eta }=0. \end{aligned}$$
(7)

In eqs (6) and (7),  \(\chi ^{\eta }\) is in radial direction and denotes the unit four vector,  \(V^{\eta }\) is the four-velocity of the collapsing fluid and \(l^{\eta }\) is a null radial four vector. The expansion \(\Theta \) and the four-acceleration \(a_{\eta }\) of the collapsing fluid are written as

$$\begin{aligned} \Theta =V^{\eta }_{~;\eta },\quad a_{\eta } =V^{\beta } V_{\eta ; \beta } \end{aligned}$$
(8)

and shear tensor (\(\sigma _{\eta \beta }\)) is given by

$$\begin{aligned} \sigma _{\eta \beta } = a_{(\eta V_\beta )}- \frac{1}{3}\Theta h_{\eta \beta } +V_{(\eta ; \beta )}, \end{aligned}$$
(9)

where \(h_{\eta \beta } =V_{\beta }V_{\eta } +g_{\eta \beta }\). The shear viscosity and/or bulk viscosity are not added explicitly here, because  \(P_{r}\) and  \(P_{\bot }\) absorbed them. From eqs (5) and (8) we have scalar a and a non-zero component of four-acceleration,

$$\begin{aligned} a^{2} =a_{\eta }a^{\eta }= \bigg (\frac{X'}{YX}\bigg )^2,~a_{2} =\frac{X'}{X}, \end{aligned}$$
(10)

where \(a^{\eta }=a\chi ^{\eta }\) and

$$\begin{aligned} \Theta =\bigg (\frac{\dot{Y}}{2Y} +\frac{\dot{C}}{C}\bigg )\frac{2}{X}. \end{aligned}$$
(11)

Here dot and prime stand for the t differentiation and r differentiation, respectively. The non-zero components for the shear by using eqs (5) and (9) are

$$\begin{aligned} \sigma _{22} =\frac{2}{3}\sigma Y^{2},~\sigma _{33} =\frac{\sigma _{44}}{\sin ^{2}\theta } = -\frac{1}{3}\sigma C^{2}, \end{aligned}$$
(12)

where

$$\begin{aligned} \sigma =\bigg (\frac{\dot{Y}}{Y} -\frac{\dot{C}}{C}\bigg )\frac{1}{X} \end{aligned}$$
(13)

and shear scalar is given by

$$\begin{aligned} \sigma _{\eta \beta }\sigma ^{\eta \beta }=\frac{2}{3}\sigma ^{2}. \end{aligned}$$
(14)

The non-zero components of eq. (2) using eqs (1)–(5) are

$$\begin{aligned} 8\pi T^{(\textrm{tot})}_{11}&=8\pi \bigg [({\epsilon +\mu }) -\frac{f}{2} +T^{\textrm{eff}}_{11}\bigg ]\nonumber \\&=\frac{1}{Y^{2}}\bigg (-{\bigg (\frac{C'}{C}\bigg )^{2}} -\frac{2C''}{C} +{\bigg (\frac{Y}{C}\bigg )^{2}}\nonumber \\&\quad +\frac{2Y'C'}{YC}\bigg )+\frac{\dot{C}}{C}\bigg (\frac{\dot{C}}{C} +\frac{2\dot{Y}}{Y}\bigg )\frac{1}{X^{2}}, \end{aligned}$$
(15)

where

$$\begin{aligned} T^{\textrm{eff}}_{11} =\frac{\chi _{2}}{X^{2}} +\frac{\chi _{3}}{X^{2}} +\frac{\chi _{4}}{X^{2}}, \end{aligned}$$
$$\begin{aligned} 8\pi T^{(\textrm{tot})}_{22}&=8\pi \bigg [{(\epsilon +P_{r})} +\frac{f}{2} +T^{\textrm{eff}}_{22}\bigg ] \nonumber \\&=\bigg [\frac{C'}{C}\bigg ({\frac{C'}{Y^{2}C} +\frac{2X'}{XY^{2}}}\bigg ) -\frac{1}{C^{2}}\nonumber \\&\quad -\frac{1}{X^{3}}\bigg (\frac{2X{\ddot{C}}}{C} +\bigg (\frac{\dot{C}}{C} -\frac{2\dot{X}}{X}\bigg )\frac{X\dot{C}}{C}\bigg )\bigg ], \end{aligned}$$
(16)

where

$$\begin{aligned} T^{\textrm{eff}}_{22} =\frac{Z_{2}}{Y^{2}} +\frac{Z_{3}}{Y^{2}} +\frac{Z_{4}}{Y^{2}}, \end{aligned}$$
$$\begin{aligned} 8\pi T^{(\textrm{tot})}_{12}&=8\pi [ -{(\epsilon +q)} +T^{\textrm{eff}}_{12}]\nonumber \\&=\frac{2}{X^{2}Y^{2}}\bigg ({\frac{\dot{C}Y{X'}}{CX}} -\frac{XY\dot{C'}}{C}+\frac{\dot{Y}X{C'}}{YC} \bigg ), \end{aligned}$$
(17)

where

$$\begin{aligned} T^{\textrm{eff}}_{12} =\frac{D_{3}}{XY}, \end{aligned}$$
$$\begin{aligned}&8\pi T^{(\textrm{tot})}_{33} =\frac{8\pi }{\sin ^{2}\theta }T^{(\textrm{tot})}_{44} =8\pi \bigg [{P_\bot +\frac{f}{2} +T^{\textrm{eff}}_{33}}\bigg ] \nonumber \\&\quad =\bigg [\frac{C''}{Y^{2}C} +\frac{1}{Y^{2}}\bigg (\frac{X'}{X} -\frac{Y'}{Y}\bigg )\frac{C'}{C} +\frac{X''}{Y^{2}X}-\frac{X'Y'}{Y^{3}X}\bigg ]\nonumber \\&\qquad -\bigg [\frac{{\ddot{C}}}{X^{2}C} +\frac{{\ddot{Y}}}{X^{2}Y} +\frac{\dot{Y}\dot{C}}{X^{2}YC} -\frac{\dot{X}}{X}\bigg (\frac{\dot{C}}{C} +\frac{\dot{Y}}{Y}\bigg )\frac{1}{X^{2}}\bigg ]. \end{aligned}$$
(18)

Here

$$\begin{aligned} T^{\textrm{eff}}_{33} = \frac{F_{2}}{C^{2}} +\frac{F_{3}}{C^{2}} +\frac{F_{4}}{C^{2}}, \end{aligned}$$

and the formulated values of  \(T^{\textrm{eff}}_{\alpha \beta }\) can be seen in Appendix.

3 Variation in mass function

The mass function m(t,  r) is stated as [60]

$$\begin{aligned} m =R^{232}_{3}\frac{C}{2} =\frac{1}{2}\bigg [1 -\bigg (\frac{C'}{Y}\bigg )^{2}+\bigg (\frac{\dot{C}}{X}\bigg )^{2}\bigg ]C. \end{aligned}$$
(19)

The radial derivative is written as

$$\begin{aligned} D_{C} =\frac{1}{C'}\frac{\partial }{\partial {r}}, \end{aligned}$$
(20)

where C is the areal radius and \(D_{T}\) denotes the proper time given by

$$\begin{aligned} D_{T} =\frac{1}{X}\frac{\partial }{\partial {t}}. \end{aligned}$$
(21)

Equation (22) expresses the velocity of the fluid obtained with eq. (21) as

$$\begin{aligned} U =D_{T}C. \end{aligned}$$
(22)

Then eq. (19) is redefined as

$$\begin{aligned} E\equiv \frac{C'}{Y} =\bigg (U^{2} +1 -\frac{2m}{C} \bigg )^\frac{1}{2}. \end{aligned}$$
(23)

The variation in Misner and Sharp mass is specified as follows, by using eqs (15)–(17) with eqs (20) and (21)

$$\begin{aligned} D_{T}m&=-4\pi \bigg [U\bigg (\tilde{P_{r}} +\frac{f}{2} +T^{\textrm{eff}}_{22}\bigg ) \nonumber \\&\quad -E(T^{\textrm{eff}}_{12} -{\tilde{q}})\bigg ]C^{2}, \end{aligned}$$
(24)
$$\begin{aligned} D_{C}m&=4\pi \bigg [\bigg ({\tilde{\mu }} -\frac{f}{2} +T^{\textrm{eff}}_{11}\bigg ) -\frac{U}{E}(T^{\textrm{eff}}_{12} -{\tilde{q}})\bigg ]C^{2}, \nonumber \\ \end{aligned}$$
(25)

where  \({\tilde{\mu }} =\mu +\epsilon ,~\tilde{P_{r}} =P_{r} +\epsilon ,~{\tilde{q}} =q +\epsilon \). Integrating eq. (25) gives

$$\begin{aligned} m&=4\pi \int ^{r}_{0}\bigg [\bigg ({\tilde{\mu }} -\frac{f}{2} +T^{\textrm{eff}}_{11}\bigg )\nonumber \\&\quad -\frac{U}{E}(T^{\textrm{eff}}_{12} -{\tilde{q}})\bigg ]C^{2}C'\textrm{d}r, \end{aligned}$$
(26)

with \(m(0)=0\), by considering the distribution to be regular at the centre. Now integrating eq. (26) we obtain

$$\begin{aligned} \frac{3m}{C^{3}} -4\pi {\tilde{\mu }}&=-\frac{4\pi }{C^{3}} \int ^{r}_{0}C^{3}\bigg [\bigg (D_{C}{\tilde{\mu }} +\frac{3f}{2C} -\frac{3T^{\textrm{eff}}_{11}}{C}\bigg )\nonumber \\&\quad +\frac{3U}{EC}(T^{\textrm{eff}}_{12}-{\tilde{q}})\bigg ]C'\textrm{d}r. \end{aligned}$$
(27)

4 Modified Bianchi identities and Ellis equations

Our work highly depends on two equations relating the Weyl curvature tensor to physical quantities. The pioneer of these equations is Ellis [61]. Before this, we obtain the expressions of two independent components [62] for Bianchi identities:

$$\begin{aligned}&\tilde{{\dot{\mu }}} +2 \big ({\tilde{\mu }} +P_{\bot } \big )\frac{\dot{C}}{C} + \big ({\tilde{\mu }} +\tilde{P_{r}} \big )\frac{\dot{Y}}{Y} +2{\tilde{q}}\frac{(XC)'}{YC} +\tilde{q'}\frac{X}{Y}\nonumber \\&\quad +\frac{f}{2},1 +\frac{f}{2},2 +Z_0 =0,\end{aligned}$$
(28)
$$\begin{aligned}&\tilde{\dot{q}} +2{\tilde{q}}\bigg (\frac{\dot{C}}{C} +\frac{\dot{Y}}{Y}\bigg ) +\tilde{P_{r}}'\frac{X}{Y} +2\Pi \frac{XC'}{YC} + \big ({\tilde{\mu }} +\tilde{P_{r}} \big )\frac{X'}{Y}\nonumber \\&\quad +\frac{f}{2},1 +\frac{f}{2},2 +Z_1 =0, \end{aligned}$$
(29)

where \(\Pi =-P_{\bot } +\tilde{P_{r}}\). The formulated values of \(Z_{0}\) and \(Z_{1}\) can be seen in Appendix.

The following equation represents the expression for Weyl tensor as

$$\begin{aligned} C^{\eta }_{\mu \nu \rho }&=R^{\eta }_{\mu \nu \rho } -\frac{1}{2}R^{\eta }_{\nu }g_{\mu \rho } +\frac{1}{2}R_{\mu \nu }\delta ^{\eta }_{\rho } -\frac{1}{2}R_{\mu \rho }\delta ^{\eta }_{\nu }\nonumber \\&\quad +\frac{1}{2}R^{\eta }_{\rho }g_{\mu \nu } +\frac{1}{6}R\big (g_{\mu \rho }\delta ^{\eta }_{\nu } -g_{\mu \nu }\delta ^{\eta }_{\rho }\big ). \end{aligned}$$
(30)

Equations (31) and (32) represent the electric part and its non-zero components, respectively

$$\begin{aligned} E_{\mu \nu } =C_{\mu \alpha \nu \beta }V^{\alpha }V^{\beta } \end{aligned}$$
(31)

and

$$\begin{aligned} E_{22} =\frac{2}{3}{\mathcal {E}} Y^{2},\quad E_{33} =-\frac{1}{3}{\mathcal {E}} C^{2},\quad E_{44} =E_{33}\sin ^{2}\theta , \end{aligned}$$
(32)

where

$$\begin{aligned} {\mathcal {E}}&=\frac{1}{2Y^{3}}\bigg [\frac{C'Y}{C}\bigg (\frac{C'}{C} +\frac{Y'}{Y}\bigg ) -\frac{YC''}{C}\bigg ]-\frac{1}{2C^{2}} \nonumber \\&\quad +\frac{C}{2}\bigg [\frac{{\ddot{C}}}{C^{2}} -\frac{{\ddot{Y}}}{CY} -\frac{\dot{C}}{C^{2}}\bigg (\frac{\dot{C}}{C} -\frac{\dot{Y}}{Y}\bigg )\bigg ] . \end{aligned}$$
(33)

Equation (31) can be expressed as

$$\begin{aligned} E_{\mu \nu } ={\mathcal {E}} \bigg (\chi _{\mu }\chi _{\nu } -\frac{1}{3}h_{\mu \nu } \bigg ). \end{aligned}$$
(34)

Equation (35) is obtained by using eqs (15), (16), (18) with eqs (19) and (33) as

$$\begin{aligned} {\mathcal {E}}&+\frac{3m}{C^{3}} =4\pi \bigg [- \big (\Pi -{\tilde{\mu }} \big ) -\frac{f}{2} \nonumber \\ {}&+T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg ]. \end{aligned}$$
(35)

Eventually, the two differential equations are written as

$$\begin{aligned}&\bigg [{\mathcal {E}} -4\pi \bigg (({\tilde{\mu }} -\Pi ) -\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )\bigg ]^.\nonumber \\&=\frac{3\dot{C}}{C} \big [4\pi \ \big ({\tilde{\mu }} +P_{\bot } +T^{\textrm{eff}}_{11}\nonumber \\&\quad +T^{\textrm{eff}}_{33} \big ) -{\mathcal {E}} \big ] +12\pi \big ({\tilde{q}} -T^{\textrm{eff}}_{12} \big )\frac{XC'}{YC},\end{aligned}$$
(36)
$$\begin{aligned}&\bigg [{\mathcal {E}} -4\pi \bigg (({\tilde{\mu }} -\Pi ) -\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )\bigg ]'\nonumber \\&=-\frac{3C'}{C} \big [4\pi \big (\Pi -T^{\textrm{eff}}_{33} \nonumber \\&\quad +T^{\textrm{eff}}_{22} \big ) +{\mathcal {E}} \big ] -12\pi \big ({\tilde{q}} -T^{\textrm{eff}}_{12} \big )\frac{Y\dot{C}}{XC}~. \end{aligned}$$
(37)

The heat transport equation is obtained by using M\(\ddot{\textrm{u}}\)ller–Israel–Stewart theory. All theories presented in the past provide us a transport equation of heat in which relaxation time is the key quantity (to know more about this, see [63,64,65,66,67]).

The transport equation for the heat flux is given as

$$\begin{aligned} \tau h^{\rho \eta }V^{\alpha }q_{\eta ;\alpha } +q^{\rho }&=-\kappa h^{\rho \eta }(T_,\eta +Ta_\eta )\nonumber \\&\quad -\frac{1}{2}\kappa T^{2}\bigg (\frac{\tau V^{\eta }}{\kappa T^{2}}\bigg )_{;\eta } q^{\rho }, \end{aligned}$$
(38)

where \(\tau \) (relaxation time) represents the time of the system to get back its steady state after it has been suddenly removed from it, T is the temperature and \(\kappa \) denotes the thermal conductivity. Equation (38) has only one independent component which is given by

$$\begin{aligned} \dot{q}\tau =-qX -\frac{\kappa }{Y}(TX)' -\frac{1}{2}\tau q \Theta X -\frac{1}{2}\kappa q T^{2}\bigg (\frac{\tau }{\kappa T^{2}}\bigg ). \end{aligned}$$
(39)

One can obtain Eckart–Landau equation when \(\tau =0\). When the last term in eq. (38) is absent, we get the truncated version of the theory

$$\begin{aligned} Xq +\dot{q}\tau =-\frac{\kappa }{Y} \big (XT \big )'. \end{aligned}$$
(40)

5 Matching conditions for \(f({\mathcal {G}})\) formalism

Now we discuss the matching of the interior metric with an appropriate exterior metric. The Darmois conditions, in which the extrinsic curvatures and metric coefficients are matched at the boundary of the given sphere, are employed to achieve the necessary matching. An exterior boundary is thought to be Vaidya space–time. The interior geometry is given as follows:

$$\begin{aligned} \textrm{d}s^2_{-}=-X^2\textrm{d}t^{2}+Y^2\textrm{d}r^{2} +C^2(\textrm{d}\theta ^2+\sin ^2\theta \textrm{d}\phi ^2), \end{aligned}$$
(41)

while the geometry outside the boundary (\(\Sigma \)) is [68]

$$\begin{aligned} \textrm{d}s^2_{+}&=-\bigg (1-\frac{2M(R,\nu )}{R}\bigg )\textrm{d}\nu ^{2}\nonumber \\&\quad +2\textrm{d}\nu \textrm{d}R+R^2(\textrm{d}\theta ^2+\sin ^2\theta \textrm{d}\phi ^2), \end{aligned}$$
(42)

where \(R,~\nu ,~\theta \) and \(\phi \) are considered as exterior coordinates and M is the generalised mass function of the system. The associated metrics on \(\Sigma \) are defined as

$$\begin{aligned} \textrm{d}s^2_{- \Sigma }=-\textrm{d}\tau ^{2}+C^2(\textrm{d}\theta ^2+\sin ^2\theta \textrm{d}\phi ^2) \end{aligned}$$
(43)

and

$$\begin{aligned} \textrm{d}s^2_{+\Sigma }=-\textrm{d}\tau ^{2} +R^2(\textrm{d}\theta ^2+\sin ^2\theta \textrm{d}\phi ^2). \end{aligned}$$
(44)

The unit normal vector for the interior region is taken as

$$\begin{aligned} \eta ^{-}_{t}=0,~\eta ^{-}_{r}=Y,~\eta ^{-}_{\theta }=\eta ^{-}_{\phi }=0. \end{aligned}$$
(45)

The above expression leads to the extrinsic curvature for the corresponding interior region as follows:

$$\begin{aligned} K^{-}_{\nu \mu }=-\eta ^{-}_{\sigma }\bigg [\frac{\partial ^{2}x^{\sigma }}{\partial \xi ^{\nu }\partial \xi ^{\mu }}+\Gamma ^{\sigma }_{ij}\frac{\partial x^{i}}{\partial \xi ^{\nu }}\frac{\partial x^{j}}{\partial \xi ^{\mu }}\bigg ]. \end{aligned}$$
(46)

The non-zero components of eq. (46) are found to be

$$\begin{aligned} K^{-}_{00}=-\frac{X'}{XY},~K^{-}_{22}=\frac{CC'}{Y},~K^{-}_{33}=\frac{CC'}{Y^{2}}\sin ^{2}\theta . \end{aligned}$$
(47)

Similarly, the unit normal vector for the exterior metric takes the from

$$\begin{aligned} \eta ^{+}_{\nu }=-\frac{\dot{R}}{X},~\eta ^{+}_{R}=\frac{{\dot{\nu }}}{X},~\eta ^{+}_{\theta }=\eta ^{+}_{\phi }=0. \end{aligned}$$
(48)

For the exterior region, the non-vanishing components of the corresponding extrinsic curvature are written as

$$\begin{aligned}&K^{+}_{00}=\bigg [\frac{\textrm{d}^{2}\nu }{\textrm{d} \tau ^{2}}\bigg (\frac{\textrm{d}\nu }{\textrm{d}\tau }\bigg )^{-1} -\frac{M}{R^{2}}\frac{\textrm{d}\nu }{\textrm{d}\tau }\bigg ],\nonumber \\&K^{+}_{22}=\frac{\textrm{d}\nu }{\textrm{d}\tau }(R-2M) +R\frac{\textrm{d}R}{\textrm{d}\tau },\nonumber \\&K^{+}_{33}=\bigg [\frac{\textrm{d}\nu }{\textrm{d}\tau }(R-2M)+R\frac{\textrm{d}R}{\textrm{d}\tau }\bigg ]\sin ^{2}\theta . \end{aligned}$$
(49)

By equating the extrinsic curvature for the interior and exterior regions, we obtain after using the field equation and mass function as follows:

$$\begin{aligned}&M(\nu ,R)=m(t,r),\end{aligned}$$
(50)
$$\begin{aligned}&P_{r}=-\bigg [\frac{T^{\textrm{eff}}_{22}}{Y^{2}}+\frac{T^{\textrm{eff}}_{12}}{XY}\bigg ], \end{aligned}$$
(51)
$$\begin{aligned}&\frac{M}{R^{2}}-R\bigg [\frac{T^{\textrm{eff}}_{12}}{XY}+\bigg (P_{r}+\frac{T^{\textrm{eff}}_{22}}{Y^{2}}\bigg )\bigg ]=0. \end{aligned}$$
(52)

Equation (50) provides the relationship between mass function of the exterior and the interior metric. Equation (51) expresses the relationship between the radial pressure and modified terms whereas the interaction of the exterior mass with modified terms arising from the considered theory is described using eq. (52).

6 Irregularities in energy–density

We shall now proceed by taking different cases to analyse the factors responsible for energy–density inhomogeneity.

6.1 Locally isotropic non-dissipative fluid

Firstly, we take locally isotropic fluid which is non-dissipative. In this, we take P\(P_{\bot }=P_{r}\),  \({\tilde{q}}= \Pi =0\). Then eqs (36) and (37) are given as

$$\begin{aligned}&\bigg [{\mathcal {E}} -4\pi \bigg (-\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33} +\mu \bigg )\bigg ]^.\nonumber \\&\quad +\frac{3\dot{C}}{C} \big [{\mathcal {E}} -4\pi \big (\mu +P +T^{\textrm{eff}}_{11}\nonumber \\&\quad +T^{\textrm{eff}}_{33} \big ) \big ] +12\pi \frac{XC'}{YC}T^{\textrm{eff}}_{12} =0 \end{aligned}$$
(53)

and

$$\begin{aligned}&\bigg [{\mathcal {E}} -4\pi \bigg (\mu -\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )\bigg ]'\nonumber \\&\quad =-\frac{3C'}{C} \big [{\mathcal {E}} +4\pi \big (-T^{\textrm{eff}}_{33} \nonumber \\&\qquad +T^{\textrm{eff}}_{22} \big ) \big ] +12\pi \frac{Y\dot{C}}{XC}T^{\textrm{eff}}_{12}. \end{aligned}$$
(54)

Now using eqs (13) and (28) in eq. (53), we get

$$\begin{aligned} \dot{{\mathcal {E}}} +\frac{3\dot{C}}{C}{\mathcal {E}} +4\pi \big (\mu +P \big )X\sigma =\xi _0 \end{aligned}$$
(55)

and its solution is written as

$$\begin{aligned} {\mathcal {E}} =-4\pi \frac{\int ^{t}_{0} C^{3}(P+\mu )X\sigma }{C^{3}}~\textrm{d}t ~+\int ^{t}_{0} \xi _{1}~\textrm{d}t, \end{aligned}$$
(56)

where \({\mathcal {E}}(0,r) = 0\) is the integration function. If we consider the fluid to be shear-free without considering conformal flatness, then eq. (55) takes the form

$$\begin{aligned} {\mathcal {E}} =\int ^{t}_{0} \xi _{1}~\textrm{d}t+\frac{f(r)}{C^{3}}~\equiv F(r), \end{aligned}$$
(57)

where F(r) is considered to be arbitrary, satisfying \(F(0) = 0\). The expressions for \(\xi _{0}\) and \(\xi _{1}\) are

$$\begin{aligned} \xi _{0}&=-4\pi \bigg [\bigg (\frac{f}{2},1 +\frac{f}{2},2 +Z_0\bigg )\\&\quad -\bigg (-\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )^.\bigg ]\\&\quad +12\pi \bigg [\frac{\dot{C}}{C} \big (T^{\textrm{eff}}_{11} +T^{\textrm{eff}}_{33} \big ) -\frac{XC'}{YC}T^{\textrm{eff}}_{12}\bigg ] \end{aligned}$$

and

$$\begin{aligned} \xi _{1} =\frac{C^{3}\xi _{0}}{C^{3}}. \end{aligned}$$

Initial homogeneous configuration at \(t = 0\) implies \({\mathcal {E}}(0,r) = 0\). Then, F(r) = 0 and for any time t, \({\mathcal {E}} = 0\) then homogeneous condition will hold. If we take a small Weyl tensor which is non-vanishing, then it will stand small with the expansion of the fluid.

6.2 Non-dissipative geodesic dust (\({\tilde{q}} =P_{\bot } =P_{r} =0\))

In this case, we take \(A= 1\) because fluid is assumed to be geodesic. Equations (36) and (37) may be written as

$$\begin{aligned}&\bigg [{\mathcal {E}} -4\pi \bigg (\mu -\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )\bigg ]^. \nonumber \\&\quad +\frac{3\dot{C}}{C} \big [{\mathcal {E}} -4\pi \big (\mu +T^{\textrm{eff}}_{11} +T^{\textrm{eff}}_{33} \big ) \big ] \nonumber \\&\quad +12\pi \frac{{C'}}{CY}T^{\textrm{eff}}_{12} =0 \end{aligned}$$
(58)

and

$$\begin{aligned}&\bigg [{\mathcal {E}} -4\pi \bigg (\mu -\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )\bigg ]'\nonumber \\&\quad =-\frac{3C'}{C} \big [4\pi \big (-T^{\textrm{eff}}_{33}\nonumber \\&\qquad +T^{\textrm{eff}}_{22} \big ) +{\mathcal {E}} \big ] +12\pi \frac{Y\dot{C}}{C}T^{\textrm{eff}}_{12}. \end{aligned}$$
(59)

Also, in this case only Weyl tensor is not responsible for energy–density inhomogeneity. Equation (60), which shows that conformal flatness and shear-free condition do no imply each other, is obtained by using eqs (13) and (28) in eq. (58), and we get

$$\begin{aligned} \dot{{\mathcal {E}}} +\frac{3\dot{C}}{C}{\mathcal {E}}+4\pi \mu \sigma = \xi _2. \end{aligned}$$
(60)

The solution of eq. (60) is given by

$$\begin{aligned} {\mathcal {E}} =-4\pi \frac{\int ^{t}_{0} \sigma \mu C^{3}}{C^{3}}~\textrm{d}t ~+\int ^{t}_{0}\xi _{3}~\textrm{d}t, \end{aligned}$$
(61)

where

$$\begin{aligned} \xi _2&=-4\pi \bigg [\bigg (\frac{f}{2},1 +\frac{f}{2},2 +Z_0\bigg )\\&\quad -\bigg (-\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )^.\bigg ]\\&\quad +12\pi \bigg [\frac{\dot{C}}{C} \big (T^{\textrm{eff}}_{11} +T^{\textrm{eff}}_{33} \big ) -\frac{C'}{YC}T^{\textrm{eff}}_{12}\bigg ], \end{aligned}$$
$$\begin{aligned} \xi _3 =\frac{C^{3}\xi _2}{C^{3}} \end{aligned}$$

and  \({\mathcal {E}}(0,r)\) = 0 is the integration function.

6.3 Non-dissipative locally anisotropic fluid

Now we consider the effect of pressure anisotropy in the system under observation. To proceed, we shall take \(\Pi \ne 0\) but \({\tilde{q}} = 0\). Then, eqs (36) and (37) take the form

$$\begin{aligned}&\bigg [{\mathcal {E}} -4\pi \bigg ((\mu -\Pi ) -\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{2} +T^{\textrm{eff}}_{33}\bigg )\bigg ]^.\nonumber \\&\quad +\frac{3\dot{C}}{C} \big [{\mathcal {E}} -4\pi \big (\mu +P_{\bot } \nonumber \\&\quad +T^{\textrm{eff}}_{11}+T^{\textrm{eff}}_{33} \big ) \big ] +12\pi \frac{XC'}{YC}T^{\textrm{eff}}_{12} =0 \end{aligned}$$
(62)

and

$$\begin{aligned}&\bigg [{\mathcal {E}}-4\pi \bigg ((\mu -\Pi ) -\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{2} +T^{\textrm{eff}}_{33}\bigg )\bigg ]'\nonumber \\&\quad +\frac{3C'}{C} \big [{\mathcal {E}} +4\pi \big (\Pi -T^{\textrm{eff}}_{33} \nonumber \\&\quad +T^{\textrm{eff}}_{22} \big ) \big ] -12\pi \frac{\dot{C}Y}{XC}T^{\textrm{eff}}_{12} =0. \end{aligned}$$
(63)

Equation (64) is obtained by using eqs (13) and (28) in eq. (62). The evolution equation for the quantities responsible for inhomogeneity is

$$\begin{aligned}&\frac{\dot{C}}{C} \big (3{\mathcal {E}} +4\pi \Pi \big )+ 4\pi \big (\mu +P_{r} \big )X\sigma + \big ({\mathcal {E}} +4\pi \Pi \big )^. =\xi _{0}, \end{aligned}$$
(64)

where the term \(({\mathcal {E}} +4\pi \Pi )\) is referred to as the structure scalars \((X_{TF})\) [59].

The tensor \((X_{\mu \nu })\) is defined as

$$\begin{aligned}&X_{\mu \nu }=^*R^*_{\mu \alpha \nu \beta }V^{\alpha }V^{\beta } =\frac{1}{2}\eta ^{\epsilon \gamma }_{\mu \alpha }~R^*_{\epsilon \gamma \nu \beta }V^{\alpha }V^{\beta }, \end{aligned}$$
(65)

where \(R^{*}_{\mu \nu \alpha \beta }=\frac{1}{2} \eta _{\epsilon \gamma \alpha \beta }R^{\epsilon \gamma }_{\mu \nu }\) and \(\eta _{\epsilon \gamma \alpha \beta }\) denotes the Levi–Civita tensor. This can also be written as

$$\begin{aligned} X_{\mu \nu } =\frac{1}{3}X_{T}h_{\mu \nu } +X_{TF}\bigg (\chi _{\mu }\chi _{\nu } -\frac{1}{3}h_{\mu \nu }\bigg ). \end{aligned}$$
(66)

Equation (66) shows the decomposition of  \(X_{\mu \nu }\) into its trace and trace-free parts.

By using eqs (30), (33), (34) and field equations, the above component takes the form

$$\begin{aligned} X_{TF} =-(4\pi \Pi +{\mathcal {E}}). \end{aligned}$$
(67)

We would like to mention that in the above equations, we have taken GR \(X_{TF}\). In term of \(X_{TF}\) the evolution equation (64) is expressed as

$$\begin{aligned} {\dot{X_{TF}}} +3\frac{\dot{C}}{C}X_{TF}+8\pi \frac{\dot{C}}{C}\Pi -4\pi \big (P_{r}+\mu \big )\sigma X = -\xi _{0}. \end{aligned}$$
(68)

The solution of eq. (68) is

$$\begin{aligned} X_{TF} =\frac{-4\pi \int ^{t}_{0} C^{2}~\big [2\dot{C}\Pi -\big (P_{r} +\mu \big )X\sigma C +\xi ^{*}_{0}\big ]}{C^{3}}~\textrm{d}t, \end{aligned}$$
(69)

where  \(\xi ^{*}_{0} =\frac{\xi _{0}C}{4\pi }\). Our fluid which is initially regular in the energy–density will be affected by the pressure anisotropy, \(f({\mathcal {G}})\) terms and shear by the time according to eq. (69).

6.4 Dissipative dust

Lastly, we take a geodesic dissipative pressureless fluid to highlight the role of dissipation in the evolution of inhomogeneities of the energy–density.

Hence we have \(A = 1\) and \(P_{\bot } = P_{r} = 0\) in this case. Then, eqs (36) and (37) are written as

$$\begin{aligned}&\bigg [{\mathcal {E}} -4\pi \bigg (-\frac{f}{2} +{\tilde{\mu }} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )\bigg ]^.\nonumber \\&\quad +\frac{3\dot{C}}{C}\big [{\mathcal {E}} -4\pi \big ({\tilde{\mu }} +T^{\textrm{eff}}_{11}\nonumber \\&\quad +T^{\textrm{eff}}_{33}\big )\big ] +12\pi \big (T^{\textrm{eff}}_{12} -{\tilde{q}}\big )\frac{C'}{YC} =0 \end{aligned}$$
(70)

and

$$\begin{aligned}&\bigg [{\mathcal {E}} -4\pi \bigg (\mu -\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )\bigg ]'\nonumber \\&\quad =-\frac{3C'}{C}\big [{\mathcal {E}} +4\pi \big (T^{\textrm{eff}}_{22} \nonumber \\&\qquad -T^{\textrm{eff}}_{33}\big )\big ] +12\pi \big (T^{\textrm{eff}}_{12} -{\tilde{q}}\big )\frac{Y\dot{C}}{C}. \end{aligned}$$
(71)

Equation (71) gives

$$\begin{aligned} \Psi \equiv ~ {\mathcal {E}} +12\pi \frac{\int ^{r}_{0}~Y\dot{C}{\tilde{q}}C^{2}}{C^{3}}~\textrm{d}r -\int ^{r}_{0}\xi ^*_{4}~\textrm{d}r, \end{aligned}$$
(72)

where

$$\begin{aligned} \xi _{4}&=4\pi \bigg [\bigg (-\frac{f}{2} +T^{\textrm{eff}}_{11} -T^{\textrm{eff}}_{22} +T^{\textrm{eff}}_{33}\bigg )' -\frac{3C'}{C}\big (T^{\textrm{eff}}_{22} \\ {}&\quad -T^{\textrm{eff}}_{33}\big ) +3T^{\textrm{eff}}_{12}\frac{\dot{C}Y}{C}\bigg ] \end{aligned}$$

and

$$\begin{aligned} \xi ^*_{4} =\frac{C^{3} \xi _{4}}{C^{3}}, \end{aligned}$$

which shows that \(\tilde{\mu '} = 0\) if and only if \(\Psi = 0\). An evolution equation for \(\Psi \) is obtained from eq. (70) by using eqs (13), (28) and taking

$$\begin{aligned} \Omega = 12\pi \int ^{r}_{0} \dot{C}C^{2}{\tilde{q}}Y \textrm{d}r -\int ^{r}_{0}\xi ^*_{4}~\textrm{d}r. \end{aligned}$$

Thus, eq. (70) becomes

$$\begin{aligned} {\dot{\Psi }} +\frac{3\dot{C}\Psi }{C} =-4\pi \frac{\tilde{q'}}{{Y}} -4\pi \sigma {\tilde{\mu }} +\frac{{\dot{\Omega }}}{C^{3}} +4\pi {\tilde{q}} \frac{C'}{YC} +\xi _{0}, \end{aligned}$$
(73)

whose solution is

$$\begin{aligned} \Psi = \frac{\int ^{t}_{0}~\bigg [\bigg (4\pi \frac{{\tilde{q}}C'}{YC} +{\dot{\Omega }} -4\pi \frac{\tilde{q'}}{Y} -4\pi \sigma {\tilde{\mu }}\bigg ) +\xi _{0}\bigg ]C^{3}}{C^{3}}~\textrm{d}t. \end{aligned}$$
(74)

Equation (29) yields

$$\begin{aligned} {\tilde{q}} =\frac{\phi (r)}{Y^{2}C^{2}} -\frac{\int ^{t}_{0} \xi _{5}}{Y^{2}C^{2}}~\textrm{d}t, \end{aligned}$$
$$\begin{aligned} {\tilde{q}} =\frac{\Phi (r)}{C^{2}Y^{2}}, \end{aligned}$$
(75)

where we have taken \(\Phi (r)\) to be arbitrary satisfying \(\Phi (0) = 0\) and

$$\begin{aligned} \xi _{5} =\bigg (\frac{f}{2},1 +\frac{f}{2},2 +Z_{1}\bigg ). \end{aligned}$$

Thus, eq. (74) shows that the factors which are responsible for inhomogeneity are the shear, \(f\mathcal {(G)}\) terms and dissipative terms. We shall now take the shear-free case, in which we may put \(C = rY\), then we obtain from eq. (74) by using eq. (75)

$$\begin{aligned} \Psi&=\int ^{t}_{0}~\bigg [8\pi \Phi (r)\frac{r^{2}}{C^{3}}\bigg (-C +\frac{5C'r}{2}\bigg ) -4\pi \frac{r{3}}{C^{2}}\Phi '(r) \nonumber \\&\quad +4\pi \int ^{r}_{0}{\big ({\dot{\Theta }}\Phi (r)r- \xi ^*_{5}\big )~\textrm{d}r}\bigg ]\frac{1}{C^{3}}~\textrm{d}t +\int ^{t}_{0}~\xi _{1}~\textrm{d}t, \end{aligned}$$
(76)

where \(\xi ^*_{5}~=~\xi ^*_{4}/4\pi \).

Now we observe the role of \(\tau \) in the development of \(\Psi \). In the diffusion approximation \((\epsilon = 0)\) we have, \({\tilde{\mu }} = \mu \) and \({\tilde{q}} = q\). Hence, eq. (29) may be written as

$$\begin{aligned} \dot{q} =-\bigg (\frac{4\Theta q}{3} +\xi _{5}\bigg ). \end{aligned}$$
(77)

Combining eq. (77) with eq. (40) we get

$$\begin{aligned} q =\frac{(\xi _{5}\tau -T'\kappa ~r)}{\big (-4\frac{\tau }{3}\Theta +1\big )C}. \end{aligned}$$
(78)

Now by using eq. (75), we have

$$\begin{aligned} \Phi (r) =\frac{\xi _{5}\tau C^{3}}{r^{2}\big (-4\frac{\tau }{3}\Theta +1\big )} -\frac{\kappa T'C^{3}}{r\big (-4\frac{\tau }{3}\Theta +1\big )}. \end{aligned}$$
(79)

If we insert eq. (79) in eq. (76) then we can observe the impact of  \(\tau \) on \(\Psi \) in \(f\mathcal {(G)}\) theory.

7 Concluding remarks

In this work, we have pointed out the different characteristics of the fluid distribution which are accountable for the inhomogeneity in the modified GB gravity. We have also found the expressions for the evolution equations for the quantities illustrating those features.

  1. 1.

    For non-dissipative locally isotropic fluid and dust, we have discovered that Weyl tensor and \(f({\mathcal {G}})\) terms are responsible of energy–density irregularity and homogeneity is controlled by conformal flatness conditions.

  2. 2.

    However, in the case of non-dissipative locally anisotropic fluid, we have observed that an extra factor is also responsible for inhomogeneity. We have also found the expression of evolution equation for those variables. And the additional term is identified as the structure scalar.

  3. 3.

    Lastly, we considered the dissipative dust and deduced that it is also a source of energy–density inhomogeneity. To deal with this problem, we took geodesic dust and its subcase was the shear-free case. The local and non-local roles of dissipation in inhomogeneity and the contribution of \(\tau \) are the most significant outcomes of this portion.

Now, we conclude that different variables considered here affect the energy–density inhomogeneity. However, the particular form of these variables is not clear. In fact, we may take the cases in which any of the above-mentioned variables and their combinations in eqs (61), (69) and (76) vanish to get the stability of homogeneity. All our results reduce to [59] under GR limits.