1 Introduction

The inclusion of higher order curvature invariants in the action for the modifications of general relativity (GR) have a long primordial history. An alternative approach hypothesizes that GR is accurate only on small scales and has to be generalized on large/cosmological distances. The early effort was mostly due to the scientific curiosity to understand the newly proposed theory and to find some alternative to dark energy model. However, new motivations came from some theoretical aspects of its physics which revived the study of higher order gravity theories [14]. To begin with, there are various techniques and proposal for modified gravity to deviate from GR. The f(R) theories of gravity [5, 6] are the straightforward generalization of the Einstein–Hilbert action, in which the Ricci scalar (R) becomes a generic function of R. In fact, it is a relatively simple and compelling alternative to GR, from which some important results have already been obtained in the literature.

It is worth mentioning that one can apply two variational principles to derive f(R) field equations from the modified form of the Einstein–Hilbert action. One is the standard metric variation, while the second one is dubbed the Palatini variation in which the connection and metric are dealt with independently. More precisely, one has to vary the action with respect to both metric and connection in such a manner that the matter action does not depend upon the connection. Accordingly, there would be two versions of f(R) gravity, corresponding to which variational formalism is explored. Here, the Einstein–Hilbert action can be modified through its gravitational part in order to discuss the f(R) theory of gravity as [9]

$$\begin{aligned} S_{f(R)}=\frac{1}{2\kappa }\int \mathrm{d}^4x\sqrt{-g}f(R)+S_M, \end{aligned}$$

where \(\kappa ,~S_M\), and f(R) are coupling constant, matter action and a non-linear Ricci function, respectively. Applying the variation with metric (\(g_{\alpha \beta }\)) and the connection (\(\Gamma ^\rho _{\alpha \beta }\)) in the above action, respectively, one can formulate the following couple of equations of motion:

$$\begin{aligned}&f_R(\breve{R}){\breve{R}}_{\alpha \beta }-[g_{\alpha \beta }f(\breve{R})]/2 ={\kappa }T_{\alpha \beta },\end{aligned}$$
(1)
$$\begin{aligned}&\breve{\nabla }_\mu (g^{\alpha \beta }\sqrt{-g}f_R(\breve{R}))=0. \end{aligned}$$
(2)

By taking the trace of Eq. (1), we can constitute an analogy between \(T\equiv g^{\alpha \beta }T_{\alpha \beta }\) and \(R \equiv R(\Gamma )\), thus

$$\begin{aligned} Rf_R({R})-2f({R})={\kappa }T, \end{aligned}$$
(3)

which describes the dependence of the Ricci scalar on T. To examine a consistent Palatini f(R) gravity with any other classical theory, we have to deal with only situations where the solution of the above equation exists. With present the cosmological value of the Ricci invariant, i.e., \(R=\tilde{R}\), and Eq. (3) leads to the covariant conservation of the metric thereby fixing \(\Gamma ^\rho _{\alpha \beta }\) to Levi-Civita. Consequently, for vacuum cases, Eq. (1) turns out to be

$$\begin{aligned} \breve{R}_{\alpha \beta }-\Lambda (\tilde{R})g_{\alpha \beta }=0, \end{aligned}$$
(4)

where \(\breve{R}_{\alpha \beta }\) is called the metric Ricci tensor of \(g_{\alpha \beta }\) and \(\Lambda (\tilde{R})={\tilde{R}}/{4}\). This theory would lead to GR in the presence/absence of a cosmological constant depending on a viable f(R) model. One can obtain a single expression for the field equations in the Palatini f(R) formalism by substituting \(\Gamma ^\sigma _{\alpha \beta }\) from Eq. (2) in terms of \(g_{\alpha \beta }\) as follows:

$$\begin{aligned}&\frac{1}{f_R}\left( \breve{\nabla }_\alpha \breve{\nabla }_\beta -g_{\alpha \beta } \breve{\Box }\right) f_R+\frac{1}{2}g_{\alpha \beta }\breve{R}\nonumber \\&\quad +\frac{\kappa }{f_R} T_{\alpha \beta }+\frac{1}{2}g_{\alpha \beta }\left( \frac{f}{f_R}-R\right) \nonumber \\&\quad +\frac{3}{2f_R^2}\left[ \frac{1}{2}g_{\alpha \beta }(\breve{\nabla } f_R)^2-\breve{\nabla }_\mu f_R\breve{\nabla }_\beta f_R\right] -\breve{R}_{\alpha \beta }=0, \end{aligned}$$
(5)

which can be written in an alternative form as

$$\begin{aligned} \breve{G}_{\alpha \beta }=\frac{\kappa }{f_R}(T_{\alpha \beta } +{\mathcal {T}_{\alpha \beta }}), \end{aligned}$$
(6)

where

$$\begin{aligned} {\mathcal {T}_{\alpha \beta }}&=\frac{1}{\kappa }\left( \breve{\nabla }_\alpha \breve{\nabla }_ \beta -g_{\alpha \beta }\breve{\Box }\right) f_R+\frac{f_R}{2\kappa }g_{\alpha \beta }\left( \frac{f}{f_R}-R\right) \\&\quad +\frac{3}{2{\kappa }f_R}\left[ \frac{1}{2}g_{\alpha \beta }(\breve{\nabla } f_R)^2-\breve{\nabla }_\alpha f_R\breve{\nabla }_\beta f_R\right] \end{aligned}$$

is the effective energy-momentum tensor in the Palatini f(R) terms describing a modified gravitational contribution, while \(\breve{G}_{\alpha \beta }~\equiv ~\breve{R}_{\alpha \beta }-\frac{1}{2}g_{\alpha \beta }\breve{R},\quad \breve{\Box }=\breve{\nabla }_\alpha \breve{\nabla }_\beta g^{\alpha \beta }\), where \(\breve{\nabla }_\alpha \) shows the covariant derivative with respect to the Levi-Civita connection. It is interesting to note that \(f_R\) and f are functions of \(R(\Gamma )~\equiv ~g^{\alpha \beta }R_{\alpha \beta }(\Gamma )\). If one disregards the supposition that the matter action is independent of the connection, then a new version of f(R) gravity is found, called metric-affine f(R) gravity, which has both Palatini and metric f(R) on its usual limits. The viability criteria for any gravitational theory include [58] stability, and correct Newtonian and post-Newtonian limits, a correct cosmological dynamics, cosmological perturbations compatible with large scale structures and cosmic microwave background, and the absence of ghosts. Many interesting results emerge from f(R) gravity as one predicts the early universe to have inflation and to have a well-posed Cauchy problem. Nojiri and Odintsov [10] studied various modified gravity models as an alternative to dark energy. They investigated that inhomogeneous terms originate with a modified gravity model of the universe. Guo and Joshi [11] examined the collapse of spherical star due to the Starobinsky \(R^2\) model within the framework of f(R) gravity. Here, we would like to discuss the inhomogeneities/irregularities which emerge in the energy density due to the Palatini version of f(R) gravity.

Anisotropic effects are leading paradigms in the description of evolutionary mechanisms of stellar collapsing models. It is an established fact that the properties of anisotropic models may differ drastically in contrast with the isotropic spheres. Nguyen and Pedraza [12] investigated an anisotropic spherical compact model and deduced that anisotropic effects make the system dissipative with the evolution of time. Leon and Sarikadis [13] investigated the impact of anisotropy in the framework of modified gravity and concluded to different cosmological behaviors in the geometry as compared to isotropic scenarios. Cosenza et al. [14] figured out the role of anisotropy on radiating fluid spheres. Maartens et al. [15] analyzed the anisotropic evolution of the universe during an intermediate transient regime of inflationary expansion.

The anisotropic picture in relativistic fluid configurations can be achieved by many interconnected phenomena like the existence of strong electric and magnetic interactions [16, 17]. A great deal of attention has also been given to the interaction of electromagnetic and gravitational fields. However, general agreement exists among relativists that physical objects with a large amount of electric charge do not exist in nature. This line of thought has been challenged by many researchers and a variety of works have been carried out with this background. Ghezzi [18] explored some analytical models of an isotropic spherical star in the presence of an electromagnetic field in which the charge density is proportional to the rest mass density. He found that the radius of charged stars is larger as compared to the uncharged ones. Varela et al. [19] solved the Einstein–Maxwell field equations for a self-gravitating anisotropic spherical system numerically and link their findings with the models of dark matter including massive charged particles as well as charged strange quark stars. The impact of an electromagnetic field and other matter variables on the evolutionary behavior of collapsing relativistic self-gravitating systems in the cosmos has been investigated in [2027].

A system begins to collapse once it experiences an inhomogeneous stellar state. Penrose and Hawking [28] explored irregularities in the energy density of spherical relativistic stars by means of the Weyl invariant. Herrera et al. [29] discussed the role of density inhomogeneities in the structure and evolution of spherically anisotropic objects. Herrera et al. [30, 31] did a systematic study of the structure formation of self-gravitating compact stars by means of some scalar functions (trace and trace-free parts) obtained from splitting of the Riemann tensor. These scalars are associated with electric and magnetic as well as second dual of the Riemann tensor and have an eventual relationship with the fundamental properties of the matter configuration [32]. The inhomogeneity in the universe can be linked with the dipole anisotropy as found by Planck [33]. Herrera [34] investigated different physical factors responsible for the emergence of inhomogeneities in an initial regular spherical collapsing distributions. Sharif and Yousaf [35] described the stability of the regular energy density in a planar matter distribution by taking into account a three parametric model form in Palatini f(R) gravity.

The inhomogeneous models can also be used to discuss the SN-data [36]. Geng and Lü [37] presented a class of models describing the isotropic expansion for inhomogeneous universe. The unresolved issues of the dark energy/dark matter on the homogeneity of the collapsing compact star is still a matter of interest for relativists. We will address two main related problems in this paper:

  1. 1.

    We explore inhomogeneity factors for a plane symmetric compact object and discuss it with some particular cases by increasing the complexity in the matter distribution.

  2. 2.

    The role of Palatini f(R) dark source terms through a viable f(R) model as well as electromagnetic field effects will be analyzed.

This paper is organized in the following manner. In the next section, we deduce the field equations coupled with the source in f(R) gravity under the influence of an electromagnetic field. Section 3 investigates the dynamical as well as evolution equations for the systematic analysis of inhomogeneity factors. In Sect. 4, we formulate the irregularity factors with some particular cases of dissipative and non-dissipative matter fields. Finally, we conclude our main findings in the last section.

2 f(R) gravity coupled to matter source

We choose a non-static planar geometry for the construction of our systematic analysis as [3841]

$$\begin{aligned} \mathrm{d}s^2_-= & {} -A^2(t,z)\mathrm{d}t^{2}+B^2(t,z)\left( \mathrm{d}x^{2}+\mathrm{d}y^2\right) \nonumber \\&+\, C^2(t,z)\mathrm{d}z^2, \end{aligned}$$
(7)

while it is filled with a dissipative fluid by means of diffusion (heat) as well as free-streaming (null radiation) approximations having an anisotropic pressure in the interior. Such matter fields are described by the energy-momentum tensor as follows:

$$\begin{aligned} T_{\alpha \beta }&=(P_{\bot }+\mu )V_\alpha V_\beta +q_{\beta }V_\alpha +{\varepsilon }l_\alpha l_\beta +P_\bot g_{\alpha \beta }\nonumber \\&\quad +(P_z-P_\bot )\chi _\alpha \chi _\beta +q_{\alpha }V_\beta , \end{aligned}$$
(8)

where \(\varepsilon ,~\mu ,~P_{\bot },~P_r\), and \(q_{\beta }\) are the radiation density, energy density, different stress components, and the heat flux vector, respectively.

In a comoving coordinate system, the unit four vector \(l^\beta =\frac{1}{A}\delta ^{\beta }_{0}+\frac{1}{C}\delta ^{\beta }_{3}\), the radial four vector, i.e., \(\chi ^{\beta }=\frac{1}{C}\delta ^{\beta }_{3}\) as well as the four velocity vector \(V^{\beta }=\frac{1}{A}\delta ^{\beta }_{0}\), satisfy the following relations:

$$\begin{aligned} V^{\alpha }V_{\alpha }&=-1,\quad \chi ^{\alpha }\chi _{\alpha }=1, \quad \chi ^{\alpha }V_{\alpha }=0,\\ V^\alpha q_\alpha&=0, \quad l^\alpha V_\alpha =-1, \quad l^\alpha l_\alpha =0. \end{aligned}$$

The expansion rate of the matter configuration for a Palatini f(R) background is defined by the scalar as

$$\begin{aligned} \Theta _{P}=V_{\alpha ;\beta }V^{\beta }=\frac{2}{A}\left( \frac{\dot{B}}{B} +\frac{\dot{f_R}}{f_R}+\frac{\dot{C}}{2C}\right) , \end{aligned}$$
(9)

where a dot indicates the operator \(\frac{\partial }{\partial {t}}\). The shear scalar for a planar case in the framework of GR yields [34]

$$\begin{aligned} 9\sigma ^2=\frac{9}{2}\sigma ^{\mu \nu }\sigma _{\mu \nu }={W^2_{\mathrm{GR}}},\quad \text {with}\quad {W_{\mathrm{GR}}}=\frac{1}{A}\left( \frac{\dot{C}}{C}-\frac{\dot{B}}{B}\right) . \end{aligned}$$
(10)

Using Eqs. (9) and (10), we can determine a relation between expansion and shear as follows:

$$\begin{aligned} {W_{\mathrm{GR}}}=\Theta _P-\frac{3\dot{C}}{AC}-\frac{2\dot{f_R}}{Af_R}. \end{aligned}$$
(11)

The stress-energy tensor describing the electromagnetic field and satisfying the Maxwell field equations, i.e., \(F^{\alpha \beta }_{~~;\beta }={\mu }_{0}J^{\alpha },\quad F_{[\alpha \beta ;\gamma ]}=0,\) is defined as

$$\begin{aligned}E_{\alpha \beta }=\frac{1}{4\pi }\left( F^{\gamma }_{\alpha }F_{\beta \gamma }- \frac{1}{4}F^{\gamma \delta }F_{\gamma \delta }g_{\alpha \beta }\right) , \end{aligned}$$

where \(F_{\alpha \beta }=-\phi _{\alpha ,\beta }+\phi _{\beta ,\alpha }\) is the Maxwell strength tensor where \(\phi _\beta \) describes four potential. Here \(J_\alpha \) and \(\mu _0=4\pi \) represent four current and magnetic permeability, respectively. The four potential and four current are \(\phi ^{\alpha }={\phi } {\delta ^{\alpha }_{0}},\quad J^{\alpha }={\sigma }V^{\alpha },\) under comoving coordinate system, while \(\phi ,~\sigma \) are functions of t and z representing the scalar potential and charge density, respectively. The non-zero components of the Maxwell field equations yield the following couple of equations:

$$\begin{aligned}&\frac{\partial ^2\phi }{\partial {z}^2}-\left( \frac{A'}{A}+\frac{C'}{C} -\frac{2B'}{B}-\frac{2f'_R}{f_R}\right) \frac{\partial \phi }{\partial {z}}=\sigma {\mu }_{0}AC^2,\end{aligned}$$
(12)
$$\begin{aligned}&\frac{\partial ^2\phi }{\partial {t}\partial {z}}-\left( \frac{\dot{A}}{A} +\frac{\dot{C}}{C}-\frac{2\dot{B}}{B}-\frac{2\dot{f}_R}{f_R}\right) \frac{\partial \phi }{\partial {z}}=0. \end{aligned}$$
(13)

Here a prime indicates z differentiation. Integration of Eq. (12) with respect to z yields

$$\begin{aligned} {\phi }'=\frac{sAC}{f_R^2 B^{2}},\quad where \quad s =\mu _0\int ^z_{0}{\sigma }{f_R^2}{C{B^2}\mathrm{d}z}, \end{aligned}$$
(14)

which equivalently satisfies Eq. (13). The non-vanishing components of the electromagnetic stress tensor turn out to be

$$\begin{aligned} E_{00}= & {} \frac{s^2}{8\pi A^2B^4},\quad E_{11}=\frac{s^2}{8\pi B^6}=E_{22},\nonumber \\ E_{33}= & {} -\frac{s^2}{8\pi B^4C^2}. \end{aligned}$$
(15)

The field equations in the framework of Palatini f(R) gravity corresponding to a planar geometry lead to

$$\begin{aligned}&\frac{\kappa }{f_{R}}\left[ A^{2}({\mu }+{\varepsilon })+\frac{s^2}{8\pi A^2B^4}\right. \nonumber \\&\qquad \left. -\frac{A^2}{\kappa }\left\{ \frac{f_{R}'}{C^2}\left( \frac{C'}{C}+\frac{{f'_R}}{4f_R}-\frac{2B'}{B} \right) -\frac{f_R}{2}\left( R-\frac{f}{f_R}\right) \right. \right. \nonumber \\&\qquad \left. \left. -\frac{f_{R}''}{C^2}+\left( \frac{\dot{C}}{C}+\frac{9\dot{f_R}}{4f_R}+\frac{2\dot{B}}{B} \right) \frac{\dot{f_{R}}}{A^2}\right\} \right] \nonumber \\&\quad =\left( \frac{\dot{B}}{B}\right) ^2+\frac{ 2\dot{C}\dot{B}}{CB}+\left\{ \frac{B'}{B}\left( \frac{2C'}{C}- \frac{B'}{B}\right) \right. \nonumber \\&\qquad \left. -\frac{2C''}{C}\right\} \left( \frac{A}{C}\right) ^2, \end{aligned}$$
(16)
$$\begin{aligned}&\frac{\kappa }{f_{R}}\left[ CA(q+{\varepsilon })-\frac{1}{\kappa } \left( \dot{f_{R}'}-\frac{5}{2}\frac{\dot{f_R}f'_R}{f_R}-\frac{\dot{C}f_{R}'}{C}-\frac{A'\dot{f_{R}}}{A} \right) \right] \nonumber \\&\quad =2\left( \frac{\dot{B'}}{B}-\frac{A'\dot{B}}{BA} -\frac{B'\dot{C}}{BC}\right) , \end{aligned}$$
(17)
$$\begin{aligned}&\frac{\kappa }{f_{R}}\left[ {P_{\bot }}B^{2}+\frac{s^2}{8\pi B^6}\right. \nonumber \\&\qquad \left. +\frac{B^2}{\kappa } \left\{ \frac{\ddot{f_{R}}}{A^2}-\frac{f_R''}{C^2}+\left( \frac{ \dot{B}}{B}-\frac{\dot{f_R}}{4f_R}-\frac{\dot{A}}{A}+\frac{\dot{C}}{C}\right) \frac{ \dot{f_{R}}}{A^2}-\frac{f_R}{2}\right. \right. \nonumber \\&\qquad \times \left( R-\frac{f}{f_R}\right) \left. +\left( \frac{C'}{C}+\frac{f'_R}{4f_R}-\frac{B'}{B}\left. -\frac{A'}{A}\right) \frac{f_{R}'}{C^2}\right\} \right] \nonumber \\&\quad =\left\{ \frac{\dot{B}}{B} \left( \frac{\dot{A}}{A}-\frac{\dot{C}}{C}\right) -\frac{\ddot{C}}{C}\right. \nonumber \\&\qquad \left. +\frac{\dot{C}\dot{A}}{CA}-\frac{\ddot{B}}{B}\right\} \frac{C^2}{A^2}\nonumber \\&\qquad +\left\{ \frac{A'}{A}\left( \frac{B'}{B}-\frac{C'}{C}\right) +\frac{B''}{B}-\frac{B'C'}{BC}+\frac{A''}{A}\right\} \frac{B^2}{C^2}, \end{aligned}$$
(18)
$$\begin{aligned}&\frac{\kappa }{f_{R}}\left[ C^{2}({P_z}+{\varepsilon })-\frac{s^2}{8\pi B^4C^2}\right. \nonumber \\&\qquad \left. +\frac{C^2}{\kappa }\left\{ \frac{\ddot{f_R}}{A^2}-\frac{f_{R}'}{C^2}\left( \frac{A'}{A} +\frac{9f'_R}{4f_R}+\frac{2B'}{B}\right) -\frac{f_R}{2}\right. \right. \nonumber \\&\qquad \times \left( R-\frac{f}{f_R}\right) \left. \left. +\frac{\dot{f_{R}}}{A^2}+\left( \frac{2\dot{B}}{B} -\frac{\dot{f_R}}{4f_R}-\frac{\dot{A}}{A}\right) \right\} \right] \nonumber \\&\quad =\left\{ \left( \frac{2\dot{A}}{A}-\frac{\dot{B}}{B}\right) \frac{\dot{B}}{B}-\frac{2\ddot{B}}{B}\right\} \frac{C^2}{A^2}\nonumber \\&\qquad +\frac{B'}{B}\left( \frac{B'}{B}+\frac{2A'}{A}\right) . \end{aligned}$$
(19)

To describe the quantity of matter within the planar system, the mass function can be evaluated through the Taub mass formalism in the presence of an electromagnetic field as [42]

$$\begin{aligned} m(t,z)=\frac{(g)^{\frac{3}{2}}}{2}{R^{~~12}_{12}}+\frac{s^2}{2B} =\frac{B}{2}\left( \frac{\dot{B}^2}{A^2}-\frac{B'^2}{C^2}\right) +\frac{s^2}{2B},\nonumber \\ \end{aligned}$$
(20)

which can be written in an alternative way using the fluid velocity as

$$\begin{aligned} \mathbb {E}\equiv \frac{B'}{C}=\sqrt{U^{2}-\frac{2m(t,r)}{B}+\frac{s^2}{B^2}}. \end{aligned}$$
(21)

Using Eqs. (16)–(19), the temporal and radial variations of the mass function lead to

$$\begin{aligned} D_{T}m&=-\frac{\kappa }{2f_{R}}\left\{ U\left( \hat{P_z} -2\pi {E}^2+\frac{{\mathcal {T}_{33}}}{C^2}\right) +\mathbb {E}\left( \hat{q} -\frac{{\mathcal {T}_{03}}}{AC}\right) \right\} B^2\nonumber \\&\quad +8\pi ^2B^2E(2{\dot{E}}B+3{E}\dot{B}), \end{aligned}$$
(22)
$$\begin{aligned} D_{B}m&=\frac{\kappa }{2f_{R}}\left\{ \hat{\mu }+\frac{ {\mathcal {T}_{00}}}{A^2}+2\pi {E}^2+\frac{U}{\mathbb {E}}\left( \hat{q} -\frac{{\mathcal {T}_{03}}}{CA}\right) \right\} B^2\nonumber \\&\quad +8\pi B^2{E}B'\times (2B{E}'+3{E}B'), \end{aligned}$$
(23)

where U is the velocity of the collapsing matter defined by \(U=D_{T}B\) where \((D_{T}=\frac{1}{A} \frac{\partial }{\partial t})\) while \(\hat{P_r}=P_r+{\varepsilon },~\hat{q}=q+{\varepsilon },~ \hat{\mu }=\mu +{\varepsilon }\), and \(D_{B}=\frac{1}{B'}\frac{\partial }{\partial r}\) represents the radial derivative operator, respectively. Here E denotes the electric field intensity. It is interesting to indicate that for a planar celestial configuration undergoing collapse, U is chosen to be less than unity. The link between matter variables and the mass function can be found through integration of Eq. (23) with a Palatini f(R) background:

$$\begin{aligned} \frac{3m}{B^3}&=\frac{3\kappa }{2B^3}\int ^z_{0}\left[ \frac{1}{f_{R}} \left\{ \hat{\mu }+2\pi {E}^2+\frac{{\mathcal {T}_{00}}}{A^2} +\left( \hat{q}-\frac{{\mathcal {T}_{03}}}{CA}\right) \frac{U}{\mathbb {E}}\right\} B^2B'\right. \nonumber \\&\quad +\left. 8\pi EB^2(2BE'+3EB')\right] \mathrm{d}z. \end{aligned}$$
(24)

The electric component of the Weyl tensor in terms of the unit four velocity and radial four vector is given as

$$\begin{aligned} E_{\alpha \beta }= \mathcal {E}\left[ \chi _{\alpha }\chi _{\beta }-\frac{1}{3} (g_{\alpha \beta }+V_\alpha V_\beta )\right] , \end{aligned}$$

where

$$\begin{aligned} \mathcal {E}&= \left[ \frac{\ddot{B}}{B}+\left( \frac{\dot{C}}{C} -\frac{\dot{B}}{B}\right) \left( \frac{\dot{B}}{B}+\frac{ \dot{A}}{A}\right) -\frac{\ddot{C}}{C}\right] \frac{1}{A^{2}}\nonumber \\&\quad -\left[ \frac{C''}{C}-\left( \frac{C'}{C}+\frac{B'}{B}\right) \left( \frac{B'}{B}-\frac{A'}{A}\right) -\frac{A''}{A}\right] \frac{1}{C^{2}} \end{aligned}$$
(25)

is the scalar encapsulating the effects of spacetime curvature. Alternatively, using Eqs. (16) and (18)–(20), we get

$$\begin{aligned} \frac{3m}{B^3}&=\frac{\kappa }{2f_R}\left( \hat{\mu }-\hat{\Pi } +\frac{{\mathcal {T}_{00}}}{A^2}-\frac{{\mathcal {T}_{33}}}{C^2} +\frac{{\mathcal {T}_{11}}}{B^2}+6\pi {E}^2\right) -\mathcal {E}, \end{aligned}$$
(26)

where \(\hat{\Pi }=\hat{P}_z-P_\bot \). The above equation determines the gravitational contribution of planar geometry due to its fluid variables, mass function, and extra curvature f(R) terms.

3 Dynamical and evolution equations

In this section, we will establish some scalar functions in the background of a well-consistent f(R) model. We then show a correspondence between fluid parameters and the Weyl scalar with Palatini f(R) corrections by constructing modified Ellis equations. In order to discuss the dynamical properties framed within the modified cosmology, we take the f(R) model as follows [46]:

$$\begin{aligned} f(R)=R-\mu R_c\tanh \left( \frac{R}{R_c}\right) , \end{aligned}$$
(27)

where \(\mu \) and \(R_c\) are positive constants. The values of these free parameters are \(R_c\sim H_0^2\sim \frac{8\rho _c}{3m_p^2}\simeq 10^{-84}GeV ^2,\) where \(R_c\) is roughly of the same order as the Ricci scalar today, \(H_0\) is the present day value of the Hubble constant, and the critical density \(\rho _c\simeq 10^{-29}gr/cm ^3\sim 4.5\times 10^{-47}GeV ^4\). We categorize the Riemann tensor in terms of second rank tensors, i.e., \(X_{\alpha \beta }\) and \(Y_{\alpha \beta }\), to devise a modified form of the structure scalars as [43, 44]

$$\begin{aligned} X_{\alpha \beta }&=~^{*}R^{*}_{\alpha \mu \beta \nu }V^{\mu }V^{\nu }= \frac{1}{2}\eta ^{\epsilon \rho }_{~~\alpha \mu }R^{*}_{\epsilon \rho \beta \nu }V^{\mu }V^{\nu },\nonumber \\ Y_{\alpha \beta }&=R_{\alpha \mu \beta \nu }V^{\mu }V^{\nu }, \end{aligned}$$

where left, right, and double dual of the Riemann curvature tensor can be, respectively, written in a standard form as

$$\begin{aligned} ^{*}R_{\alpha \beta \gamma \delta }&\equiv \frac{1}{2}\eta _{ \alpha \beta \varepsilon \rho }R^{\varepsilon \rho }_{~~\gamma \delta },\quad R^{*}_{\alpha \beta \gamma \delta }\equiv \frac{1}{2}\eta _{\varepsilon \rho \gamma \delta }R^{\epsilon \rho }_{~~\alpha \beta },\nonumber \\ ^{*}R^{*}_{\alpha \beta \gamma \delta }&\equiv \frac{1}{2}\eta _{\alpha \beta } ^{~~\varepsilon \rho }R^{*}_{\varepsilon \rho \gamma \delta }. \end{aligned}$$

The above tensors can further be split into their trace and trace-free components as

$$\begin{aligned} X_{\alpha \beta }&=\frac{1}{3}X_{T}h_{\alpha \beta } +X_{TF}\left( \chi _{\alpha }\chi _{\beta }-\frac{1}{3}h_{\alpha \beta } \right) ,\end{aligned}$$
(28)
$$\begin{aligned} Y_{\alpha \beta }&=\frac{1}{3}Y_{T}h_{\alpha \beta }+Y_{TF}\left( \chi _{\alpha }\chi _{\beta } -\frac{1}{3}h_{\alpha \beta }\right) . \end{aligned}$$
(29)

By making use of Eqs. (16), (18), (19), and (27)–(29), these scalar functions can be written in terms of fluid variables as

$$\begin{aligned} X_{T}&=\frac{\kappa {R_c}(R_c^2+\tilde{R}^2)^{(n+1)}}{R_c(R_c^2+\tilde{R}^2)^{(n+1)}-2n{\lambda }\tilde{R}R_c^{(2n+2)}} \left( \hat{\mu }+\frac{\delta _\mu }{A^2}\right) ,\end{aligned}$$
(30)
$$\begin{aligned} X_{TF}&=-\mathcal {E}-\frac{\kappa {R_c}(R_c^2+\tilde{R}^2)^{(n+1)}}{2\left[ R_c(R_c^2+\tilde{R}^2)^{(n+1)}-2n{\lambda }\tilde{R}R_c^{(2n+2)}\right] }\nonumber \\&\quad \times \left( \hat{\Pi }-2W{\eta }+\frac{\delta _{P_z}}{C^2} -\frac{\delta _{P_\bot }}{B^2}\right) ,\end{aligned}$$
(31)
$$\begin{aligned} Y_{T}&=\frac{\kappa {R_c}(R_c^2+\tilde{R}^2)^{(n+1)}}{2\left[ R_c(R_c^2+\tilde{R}^2)^{(n+1)}-2n{\lambda }\tilde{R}R_c^{(2n+2)}\right] }\nonumber \\&\quad \times \left( \hat{\mu }+\frac{\delta _\mu }{A^2}+\frac{\delta _{P_z}}{C^2} +\frac{2\delta _{P_\bot }}{B^2}+3\hat{P_{r}}-2\hat{\Pi }\right) , \end{aligned}$$
(32)
$$\begin{aligned} Y_{TF}&=\mathcal {E}-\frac{\kappa {R_c}(R_c^2+\tilde{R}^2)^{(n+1)}}{2\left[ R_c(R_c^2+\tilde{R}^2)^{(n+1)}-2n{\lambda }\tilde{R}R_c^{(2n+2)}\right] }\nonumber \\&\quad \times \left( \hat{\Pi }-2{\eta }W+\frac{\delta _{P_z}}{C^2}-\frac{\delta _{P_\bot } }{B^2}\right) , \end{aligned}$$
(33)

where \(\delta _{\mu },~\delta _{P_z}\), and \(\delta _{P_\bot }\) are the corresponding values of dark source components evaluated by taking into account Eq. (27) and given in Appendix A. We found that the trace part of the second dual of the Riemann tensor has its dependence on the energy density profile of planar geometry with some extra curvature terms due to f(R) Palatini gravity while the remaining scalar functions have their dependence on the anisotropic stress tensor. The conservation of energy and momentum from the contracted Bianchi identities with ordinary and effective matter fields,

$$\begin{aligned} \left( \overset{(D)}{T^{\alpha \beta }+T^{\alpha \beta }}\right) _{;\beta }=0,\quad \left( \overset{(D)}{T^{\alpha \beta }+T^{\alpha \beta }}\right) _{;\beta }=0, \end{aligned}$$

yields the couple of equations

$$\begin{aligned}&\frac{\dot{\hat{\mu }}}{A}+\frac{\hat{q}'}{C}+\frac{1}{A}\left( \frac{ \dot{C}}{C}+\frac{\dot{f_R}}{2f_R}\right) (\hat{P_z}+\mu )+\frac{ 1}{A}(\mu +P_\bot )\nonumber \\&\quad \times \left( \frac{2\dot{B}}{B}+\frac{\dot{f_R}}{f_R}\right) +\frac{\mu \dot{f_R}}{Af_R}+\frac{\hat{q}}{C}\left( \frac{2A'}{A}+\frac{3f'_R}{f_R}+\frac{ 2B'}{B}\right) \nonumber \\&\quad +\frac{D_0(t,r)}{\kappa }+\frac{6 \pi E^2\dot{f_R}}{A^2f_R}=0,\end{aligned}$$
(34)
$$\begin{aligned}&\frac{\dot{\hat{q}}}{C}+\frac{\hat{P_z}'}{C}+\frac{1}{C}\left( \frac{ A'}{A}+\frac{f'_R}{2f_R}\right) (\mu +\hat{P_z})\nonumber \\&\quad +\left( \frac{2B'}{B}+\frac{f'_R}{f_R}\right) (\hat{P_z}-P_{\bot })\frac{1}{C} +\frac{\hat{P_z}f'_R}{Cf_R}\nonumber \\&\quad +\frac{\hat{q}}{A}\left( \frac{2\dot{C}}{C}+\frac{3\dot{f_R}}{f_R}+\frac{2\dot{B}}{B}\right) +\frac{D_1(t,r)}{\kappa }\nonumber \\&\quad -\frac{4\pi {E}}{BC^2} (B{E}'+2{E}B')-4\pi \frac{E^2f'_R}{C^2f_R}=0, \end{aligned}$$
(35)

where the terms \(D_0\) and \(D_1\) emerge due to Palatini f(R) gravity and they are addressed in Appendix A. Next, we continue our investigation by constructing a couple of differential equations using the procedure adopted by Ellis [47]. These equations are found by using Eqs. (16)–(19), (22), (23), and (27) and define a link between matter variables with Palatini f(R) extra curvature terms and the Weyl tensor, thus

$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{R}{R_c}\right) \right] }\left( \hat{\mu } -\hat{\Pi }+6\pi E^2\right. \right. \nonumber \\&\qquad \left. \left. +\frac{\delta _\mu }{A^2}-\frac{\delta _{P_z}}{C^2}+\frac{ \delta _{P_\bot }}{B^2}\right) \right] ^{.}\nonumber \\&\quad =\frac{3\dot{B}}{B}\left[ \frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{R}{R_c}\right) \right] }\left( \hat{\mu }+ {P_\bot }+\frac{\delta _\mu }{A^2}+\frac{\delta _{P_\bot }}{B^2} \right) \right. \nonumber \\&\qquad \left. +4\pi E^2-\mathcal {E}\right] +\frac{3\kappa }{2\left[ 1-\mu sech ^2\left( \frac{R}{R_c}\right) \right] }\left( \frac{AB'}{BC}\right) \nonumber \\&\qquad \times \left( \hat{q}-\frac{\delta _q}{AB}\right) +\frac{24\pi ^2E}{B}\left( 2B\dot{E} +3E\dot{B}\right) , \end{aligned}$$
(36)
$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{R}{R_c}\right) \right] }\left( \hat{\mu }-\hat{\Pi }\right. \right. \nonumber \\&\quad \left. \left. \phantom {\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{R}{R_c}\right) \right] }\left( \hat{\mu }-\hat{\Pi }\right. \right. }+6\pi E^2+\frac{\delta _\mu }{A^2}-\frac{\delta _{P_z}}{C^2} +\frac{\delta _{P_\bot }}{B^2}\right) \right] _{,1}\nonumber \\&\quad =-\frac{3{B'}}{B}\left[ \frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{R}{R_c}\right) \right] } \left( \hat{\mu }+2\pi E^2+\frac{\delta _\mu }{A^2}\right) -\frac{3m}{B^3}\right] \nonumber \\&\qquad -\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{R}{R_c}\right) \right] } \left( \frac{\dot{B}C}{AB}\right) \left( \hat{q}-\frac{\delta _q}{CA}\right) \nonumber \\&\qquad +\frac{24\pi ^2E}{B}\left( 2E'B+3EB'\right) , \end{aligned}$$
(37)

where \(\delta _q\) is shown in Appendix A. The limit \(f(R)\rightarrow R\) in the above equations provides the GR Ellis equations.

4 Irregularities in the dynamical system

This section explores some fluid variables that are responsible for irregularities in the dynamical system having planar symmetry. This analysis has been carried out from an initial homogeneous configuration of a compact body by means of some particular choices on the matter fields with extra curvature terms of Palatini f(R) gravity. We will restrict our analysis to the present day value of the cosmological Ricci scalar, i.e., \(R=\tilde{R}\), while dealing with a bulky system of equations. Finally, we will study the case with zero expansion. We classify our investigations in two scenarios, i.e., dissipative and non-dissipative systems, as follows.

4.1 Non-radiating matter

This section deals with non-dissipative choices of matter fields like dust, perfect and anisotropic fluid configurations, respectively, in the Palatini f(R) gravity back ground.

4.1.1 Dust fluid

In this case, we consider \(\hat{P}_z=0=P_\bot =\hat{q}\) and \(A=1\) indicating geodesic motion of a non-dissipative dust cloud. In this scenario, the two differential equations for the Weyl tensor obtained in (36) and (37) reduce to

$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\qquad \times \left. \left\{ {\mu }+6\pi E^2-\frac{\mu \tilde{R}}{2}+\frac{\mu }{2}\tanh \left( \frac{\tilde{R}}{R_c}\right) \right. \right. \nonumber \\&\qquad \times \left. \left. \left\{ \tilde{R} \tanh \left( \frac{\tilde{R}}{R_c}\right) -R_c\right\} \right\} \right] ^{.}\nonumber \\&\quad =\frac{3\dot{B}}{B}\left[ \frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\left( \mu +4\pi E^2\right) \right] \nonumber \\&\qquad +\frac{24\pi ^2E}{B}\left( 2\dot{E}B+3E\dot{B}\right) ,\end{aligned}$$
(38)
$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\qquad \times \left. \left\{ {\mu }+6\pi E^2-\frac{\mu \tilde{R}}{2}+\frac{\mu }{2}\tanh \left( \frac{\tilde{R}}{R_c}\right) \right. \right. \nonumber \\&\qquad \times \left. \left. \left\{ \tilde{R} \tanh \left( \frac{\tilde{R}}{R_c}\right) -R_c\right\} \right\} \right] '\nonumber \\&\quad =-\frac{3{B'}}{B}\mathcal {E}-\frac{6\kappa \pi E^2B'}{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] B}+\frac{24\pi ^2E}{B}\nonumber \\&\qquad \times \left( 2E'B+3EB'\right) . \end{aligned}$$
(39)

When \(\mu '=0\), Eq. (39) leads to

$$\begin{aligned} {\mathcal {E}}'+\frac{3{B'}}{B}\mathcal {E}&=\frac{6\pi \kappa E}{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\left( E'-\frac{EB'}{B} \right) \nonumber \\&\quad +\frac{24E\pi ^2}{B}\left( 2E'B+3EB'\right) . \end{aligned}$$
(40)

The general solution of the above equation is obtained:

$$\begin{aligned} {\mathcal {E}}&=\frac{6\pi }{B^3}\int ^z_0\left[ \frac{\kappa EB^3}{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\quad \times \left. \phantom {\left[ \frac{\kappa EB^3}{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. }\left( E'-\frac{EB'}{B}\right) +3\pi EB^2\left( 2E'B+3E'B\right) \right] \mathrm{d}z. \end{aligned}$$
(41)

It is worth noting that the Weyl scalar is the only geometric entity responsible for the irregularities in the energy density, depending upon the electromagnetic profile. In the absence of an electromagnetic field, the Weyl scalar will also vanish showing the importance of charged fields. By making use of Eqs. (11), (34), and (A3)–(A6) in Eq. (38), we found

$$\begin{aligned} \dot{\mathcal {E}}+\frac{3\dot{B}}{B}\mathcal {E}&=\frac{-\kappa \mu W_{\mathrm{GR}}}{2\left[ 1-\mu {\tanh }^2\left( \frac{\tilde{R}}{R_c}\right) \right] }+\frac{6\pi ^2\kappa E}{\left[ 1-\mu {\tanh }^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\nonumber \\&\quad \times \left( \dot{E}+\frac{E\dot{B}}{B}\right) +\frac{24\pi ^2E}{B} \left( 2\dot{E}B+3E\dot{B}\right) . \end{aligned}$$
(42)

The above equation reveals the relationship of the Weyl scalar with shear scalar indicating the shearing motion of dust cloud. It also shows that the system will be homogeneous if it is shear free as well as conformally flat within the Palatini framework of f(R) gravity. Its solution turns out to be

$$\begin{aligned} {\mathcal {E}}&=\frac{\kappa }{2B^3\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\nonumber \\&\quad \times \int _0^t\left[ -\mu W_{\mathrm{GR}}+12\pi E\left( \frac{E\dot{B}}{B}+\dot{E}\right) \right] B^3\mathrm{d}t\nonumber \\&\quad +\frac{12\pi ^2}{B^3} \int _0^t\left[ EB^3\left( 2\dot{E}B+3E\dot{B}\right) \right] \mathrm{d}t. \end{aligned}$$
(43)

The role of expansion can be made clear while discussing the inhomogeneities on the evolution of dust matter in the collapse scenario. We study the zero expansion case, i.e., \(\Theta _P=0\), so that the above equation becomes

$$\begin{aligned} {\mathcal {E}}&=\frac{\kappa }{2B^3\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\\&\quad \times \int _0^t\left[ \frac{3\mu \dot{B}}{B}+12\pi E\left( \frac{E\dot{B}}{B}+\dot{E}\right) \right] B^3\mathrm{d}t\\&\quad +\frac{12\pi ^2}{B^3} \int _0^t\left[ EB^3\left( 2\dot{E}B+3E\dot{B}\right) \right] \mathrm{d} t. \end{aligned}$$

It shows that the expansion-free system will be inhomogeneous due to the presence of the Weyl scalar, as it produces tidal forces which make the object inhomogeneous with the passage of time, thus indicating the importance of time. Moreover, in the absence of tidal forces, the system will be inhomogeneous due to the presence of the electromagnetic field. Consequently, an expansion-free system will be homogeneous if it is charge free and conformally flat.

4.1.2 Isotropic fluid

In this case, we introduce a bit of complexity into the previous case by adding the effects of isotropic pressure and we determine the inhomogeneity factors. In this scenario, the Ellis equations (36) and (37) turn out to be

$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\qquad \times \left[ \mu +6\pi E^2-\frac{\mu \tilde{R}}{2}+\frac{\mu }{2}\tanh \left( \frac{\tilde{R}}{R_c}\right) \right. \nonumber \\&\qquad \times \left. \left. \left\{ \tilde{R}\tanh \left( \frac{\tilde{R}}{R_c}\right) -R_c\right\} \right] \right] \nonumber \\&\quad =\frac{3\dot{B}}{B}\left[ \frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }(\mu +P+4\pi E^2)-\mathcal {E}\right] \nonumber \\&\qquad +\frac{24\pi ^2E}{B}\times \left( 2\dot{E}B+3E\dot{B}\right) ,\end{aligned}$$
(44)
$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\qquad \times \left[ \mu +6\pi E^2-\frac{\mu \tilde{R}}{2}+\frac{\mu }{2}\tanh \left( \frac{\tilde{R}}{R_c}\right) \right. \nonumber \\&\qquad \times \left. \left. \left\{ \tilde{R}\tanh \left( \frac{\tilde{R}}{R_c}\right) -R_c\right\} \right] \right] '\nonumber \\&\quad =-\frac{3B'}{B}\left[ \mathcal {E}-\frac{2\kappa \pi E^2}{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right] \nonumber \\&\qquad +\frac{24\pi ^2E}{B}(2E'B+2EB'). \end{aligned}$$
(45)

We see that the second equation is the same as the one we have evaluated in the above case with a dust cloud (see Eq. (38)). Therefore, this indicates the Weyl scalar as the factor responsible of irregularities in the matter distribution. By making use of Eqs. (11) and (34), Eq. (44) leads to

$$\begin{aligned} \dot{\mathcal {E}}+\frac{3\dot{B}}{B}\mathcal {E}&=\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\nonumber \\&\quad \times \left[ -W_{\mathrm{GR}}(\mu +P)A+12\pi E\left( \dot{E}+\frac{E\dot{B}}{B}\right) \right] \nonumber \\&\quad +\frac{24\pi ^2E}{B}(2\dot{E}B+3E\dot{B}), \end{aligned}$$
(46)

which on integration turns out to be

$$\begin{aligned} {\mathcal {E}}&=\frac{\kappa }{2B^3\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\nonumber \\&\quad \times \int _0^t\left[ -W_{\mathrm{GR}}(\mu +P)A+ 12\pi E\left( \dot{E}+\frac{E\dot{B}}{B}\right) \right] B^3\mathrm{d}t\nonumber \\&\quad +\frac{24\pi ^2}{B^3}\int _0^t\left[ EB^2(2\dot{E}B+3E\dot{B})\right] \mathrm{d}t. \end{aligned}$$
(47)

This indicates the importance of shear on the evolution of an inhomogeneous matter configuration with isotropic pressure. We observed that not only shear and pressure, but extra curvature terms due to f(R) gravity are acting on the system to make it inhomogeneous as the evolution proceeds. We can also examine the factors responsible for irregularities over the relativistic system with zero shear. Moreover, we have already obtained a relation between expansion and the shear scalar, therefore, we can analyze those effects when the system is undergoing collapse with zero expansion. Under the zero expansion condition, Eq. (46) yields

$$\begin{aligned} {\mathcal {E}}&=\frac{3\kappa }{2B^3\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\nonumber \\&\quad \times \int _0^t\left[ \frac{\dot{B}}{B}\left\{ (\mu +P)A+4\pi E^2\right\} +12\pi E\dot{E}\right] B^3\mathrm{d}t\nonumber \\&\quad +\frac{24\pi ^2}{B^3}\int _0^t\left[ EB^2(2\dot{E}B+3E\dot{B})\right] \mathrm{d}t. \end{aligned}$$
(48)

It is seen from the above expression that electromagnetic field have also a crucial role to play in the expansion-free scenario. The Weyl scalar also plays a key role due to tidal forces making the system more inhomogeneous with the passage of time.

4.1.3 Anisotropic fluid

This case generalizes the previous one by introducing the complexity in the form of anisotropic stresses while the dissipative effects are assumed to be zero, i.e., \(\Pi \ne 0\) and \(\hat{q}=0\). In this framework, the two equations obtained in (36) and (37) take the form

$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\qquad \times \left. \left[ \mu -\Pi +6\pi E^2-\frac{\mu R}{2}+\frac{\mu }{2}\tanh \left( \frac{R}{R_c}\right) \right. \right. \nonumber \\&\qquad \times \left. \left. \left\{ R\tanh \left( \frac{R}{R_c}\right) -R_c\right\} \right] \right] _{,0}\nonumber \\&\quad =\frac{3\dot{B}}{B}\left[ \frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] } \left\{ \mu +P_\bot +4\pi E^2\right\} -\mathcal {E}\right] \nonumber \\&\qquad +\frac{24\pi ^2E}{B}(2\dot{E}B+3E\dot{B}), \end{aligned}$$
(49)
$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\quad \times \left. \left[ \mu +6\pi E^2-\Pi +\frac{\mu R}{2}+\frac{\mu }{2}\tanh \left( \frac{R}{R_c}\right) \right. \right. \nonumber \\&\quad \times \left. \left. \left\{ R\tanh \left( \frac{R}{R_c}\right) -R_c\right\} \right] \right] '\nonumber \\&\quad -\frac{3B'}{B}\left[ \mathcal {E}+\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\left[ \Pi -4\pi E^2\right] \right] \nonumber \\&\quad +\frac{24\pi ^2E}{B}\left( 2E'B+3EB'\right) . \end{aligned}$$
(50)

We can find the following couple of equations by using Eqs. (11) and (34) in (49) and (50) with some computation:

$$\begin{aligned}&\left[ \mathcal {E}+\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }(\Pi -4\pi E^2)\right] ^{.}\\&\quad +\frac{3\dot{B}}{B}\left[ \frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. (\Pi -4\pi E^2)\left. +\mathcal {E}\right] \\&=\frac{-\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }(\mu +P_z)AW_{\mathrm{GR}}\\&\quad +\frac{3\kappa \pi \dot{B}E^2}{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] B}\\&\quad +\frac{\kappa \pi \dot{B}}{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] B}+\frac{2\kappa \pi \dot{E}E}{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] },\\&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }(\mu +\Pi -2\pi E^2)\right] '\nonumber \\&=-\frac{3B'}{B}\left[ \frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \\&\quad \times \left. (\Pi -4\pi E^2)+\mathcal {E}\right] +\frac{24\pi ^2E}{B}(2E'B+3EB'). \end{aligned}$$

Using the trace-free part of the second dual of Riemann tensor as obtained in Eq. (31), we find

$$\begin{aligned} \dot{X}_{TF}+\frac{3X_{TF}\dot{B}}{B}&=\frac{\kappa }{\left[ 1-\mu sech ^2\left( \frac{\tilde{\tilde{R}}}{R_c}\right) \right] }\left\{ \frac{AW_{\mathrm{GR}}}{2}(\mu +P_z)\right. \\&\quad \left. -\frac{\Pi \dot{B}}{B}+\pi E\left( \frac{3E\dot{B}}{B}+2\dot{E}\right) \right\} ,\\ X'_{TF}+\frac{3X_{TF}{B'}}{B}&=\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\left[ \mu '+4\pi EE'\right] \\&\quad +\frac{24\pi ^2E}{B}(2E'B+3EB'). \end{aligned}$$

The solution of the above couple of differential equations turns out to be

$$\begin{aligned} X_{TF}&=-\frac{\kappa }{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\nonumber \\&\quad \times \int _0^t\left[ \Pi \dot{B}-\frac{AW_{\mathrm{GR}}}{2}(\mu +P_z)B\right. \nonumber \\&\quad \left. -\pi EB\left( \frac{3E\dot{B}}{B}+2\dot{E}\right) \right] B^2\mathrm{d}t,\end{aligned}$$
(51)
$$\begin{aligned} X_{TF}&=\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\nonumber \\&\quad \times \int _0^z(\mu '+4\pi EE')B^3\mathrm{d}z+\frac{24\pi ^2}{B^3}\int _0^zEB^2\nonumber \\&\quad \times (2E'B+3EB')\mathrm{d}z. \end{aligned}$$
(52)

Equation (51) shows a relation of one of the scalar functions, from the splitting of the Riemann tensor, with the anisotropic pressure and shear scalar. It indicates the importance of these material variables with a planar geometry in the discussion of an irregular energy distribution. Now, the factor that controls inhomogeneities over the compact system is the trace-free part of the double dual of the Riemann tensor, which is obtained through the orthogonal splitting of the Riemann tensor in the framework of Palatini f(R) gravity, as seen from Eq. (52). It is well known that these scalar functions play a crucial role in the structure formation of the universe. Also, the solution of the field equations in the static case can be written in the form of these scalar functions. We found that in the absence of an electromagnetic field, \(X_{TF}\) is the factor describing the irregularities in the star configuration. Consequently, if \(X_{TF}=0\) then the matter distribution in the charge-free system will be homogeneous and vice versa. Next, we discuss the case of collapsing matter with zero expansion in the presence of anisotropic pressure. In this scenario, the solution of Eq. (49) becomes

$$\begin{aligned} X_{TF}&=-\frac{\kappa }{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\nonumber \\&\quad \times \int _0^t\left[ \Pi \dot{B}+\frac{3A}{2}(\mu +P_z)\dot{B}-\pi EB\right. \nonumber \\&\quad \times \left. \left( \frac{3E\dot{B}}{B}+2\dot{E}\right) \right] B^2\mathrm{d}t, \end{aligned}$$
(53)

which yields a link of the structure scalar with the energy density and pressure anisotropy in the arrow of time with extra curvature terms due to Palatini f(R) gravity. We know that in the expansion-free system, the center is surrounded by another spacetime appropriately matched with the rest of the system.

4.2 Radiating dust fluid

This section explores the inhomogeneity factors with dissipation in both the diffusion and the free-streaming limit, but in the particular case of a charged dust cloud. For this purpose, we take \(P_z=0=P_\bot \) in the matter field and the motion is considered to be geodesic by assuming \(A=1\) in the geometric part, which is well justified on the basis of some theoretical advances made in the discussion of inhomogeneous matter distribution. In this framework, Eqs. (36) and (37) yield

$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\qquad \times \left. \left\{ \bar{\mu }+6\pi E^2-\frac{\mu \tilde{R}}{2}+\frac{\mu }{2}\tanh \left( \frac{\tilde{R}}{R_c}\right) \right. \right. \nonumber \\&\qquad \times \left. \left. \left[ \tilde{R}\tanh \left( \frac{\tilde{R}}{R_c}\right) -R_c\right] \right\} \right] ^{.}\nonumber \\&\quad =\frac{3\dot{B}}{B}\left[ \frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }(\tilde{\mu }+4\pi E^2)-\mathcal {E}\right] \nonumber \\&\qquad +\frac{3\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\frac{qAB'}{BC}\nonumber \\&\qquad +\frac{24\pi ^2E}{B}(2\dot{E}B+3E\dot{B}),\end{aligned}$$
(54)
$$\begin{aligned}&\left[ \mathcal {E}-\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\qquad \times \left. \left\{ \bar{\mu }+6\pi E^2-\frac{\mu \tilde{R}}{2}+\frac{\mu }{2}\tanh \left( \frac{\tilde{R}}{R_c}\right) \right. \right. \nonumber \\&\qquad \times \left. \left. \left[ \tilde{R}\tanh \left( \frac{\tilde{R}}{R_c}\right) -R_c\right] \right\} \right] '\nonumber \\&\quad =-\frac{3B'}{B}\left[ \mathcal {E}+\frac{2\kappa \pi E^2}{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right] \nonumber \\&\qquad -\frac{3\kappa \dot{B}C\bar{q}}{2AB'\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }+\frac{24\pi ^2E}{B}(2E'B+3EB'). \end{aligned}$$
(55)

Consider

$$\begin{aligned}&\Psi \equiv \mathcal {E}+\frac{1}{B^3}\int _0^z\frac{3\kappa B^2C\dot{B}\bar{q}}{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\mathrm{d}z. \end{aligned}$$
(56)

If we consider the matter distribution to be homogeneous i.e., \(\mu '=0\), then from Eq. (55) we obtain the following expression:

$$\begin{aligned} \Psi&=\frac{1}{B^3}\int _0^z\left[ 6\pi EB^3E'\left\{ \frac{\kappa }{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }+8\pi \right\} \right. \nonumber \\&\quad +\left. 6\pi E^2B^2B'\left\{ 12\pi -\frac{\kappa }{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right\} \right] \mathrm{d}z, \end{aligned}$$
(57)

which should be vanishing for the homogeneous fluid distribution over planar geometry. Consequently, for a homogeneous universe with planar topology, one should have \(\Psi =0\Leftrightarrow \mu '=0\) with a dissipative charged dust cloud. The evolution equation for \(\Psi \) can also be evaluated using Eqs. (11) and (34) in Eq. (54) as

$$\begin{aligned} \dot{\Psi }-\frac{\dot{\Omega }}{B^3}&=\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\nonumber \\&\quad \times \left[ -\tilde{\mu }W_{\mathrm{GR}}-\frac{\tilde{q}}{C} +\frac{\tilde{q}B'}{BC}\right] -\frac{3\dot{B}\Psi }{B}\nonumber \\&\quad +6\pi EE'\left( \frac{\kappa }{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }+8\pi \right) \nonumber \\&\quad +\frac{6\pi E^2\dot{B}}{B}\left( 12\pi +\frac{\kappa }{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right) , \end{aligned}$$
(58)

whose solution leads to

$$\begin{aligned} \Psi&=\frac{1}{B^3}\int _0^t\left[ \dot{\Omega }+\frac{\kappa }{2\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right. \nonumber \\&\quad \times \left. \left\{ -\tilde{ \mu }W_{\mathrm{GR}}B-\frac{\tilde{q}B}{C}+\frac{\tilde{q}B'}{C}\right\} +6\pi EB^3\dot{E}\right. \nonumber \\&\quad \times \left. \left( \frac{\kappa }{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }+8\pi \right) +6\pi E^2B^2\dot{B}\right. \nonumber \\&\quad \times \left. \left( 12\pi +\frac{\kappa }{\left[ 1-\mu sech ^2\left( \frac{\tilde{R}}{R_c}\right) \right] }\right) \right] \mathrm{d}t. \end{aligned}$$
(59)

This indicates the importance of fluid parameters as the inhomogeneity factor, related to the matter variables, particularly heat flux, as well as kinematical quantities of the system. We already found a relation in which the shear scalar is related to the expansion scalar. Thus, for the shear-free case, we obtain

$$\begin{aligned} \frac{\dot{B}}{B}=\frac{A\Theta _p}{3}-\frac{2}{3}\frac{\dot{f_R}}{f_R}. \end{aligned}$$

Using the above equation in Eq. (35), we find

$$\begin{aligned} \dot{q}&+\left[ \frac{2\mu R'}{R_c}sech^2\left( \frac{R}{R_c}\right) \tanh \left( \frac{R}{R_c}\right) \left[ 1-\mu sech ^2\left( \frac{{R}}{R_c}\right) \right] ^{-1}\right] \nonumber \\&\quad \times \left( \frac{\mu }{2C}-\frac{4\pi E^2}{C^2}\right) \nonumber \\&\quad -\frac{4\pi E}{BC^2}(BE'+2EB')+\frac{2q}{3}\left[ 2\Theta _p+\frac{\mu \dot{R}}{R_c} sech ^2\left( \frac{R}{R_c}\right) \right. \nonumber \\&\quad \times \tanh \left( \frac{R}{R_c}\right) \left. \left[ 1-\mu sech ^2\left( \frac{{R}}{R_c}\right) \right] ^{-1}\right] +D_3=0. \end{aligned}$$
(60)

Next, the transportation of heat in the system can be analyzed through a casual radiating theory defined by Muller and Israel as a second order thermodynamical theory in diffusion approximation as follows:

$$\begin{aligned} \tau \dot{q}&=-\frac{1}{2}\xi {q}K^2\left( \frac{\tau }{{\xi }K^2}\right) _{,0} -\frac{\xi }{B}(AK)'-qA-\frac{1}{2}{\tau }qA\Theta , \end{aligned}$$

whose independent component yields

$$\begin{aligned} \dot{q}=-\frac{q}{\tau }-\frac{\kappa }{C\tau }T'. \end{aligned}$$
(61)

Substituting the value of \(\dot{q}\) from Eq. (60) in the above equation, we obtain

$$\begin{aligned} q&=\left[ \frac{-4\pi E\tau }{r^2B^3}(BE'+2EB')-\frac{\kappa T'}{rB}+D_{3s}\right. \\&\quad \left. +\left[ \frac{2\mu R'}{R_c}sech ^2\left( \frac{R}{R_c}\right) \tanh \left( \frac{R}{R_c}\right) \right. \right. \\&\quad \times \left. \left. \left[ 1-\mu sech ^2\left( \frac{{R}}{R_c}\right) \right] ^{-1}\right] \left( \frac{\mu \tau }{2rB}-\frac{4\pi E^2\tau }{r^2B^2}\right) \right] \\&\quad \times \left[ 1-\frac{4\Theta _p\tau }{3}\right] . \end{aligned}$$

One can identify the relaxation effects by inserting this value in the evolution equation for the inhomogeneity factor in this case, i.e., \(\Psi \) as obtained in Eq. (59). Consequently, the effects of an electromagnetic field with the relaxation time can also be analyzed.

5 Discussion

In this paper, we have investigated some inhomogeneity factors for a self-gravitating plane symmetric model. We have done this analysis by taking an anisotropic matter distribution in the presence of an electromagnetic field. Particular attention has been given to examine the role of dark source terms coming from the modification of the gravitational field. The modification includes higher order curvature terms explicitly due to Palatini f(R) corrections in the field equations. In order to continue our analysis systematically, first of all we have explored the Palatini f(R)-Maxwell field equations for our compact object and define the mass function using Taub’s mass formalism. An expression for the Weyl scalar has been disclosed in terms of matter variables and higher curvature ingredients due to modified gravity.

A set of scalar functions have been evaluated using the splitting of Riemann curvature tensor with comoving coordinate system to address the irregularities in the energy density. These scalar functions are named structure scalars; their physical significance has been analyzed in the literature previously. Also, it is established that these scalars are used to write down solutions of field equations with a static background metric. We have related these scalars in terms of material variables and dark source terms using the field equations and a cosmological f(R) model. Moreover, a couple of equations describing the conservation of energy-momentum in space have been explored. The evolution equations are also investigated using the procedure adopted by Ellis [47]. We have found some factors responsible for inhomogeneities in the matter configuration with some particular cases of fluid distribution.

Particular attention is given to examining the role of the electromagnetic field in this framework. Usually, in the study of relativistic astrophysics compact objects are considered not to have sufficient internal electric fields. It is still feasible that stars can have a total net charge or large internal electric fields. However, it is well established that angular momentum plays the role of electric charge in rotating collapsing stars. In the present study, we have shed some light on a more realistic astrophysical scenario, i.e., the inhomogeneities/irregularities in the universe model. The galaxy distribution is observed to be inhomogeneous at small scales while, according to the theoretical models, it is expected to become spatially homogeneous for \(r>\lambda _0 \approx 10 Mpch^{-1}\) [45].

On the basis of the results we have obtained, it is clear that the system becomes inhomogeneous as the evolution proceeds with time indicating a crucial role of gravitational arrow of time. In the non-radiating dust cloud case, we have found that the system will be homogeneous in the absence of an electromagnetic field as well as tidal forces, which are due to the presence of the Weyl scalar. It shows that the Weyl tensor and the presence of charge make the distribution of matter more inhomogeneous during the evolution of the universe. With the inclusion of isotropic pressure in the matter configuration, the Weyl tensor and electric charge behave similarly to the dust case. In the presence of anisotropic pressure effects in the matter, we have found a particular factor, known as the trace-free component of the dual of the Riemann tensor, responsible for the irregularities in the planar system. In the radiating dust cloud case, we have found that the system will be homogeneous if the factor \(\Psi \) given in Eq. (59) vanishes; otherwise it will make our geometric model more inhomogeneous with evolution in time.

All of our results reduces to the charge-free case [35] in the limit \(s=0\), while our results support the analysis made by [34] in the limit \(f(R)=R\)