1 Introduction

Stars are fascinating objects in the universe. Physicists and astronomers have given ample attention to the evolution and destruction of such objects. After the big bang, lumps of masses, mainly consisting of hydrogen and helium, began to contract under the action of gravity. The process generated heat and pressure at the center, and the fusion of hydrogen atoms started. The fusion process releases a large amount of energy which further catalyzes the process. The pressure generated in the process neutralized the gravitational pull towards the center. The equilibrium of the two forces, however, does not last forever, due to the limited availability of fuel in the form of the hydrogen atoms. And when a star runs out of its fuel, it succumbs to the gravitational pull and the gravitational collapse results. Einstein gave the governing field equations of gravitational collapse. The equations were highly non-linear, so, the exact solutions could not be obtained. Instead, he contented with the rough approximations at the time. Later, Schwarzschild imposed some restrictions on the equations and obtained exact solutions to the simplified model in 1916 [1]. The restrictions included assuming star as a static, spherically symmetric object with homogeneous density and pressureless boundary. The model predicted that the outcome of the collapse process is the formation of a black hole, called the Schwarzschild black hole. But in 1931, Chandrasekhar discovered that the formation of a black hole is not the final fate of every star. Only the stars having mass more than approximately 8 times the solar mass result in black holes. Others that are less heavy do not possess enough gravitational pull that could overcome the electron degeneracy pressure, a repulsive force generated from smashing together of nuclei. The lighter stars result in white dwarfs. The maximum possible mass of any white dwarf is 1.4 times the solar mass, known as the Chandrasekhar limit [2].

The gravitational collapse is a dynamic process. However, dynamic models are too complicated to be solved. The first dynamic model was proposed by Oppenheimer and Snyder for a pressureless matter like dust in 1939 [3]. They verified that the outcome of the gravitational collapse was a black hole. [3] considered exterior space-time Schwarzschild metric. For more general exterior metric, the solution was not known until Vaidya derived the first exact solution for the dynamic exterior metric in 1951 [4]. Later, Santos [5] studied the junction conditions of interior and exterior metric for a spherically symmetric shear-free non-adiabatic fluid with radial heat flow based on relativistic models suggested by Glass [6]. Some recent works considering dynamical process include [7,8,9].

The contraction and subsequent collapse of a stellar object is a highly dissipative process, required to account for the enormous binding energy of the resulting object. The dissipation of energy usually happens through two processes: diffusion and free streaming. In the diffusion approximation, the dissipative process is described by the heat flux. It allows to join the interior solution to the Vaidya shining star exterior [10]. Shear-free perfect fluids with heat flux are often studied in order to simplify the calculations and achieve realistic analytic solutions. Two of their advantages are that there are just two metric components and their space evolution is governed by the isotropy condition, which is a second order ordinary linear differential equation in the radial variable [11]. In the presence of heat flux the only non-trivial non-diagonal component of the Einstein equations becomes an expression for it. The vanishing of the heat flux implies a severe constraint, which transforms the isotropy condition into a non-linear and highly complicated differential equation with few explicit solutions [12, 13]. Misner was the first to study the free streaming form of energy dissipation in [14]. Later, Herrera and Santos studied dissipative collapse for a spherically symmetric body by considering both type of dissipations [15]. One of the present authors has also made some significant contributions in this direction [16, 17]. In this regard, Mitra highlighted the fact that irrespective of details of the collapse process, gravitational collapse must be accompanied by the emission of radiation [18].

In the study of collapse process, charge is one of the important factor. The efforts to introduce charge and study its effects on collapse process were started as early as 1916 by Reissner which eventually resulted in the Reissner–Nordström solution [19], now associated with charged black holes. It was debated for long whether a star can hold a non-zero charge inside it or not. From classical considerations, physical objects with large amounts of charge, for instance, larger than 100 Coulomb per solar mass, cannot exist ([20, 21] and references therein). But such restrictions regarding existence of charge refer to equilibrium (stable) configurations. They do not apply to phases of intense dynamical activity with hydrostatic time scales or even smaller scales, and for which the quasi-static approximation is clearly not reliable (e.g. the quick collapse phase preceding neutron star formation). Notwithstanding, scholars continued to study and analyze the effects of charge on the gravitational collapse. Bonnor found that a charged dust ball with large mass and small radius can withstand gravity and can preclude gravitational collapse due to electrostatic repulsion provided by a small amount of charge [22]. Bekenstein explored the collapse of the relativistic charged fluid ball and its hydrostatic equilibrium [23]. Olson and Bailyn studied the effects of charge on static spherically symmetric fluid. They gave a model for the formation of a white dwarf and examined its properties [24]. A good classification and description of such works may be seen in [25]. At the turn of the century, works like [26, 27] helped in establishing the fact that a star can indeed hold a non-zero charge inside it, and the doubts were mainly rooted in Newtonian considerations. A renewed interest in this subject emerges from the appearance of new mechanisms allowing for the presence of huge electric charge in self-gravitating systems [21]. Particularly appealing is the possibility of very high electric fields in strange stars with quark matter. Sharif and Siddiqa studied the effects of charge and shear viscosity on the collapsing of the symmetrically plane object. They found that the objects do not achieve the end state of being a black hole; instead, the presence of charge results in the formation of naked singularity [28]. The naked singularity is a hypothetical singularity without an event horizon [29, 30]. The event horizon is the boundary of a black hole. Inside the event horizon, the gravitational force is so strong that even light cannot escape. Thirukkanesh and Govender discussed the role of charge for spherical objects after imposing junction conditions [31]. Such an imposition leads to a temporal evolution equation that the paper solved. Recently, Ivanov proposed a concept of ‘horizon function’ in [32] with connotation of event horizon formation. This function is advantageous as it simplifies the coefficients in the Riccati equation, which appears while meeting junction conditions. Ivanov further used this concept to study the charged objects in [33]. The presence of charge renders the resulting equation unsolvable. A restriction, equivalent to linearization of junction conditions, finally makes the equation solvable. The final remnants of collapsing object are discussed in the paper. Some other authors have also harnessed this concept in context of charge (see [34,35,36]).

In general, the dynamical models with charge give rise to a high degree of non-linearity, which offers no easy solution. Some techniques that have been used to get solutions include considering a simpler metric, imposing additional conditions on the governing equations, transformations, etc. With the advent of high-speed computers, however, there is another class of methods coming into vogue, the numerical methods. With advanced machines, numerical methods can provide a reasonably high degree of accuracy. Pinheiro and Chan solved the field equations numerically for a charged radiating shear free spherical object and found that electromagnetic field delays the formation of the event horizon and can even forestall the process of contraction, so leading to an equilibrium state [37]. On the lines of this work, Sharif and Iftikhar demonstrated numerical solution of the similar model taking shear viscosity into account [38]. They showed that the charge delayed the gravitational collapse and depending on the charge/mass ratio, the electric field may support or may oppose the collapse of stellar objects.

Articles [37, 38] have non-linearity of the third order in the ordinary differential equation coming from junction conditions. Since the solution of this equation is expected to go to zero as the collapse process concludes; therefore, the third-order term generates high order fluctuations and introduces round off errors in numerical calculation. To avoid this, taking a cue from [39], we have used a new ansatz that results in the non-linearity of first order only. This does not only make numerical integration easy, but it also improves the accuracy in meeting boundary conditions. The solution of resulting system satisfies the energy conditions. Several other physical quantities associated with the collapse process are also looked into and results are recorded in the form of plots.

The rest of the paper is organized as follows. Section 2 presents interior and exterior metrics together with the junction conditions and the consequent field equations. Expressions for important physical quantities like redshift, luminosity, etc. are also derived in this section. The solutions of these field equations are obtained in Sect. 3. Using the technique of separation of variables, the space and time variables are separated. An ansatz is used to get the solution in this section. Section 4 discusses the associated energy conditions of the model. Section 5 pertains to numerical computations and the verification of the energy conditions.

2 The governing equations

The interior space-time metric in Schwarzschild coordinate system \((t,r,\theta ,\phi )\) is taken as

$$\begin{aligned} ds_-^2=-X^2(t,r)dt^2+Y^2(t,r)\{dr^2+r^2(d\theta ^2+\sin ^2\theta d\phi ^2)\}. \end{aligned}$$
(2.1)

\(ds_-^2\) measures the distance between two points inside the star together with their time differences. Due to involvement of time it is improper to say distance between two points, rather interval may be a better term for it. However, interval again has a time connotation, therefore, the term ‘metric’.

The energy–momentum tensor for the charged matter undergoing dissipation in the form of heat flow is given by

$$\begin{aligned} T_{\lambda \mu }= & {} (\epsilon +p_t)v_\lambda v_\mu +p_tg_{\lambda \mu }+(p_r-p_t)x_\lambda x_\mu +q_\lambda v_\mu \nonumber \\&+q_\mu v_\lambda +\frac{1}{4\pi }\left( F_\lambda ^\nu F_{\mu \nu }-\frac{1}{4}g_{\lambda \mu }F^{\nu \xi }F_{\nu \xi }\right) , \end{aligned}$$
(2.2)

where \(\lambda ,\mu ,\nu =0,1,2,3\), \(\epsilon \) is the energy density of the fluid, \( p_t\) the tangential pressure, \(p_r\) the radial pressure, \(v_\lambda \) is the four- velocity, \(q_\lambda \) the radial heat flow vector and \( x_\lambda \) is a unit space like four vector along the radial direction. The tensors \(F_{\mu \nu }\) and \(g_{\lambda \mu }\) represent the electromagnetic field tensor and gravitational potential tensor respectively.

In comoving coordinates,

$$\begin{aligned} v^\lambda = \frac{1}{X} \delta _0^\lambda . \end{aligned}$$

The heat flow vector \(q^\lambda \) is orthogonal to the velocity vector, that is, \(q^\lambda v_{\lambda }=0\) and therefore,

$$\begin{aligned} q^\lambda =q\delta _1^\lambda , \end{aligned}$$

where q is the heat flux.

The Maxwell’s equations are given by,

$$\begin{aligned} F_{\lambda \mu }=\phi _{\mu ,\lambda }-\phi _{\lambda ,\mu } \end{aligned}$$
(2.3)

and

$$\begin{aligned} F_{;\mu }^{\lambda \mu }=4\pi J^\lambda , \end{aligned}$$
(2.4)

where \(\phi _\mu \) and \(J^\lambda \) represent the four potential and the four current respectively. Charge is assumed at rest with respect to the coordinates of the metric (2.1), and hence magnetic field is absent, therefore,

$$\begin{aligned}&\phi _\mu =\Phi \delta _\lambda ^0 \end{aligned}$$
(2.5)
$$\begin{aligned}&J^\lambda =\sigma v^\lambda \end{aligned}$$
(2.6)

where \(\Phi \) and \(\sigma \) stand for the scalar potential and the charge density respectively.

Equations (2.3) and (2.5) yield,

$$\begin{aligned} F_{01}=-F_{10}=-\frac{\partial \Phi }{\partial r}. \end{aligned}$$
(2.7)

Using values from Eqs. (2.6) and (2.7) into (2.3) and (2.4), we have

$$\begin{aligned} \Phi ^{''}+\left( -\frac{X'}{X}+\frac{Y'}{Y}+\frac{2}{r}\right) \Phi '=4\pi XY^2\sigma \end{aligned}$$

and

$$\begin{aligned}&\frac{\partial }{\partial t}\left( \frac{\Phi ^\prime }{{X^2Y}^2}\right) \nonumber \\&\quad +\left( -\frac{\dot{X}}{X}+3\frac{\dot{Y}}{Y}\right) \frac{\Phi ^\prime }{{X^2Y}^2}=0, \end{aligned}$$

here and elsewhere \('\) stands for the derivative w.r.t. space variable r and \(\dot{~}\) represents derivative w.r.t. time t. Integrating these equations, we get

$$\begin{aligned} \Phi ^\prime =\frac{X}{Y}\frac{l(r)}{r^2} \end{aligned}$$

where l(r) denotes the radial charge distribution and is given by

$$\begin{aligned} l\left( r_s\right) =4\pi \int _{0}^{r_s}\sigma Y^3r^2dr. \end{aligned}$$
(2.8)

The integration gives the total amount of charge Q inside star of radius \(r_s\).

The metric (2.1) represents spherically symmetric shear-free fluid [13], since the shear tensor is identically zero. The collapse rate of the fluid \(\Theta =v_{;\lambda }^\lambda \) for the fluid distribution (2.1) is given by

$$\begin{aligned} \Theta =\frac{3\dot{Y}\ }{XY}. \end{aligned}$$
(2.9)

For the metric (2.1) with energy–momentum tensor (2.2), the Einstein’s field equations are given by following system of equations

$$\begin{aligned} \kappa \epsilon&=-\frac{1}{Y^2}\left( \frac{{2Y}^{''}}{Y}\right. \left. -\frac{Y^{\prime 2}}{Y^2}+\frac{{4Y}^\prime }{rY}\right) \nonumber \\&\quad + \frac{3{\dot{Y}}^2}{X^2Y^2}-\frac{l^2}{r^4Y^4} \end{aligned}$$
(2.10)
$$\begin{aligned} \kappa p_r&=\frac{1}{Y^2}\left( \frac{Y^{\prime 2}}{Y^2}+\frac{{{2X}^\prime Y}^\prime }{XY} +\frac{{2X}^\prime }{rX}+\frac{{2Y}^\prime }{rY}\right) \nonumber \\&\quad \, +\frac{1}{X^2}\left( -\frac{2\ddot{Y}}{Y}-\frac{{\dot{Y}}^2}{Y^2}+\frac{2\dot{X}\dot{Y}}{XY}\right) +\frac{l^2}{r^4Y^4} \end{aligned}$$
(2.11)
$$\begin{aligned} \kappa p_t&=\frac{1}{Y^2}\left( \frac{Y^{''}}{Y}-\frac{Y^{\prime 2}}{Y^2} +\frac{Y^\prime }{rY}+\frac{X^{''}}{X}+\frac{X^\prime }{rX}\right) \nonumber \\&\quad +\frac{1}{X^2}\left( -\frac{2\ddot{Y}}{Y}-\frac{{\dot{Y}}^2}{Y^2}+\frac{2\dot{X}\dot{Y}}{XY}\right) \nonumber \\&\quad -\frac{l^2}{r^4Y^4} \end{aligned}$$
(2.12)
$$\begin{aligned} \kappa q&=\frac{-2}{XY^2}\left( -\frac{{\dot{Y}}^\prime }{Y}\right. \left. +\frac{Y^\prime \dot{Y}}{Y^2}+\frac{X^\prime \dot{Y}}{XY}\right) . \end{aligned}$$
(2.13)

When the heat flow q vanishes, Eq. (2.13) becomes another condition on X,  Y. However, due to its non-linear and non-homogeneous nature it possesses few solutions.

The space-time exterior of star is described by Vaidya–Reissner–Nordstrom metric, which gives an outgoing radial flux around a spherically symmetric charged source of gravitational field

$$\begin{aligned}&{ds}_+^2=-\left( 1-\frac{2M\left( \tau \right) }{R}\right. \left. +\frac{Q^2}{R^2}\right) d \tau ^2-2dRd\tau \nonumber \\&\quad +R^2(d\theta ^2+{\sin }^2\theta d\phi ^2) \end{aligned}$$
(2.14)

where \(M(\tau )\) denotes mass function depending on retarded time \(\tau \). Q is the total charge inside the system of boundary surface \(\Sigma \).

The boundary of a star separates the interior and the exterior in any stellar model. The junction conditions for matching the two metrics: interior and exterior given by (2.1) and (2.14) respectively, across a spherically symmetric time-like hyper-surface \(\Sigma \) are obtained in [5, 40].

While approaching \(\Sigma \) from the exterior or the interior space time, the following junction conditions are required to hold

$$\begin{aligned} {{(ds}_+^2)}_\Sigma \ ={{\ (ds}_-^2)}_\Sigma \ ={\ ds}_\Sigma ^2. \end{aligned}$$

Whence descends,

$$\begin{aligned}&{(rY)}_\Sigma =R_\Sigma (\tau ) \end{aligned}$$
(2.15)
$$\begin{aligned}&{(p_r)}_\Sigma ={(qY)}_\Sigma , \nonumber \\&m_\Sigma \left( r,t\right) \left. =M(\tau )\right. \nonumber \\&\qquad =\left( \frac{r^3Y{\dot{Y}}^2}{2X^2}-r^2Y^\prime -\frac{r^3Y^{\prime 2}}{2Y}+\frac{Q^2}{2rY}\right) _\Sigma \end{aligned}$$
(2.16)

where \(m_\Sigma \) is the mass function calculated in the interior at \( r=r_\Sigma \) [41, 42].

Some other characteristics of the model such as the surface luminosity and the boundary redshift \(z_\Sigma \) observed on \(\Sigma \) are [43, 44]

$$\begin{aligned} L_\Sigma =\ {\frac{\ \kappa }{\ 2} (r^2Y^3q )}_\Sigma , \end{aligned}$$
$$\begin{aligned} z_\Sigma = \left( 1+\frac{rY^\prime }{Y}+\frac{r\dot{Y}}{X}\right) _\Sigma ^{-1}-1 . \end{aligned}$$
(2.17)

The total luminosity for an observer at rest at infinity is given by

$$\begin{aligned} L_\infty =-\frac{dM}{d\tau }=\frac{L_\Sigma }{({1+z_\Sigma )}^2}. \end{aligned}$$

3 Solution of the field equations

Observing the Eqs. (2.102.13), we see that the space and time derivatives may be separated if we use separation of variables method. Therefore, we choose a particular form of the metric coefficients given in (2.1) to separate into functions of t and r coordinates as

$$\begin{aligned} \begin{aligned}&X\left( t,r\right) =f(t)X_0(r)\\&Y\left( t,r\right) =g(t)Y_0(r). \end{aligned} \end{aligned}$$
(3.1)

To find a solution let us impose an ansatz that \(f(t)=g(t)\). This assumption is noble to this study, therefore, warrants a few lines in its support. Earlier studies have taken \(g(t)=1\) which renders Y(rt) in (2.1) independent of t, and hence losing its general character. Further, the homogeneous nature of the most terms appearing in (2.102.13) also suggests towards our ansatz. Further, such an assumption makes a big difference in the consequent ODE which we are about to see. The choice \(f(t)=g(t)\) is made without losing the character of generality, since we have to find two unknowns f(t) and g(t) from one Eq. (2.16).

Putting values of X and Y from (3.1) into (2.102.13) and taking \(f(t)=g(t)\), we get the following system of equations

$$\begin{aligned} \kappa \epsilon&=\frac{{\kappa \epsilon }_0}{f^2}+\frac{l^2}{{f^2r}^4Y_0^4}\left( 1-\frac{1}{f^2}\right) \nonumber \\&\quad +\frac{3{\dot{f}}^2}{X_0^2f^4} \end{aligned}$$
(3.2)
$$\begin{aligned} \kappa p_r&= \frac{{\kappa \left( p_r\right) }_0}{f^2}-\frac{l^2}{{f^2r}^4Y_0^4}\left( 1-\frac{1}{f^2}\right) \nonumber \\&\quad +\frac{1}{X_0^2}\left( -\frac{2\ddot{f}}{f^3}+\frac{{\dot{f}}^2}{f^4}\right) \end{aligned}$$
(3.3)
$$\begin{aligned} \kappa p_t&=\frac{{\kappa \left( p_t\right) }_0}{f^2}+\frac{l^2}{{f^2r}^4Y_0^4}\left( 1-\frac{1}{f^2}\right) \nonumber \\&\quad +\ \ \frac{1}{X_0^2}\left( -\frac{2\ddot{f}}{f^3}+\frac{{\dot{f}}^2}{f^4}\right) \end{aligned}$$
(3.4)
$$\begin{aligned} \kappa q&=-\frac{2X_0^\prime \dot{f}}{X_0^2Y_0^2f^4} \end{aligned}$$
(3.5)

where

$$\begin{aligned} {\kappa \epsilon }_0&=\ -\frac{1}{Y_0^2}\left( \frac{2Y_0^{''}}{Y_0}-\frac{Y_0^{\prime _2}}{Y_0^2}+\frac{{4Y}_0^\prime }{rY_0}\right) -\frac{l^2}{r^4Y_0^4} \end{aligned}$$
(3.6)
$$\begin{aligned} \kappa (p_r)_0&= \frac{1}{Y_0^2}\left( \frac{Y_0^{\prime _2}}{Y_0^2}+\frac{2Y_0^\prime }{rY_0}+\frac{2X_0^\prime Y_0^\prime }{X_0Y_0}+\frac{{2X}_0^\prime }{rX_0}\right) +\frac{l^2}{r^4Y_0^4}\end{aligned}$$
(3.7)
$$\begin{aligned} \kappa ( p_t)_0&=\frac{1}{Y_0^2}\left( \frac{Y_0^{''}}{Y_0}-\frac{Y_0^{\prime _2}}{Y_0^2}+\frac{Y_0^\prime }{rY_0}+\frac{X_0^{''}}{X_0}+\frac{X_0^\prime }{rX_0}\right) -\frac{l^2}{r^4Y_0^4} \end{aligned}$$
(3.8)

here the quantities with the suffix 0 corresponds to the static star model with metric components \(X_0(r),~ Y_0(r)\).

Substituting Eqs. (3.33.5) into (2.16) and assuming also that \(\left\{ \left( p_r\right) _0\right\} _\Sigma \ = 0,\) we obtain a second order differential equation as

$$\begin{aligned} 2f\ddot{f}-{\dot{f}}^2-2af\dot{f}-b (1-f^2 )=0 \end{aligned}$$
(3.9)

where

$$\begin{aligned} a=\left( \frac{X_0^\prime Y_0^\prime }{Y_0^2}\right) _\Sigma , \quad b=\left( \frac{X_0^2Q^2}{r^4Y_0^4}\right) _\Sigma . \end{aligned}$$
(3.10)

The Eq. (3.9) is similar to but fairly less complicated than the following equation obtained in [37, 38]

$$\begin{aligned} 2f^3\ddot{f}+f^2\dot{f}^2-2\bar{a}f^2\dot{f}-\bar{b}(1-f^2)=0. \end{aligned}$$

The analytical solution to the Eq. (3.9) is not available. However, the numerical may be obtained and is discussed in the next section. We may note that the charge corresponds to the last term \(b(1-f^2)\). Therefore, plots for different choices of b will make the dependence on charge clear. Though the exact solution is not known, the nature of collapse can still be predicted to a fair degree of accuracy with the help of numerical solutions nonetheless.

For Eqs. (3.23.5), f is given by (3.9). We must also find \(X_0\) and \(Y_0\) in order to get the solution for these equations. Towards that end, we find,

$$\begin{aligned} \kappa (p_t-p_r)= & {} -\frac{2l^2}{r^4Y_0^4f^4}+\frac{1}{f^2Y_0^2}\left( \frac{Y_0{''}}{Y_0}-\frac{2{Y_0'}^2}{Y_0^2}\right. \nonumber \\&\quad \left. -\frac{Y_0'}{rY_0}+\frac{X_0''}{X_0}-\frac{X_0'}{rX_0}-\frac{2X_0'Y_0'}{X_0Y_0}\right) . \end{aligned}$$
(3.11)

A new parametric class of solutions can be obtained by using Eqs. (3.3) and (3.4) with the assumption that

$$\begin{aligned} \kappa (\ p_t-p_r)=\frac{2l^2}{r^4Y_0^4f^4}+ \frac{\mathcal {F}(r)}{f^2Y_0^2}. \end{aligned}$$

Putting this value in (3.11), we get

$$\begin{aligned} \mathcal {F}(r)= & {} \left( \frac{Y_0{''}}{Y_0}-\frac{2{Y_0'}^2}{Y_0^2} -\frac{Y_0'}{rY_0}+\frac{X_0''}{X_0}\right. \nonumber \\&\quad \left. -\frac{X_0'}{rX_0}-\frac{2X_0'Y_0'}{X_0Y_0}\right) -\frac{4l^2}{r^4Y_0^2f^2}. \end{aligned}$$
(3.12)

By making an ad hoc relationship \( X_0(r)=Y_0^n{\left( r\right) X}_1(r),\) Eq. (3.12) reduces to

$$\begin{aligned} \mathcal {F}(r)= & {} (n+1)\frac{Y_0{''}}{Y_0}+(n^2-3n-2)\frac{{Y_0'}^2}{Y_0^2} -(n+1)\frac{Y_0'}{rY_0}\nonumber \\&+\frac{X_1''}{X_1}-\frac{X_1'}{rX_1}+(2n-2)\frac{X_1'Y_0'}{X_1Y_0}-\frac{4l^2}{r^4Y_0^2f^2}\nonumber \\= & {} (n+1)\left( \frac{Y_0{''}}{Y_0}-\frac{2{Y_0'}^2}{Y_0^2} -\frac{Y_0'}{rY_0}\right) +\left( \frac{X_1''}{X_1}-\frac{X_1'}{rX_1} \right) \nonumber \\&+(n^2-n)\frac{{Y_0'}^2}{Y_0^2}+(2n-2)\frac{X_1'Y_0'}{X_1Y_0}-\frac{4l^2}{r^4Y_0^2f^2}.\nonumber \\ \end{aligned}$$
(3.13)

Stipulating the anisotropy parameter

$$\begin{aligned} \mathcal {F}(r)=(2n-2)\frac{X_1'Y_0'}{X_1Y_0}~\text {and}~\frac{4l^2}{r^4Y_0^2f^2}=(n^2-n)\frac{{Y_0'}^2}{Y_0^2}.\nonumber \\ \end{aligned}$$
(3.14)

We search a \(X_1\) such that

$$\begin{aligned} \frac{X_1''}{X_1}-\frac{X_1'}{rX_1}=0 \end{aligned}$$
(3.15)

and a \(Y_0\) such that

$$\begin{aligned} \frac{Y_0{''}}{Y_0}-\frac{2{Y_0'}^2}{Y_0^2} -\frac{Y_0'}{rY_0}=0. \end{aligned}$$
(3.16)

Equation (3.15) is a linear ordinary differential equation for which the solution is given by

$$\begin{aligned} X_1=c_1 ( 1+c_2r^2 ) \end{aligned}$$
(3.17)

where \(c_1\) and \(c_2\) are some constants chosen suitable to the model.

In (3.16), multiplying by \(Y_0\) and dividing by \(Y_0'\), we get

$$\begin{aligned}&\frac{Y_0''}{Y_0'}-2\frac{Y_0'}{Y_0}=\frac{1}{r},\\&\implies d\left( \ln Y_0'\right) -2d(\ln Y_0)=d(\ln r) \end{aligned}$$

Integration yields,

$$Y_0'=cY_0^2r,$$

which is a first order variable separable ordinary differential equation, resulting in,

$$\begin{aligned} Y_0=\frac{c_3}{1+c_4r^2}. \end{aligned}$$
(3.18)

where \(c,~c_3\) and \(c_4\) satisfy \(cc_3=2c_4\). Therefore, a new parametric solution is given

$$\begin{aligned} X_0={c_1(1+c_2r^2)(1+c_4r^2)}^{-n},\quad Y_0={c_3(1+c_4r^2)}^{-1}. \end{aligned}$$
(3.19)

Using this solution in (3.14),

$$\begin{aligned}&\mathcal {F}(r)=8(n-1)\frac{c_4}{c_3}\frac{c_2r^2}{1+c_2r^2} \quad \text {and}\\&l^2=n(n-1)c_3^2\frac{c_4^2r^6}{(1+c_4r^2)^2}f^2, \end{aligned}$$

where \(n\ne 0,\ n\ne 1;~n>1\) or \( n<0.\)

The explicit expressions for the energy density, radial and tangential pressures, the heat flux and the fluid collapse rate for the collapsing radiating star can be obtained as follows after putting the values of \(X_0\), \(Y_0\) and \(l^2\) in Eqs. (3.23.4).

$$\begin{aligned} \kappa \epsilon&=\frac{\kappa \epsilon _0}{f^2}\ +\frac{4c_4^2r^2}{{c_3^2f}^2}\left( 1-\frac{1}{f^2}\right) \\&\quad +\frac{3}{ ({c_1(1+c_2r^2)(1+c_4r^2)}^{-n} )^2}\frac{{\dot{f}}^2}{f^4},\\ \kappa p_r&=\frac{\kappa {(p_r)}_0}{f^2}-\frac{4c_4^2r^2}{{c_3^2f}^2}\left( 1-\frac{1}{f^2}\right) \\&\quad +\frac{3}{ ({c_1(1+c_2r^2)(1+c_4r^2)}^{-n} )^2}\left( -2\frac{\ddot{f}}{f^3}-\frac{{\dot{f}}^2}{f^4}\right) ,\\ \kappa p_t&=\frac{\kappa \left( p_t\right) _0}{f^2}+\ \frac{4c_4^2r^2}{{c_3^2f}^2}\left( 1-\frac{1}{f^2}\right) \\&\quad +\frac{3}{ ({c_1(1+c_2r^2)(1+c_4r^2)}^{-n} )^2}\left( -2\frac{\ddot{f}}{f^3}-\frac{{\dot{f}}^2}{f^4}\right) , \end{aligned}$$

where

$$\begin{aligned} \begin{aligned} \kappa \epsilon _0&=\frac{2c_4}{c_3^2} (6-n(n-1)c_4r^2 ),\\ \kappa (p_r )_0&=\frac{4}{c_3^2 (1+c_2r^2 )} \\&\quad (c_2 (1-nc_4r^2-c_4^2r^4+nc_4^2r^4-c_4r^2 ) \\&\quad +nc_4^2r^2-nc_4-c_4 ) +\frac{2 (n^2-n )c_4^2r^2}{c_3^2},\\ \kappa (p_t )_0&=\frac{4}{c_3^2 (1+c_4r^2 )}\\&\quad (c_2 (1+c_4r^2-3nc_4r^2+c_4^2r^4-2nc_4^2r^4+n^2c_4r^4 ) \\&\quad +n^2c_4^2r^2-nc_4-c_4 )\\&\quad -\frac{2 (n^2-n )c_4^2r^2}{c_3^2} . \end{aligned} \end{aligned}$$

4 Energy conditions

We demonstrate the above general solution for some particular values of n. In order to maintain the charge anisotropy for the radiating star we assume \( n=-\,1\). It may also be pointed out that \(n=-\,1\) is one such value out of many for which the anisotropy can be maintained. Therefore, putting \(n=-\,1\) in (3.19), we have

$$\begin{aligned} X_0={c_1(1+c_2r^2)(1+c_4r^2)}, \quad Y_0={c_3(1+c_4r^2)}^{-1}. \end{aligned}$$
(4.1)

This updates the static values of density and pressure as follows,

$$\begin{aligned} \mathcal {F}(r)= & {} -16\frac{c_4}{c_3}\frac{c_2r^2}{1+c_2r^2},~l^2\\= & {} 2c_3^2\frac{c_4^2r^6}{(1+c_4r^2)^2}f^2,\quad \epsilon _0=\frac{4c_4}{c_3^2}(3-c_4r^2) \\ (p_r )_0= & {} \frac{4c_2}{{c_3^2(1+c_2r^2)}} (1-c_4^2{r}^4 ),\\ (p_t )_0= & {} \frac{4c_2}{{c_3^2(1+c_2r^2)}}(1+4c_4r^2+c_4r^4+2c_4^2r^4). \end{aligned}$$

The junction conditions \( \{ (p_r )_0 \}_\Sigma =0\) gives

$$\begin{aligned} c_4=\frac{1}{r_\Sigma ^2} \end{aligned}$$

The central values of \(\epsilon _0, (p_r )_0, (p_t )_0\) are given by

$$\begin{aligned} \left( \epsilon _0\right) _{r = 0}= & {} \frac{12c_4}{c_3^2},\quad \{(p_r)_0\}_{r=0}\\= & {} \frac{4c_2}{c_3^2}, \quad \{(p_t)_0\}_{r=0}=\frac{4c_2}{c_3^2}. \end{aligned}$$

As we see radial and tangential pressures are equal at the center and anisotropy vanishes there.

For a solution to be meaningful, it is supposed to satisfy some energy conditions. Since we have considered shear free model, the energy conditions we use, have already been derived in literature. Therefore, we write the expressions only.

Fig. 1
figure 1

(Left) plot of f(t), the time component in the metric function X(tr), vs. t in second, for different charge/mass ratios represented by b. The decrease in f(t) delays as the charge/mass ratios increases. (Right) plot of rate of decrease \(\frac{df}{dt}\) vs. t (in second). The rate of collapse has slowed down with increasing charge/mass ratio. Moreover, the minimum point of \(\frac{df}{dt}\) increases with increasing charge/mass ratio. This shows that the event horizon may not form if the charge is sufficiently available

Fig. 2
figure 2

(Left) the variation in collapse rate \(\Theta \) vs. t for different charge/mass ratios. With increasing charge the collapse of the star slows down. (Right) evolution of luminosity \(L_\Sigma \) with time t with different charge/mass ratios represented by b. The luminosity evolution also delays with increasing charge

Fig. 3
figure 3

(Left) plot of heat flux q vs. t for different charge/mass ratios. The charge causes subdued evolution of heat flux. (Right) evolution of density \(\epsilon \) vs time t for different charge/mass ratios. The delay in density blow-up indicates delay in black-hole formation

Fig. 4
figure 4

(Left) evolution of radial pressure \(p_r\) vs. t for different charge/mass ratios. Delay is observed in the radial pressure with increasing charge. (Right) evolution of tangential pressures \(p_t\) vs. time t (s). The evolution in tangential pressure also delays with increasing charge

Fig. 5
figure 5

(Left) the quantities in left hand side of energy condition (i) are plotted in left panel. The expression remains positive throughout the collapse process. (Right) the quantities in energy condition (v) are plotted in the right panel. This expression also remains positive during collapse process. Expressions in other energy conditions are dependent on these conditions, pressure and density which are all positive and hence other conditions may be satisfied as well

Mathematical condition:

figure a

where E satisfies

figure b

Weak condition:

figure c

Strong condition:

figure d

Dominant conditions:

figure e
figure f

These conditions imply,

  1. (i)

    The central values of pressures, density and metric potential component should be non-zero positive definite. Therefore, \(c_1>0,~c_2>0,~c_3>0\) and \(c_4>0\). Further, the condition \(\frac{{{(p}_r)}_0}{\epsilon _0}<1\) implies \(c_2<3c_4\).

  2. (ii)

    The solution should have monotonically decreasing expressions for the pressures and density with increasing r from center to boundary surface. For that, we note

    $$\begin{aligned} \epsilon _0'=-\frac{8rc_4^2}{c_3^2}. \end{aligned}$$

    For extrema of \(\epsilon _0\), we need \(\epsilon _0'=0.\) This gives \(r=0\). And

    $$\begin{aligned} { (\epsilon _0{''} )}_{r\ =0}=-\frac{8c_4^2}{c_3^2}<0, \end{aligned}$$

    implies that the central values are maximum. Similarly, for the radial pressure

    $$\begin{aligned} {\{ (p_r )_0 \}}'=\frac{-8c_2r}{c_3^2{(1+c_2r^2)}^2} ({c_2+2c_4^2r^2+2c}_4^2c_2r^4-c_4^2c_4r^4 ) . \end{aligned}$$

    Thus the extrema of \( (p_r )_0 \) occurs at the centre if \(\{(p_r )_0 \}^\prime =0 \Rightarrow r=0, \)

    $$\begin{aligned} {(\{(p_r )_0 \}^{''} )}_{r\ =0}=\frac{-8c_2^2}{c_3^2}<0. \end{aligned}$$

    Likewise for tangential pressure

    $$\begin{aligned} {\left\{ \left( p_t\right) _0\right\} }^\prime= & {} \frac{-8c_2r}{c_3^2{(1+c_2r^2)}^2}\\&\big (c_2+4c_4c_2r^2+4c_4^2c_2r^4+c_4c_2r^4-4c_2\\&-8{c_4^2r}^2-2c_4r^2-4{c_4^3r}^4-4{c_4^2r}^4\big ). \end{aligned}$$

    Thus the extrema of \( \left( p_t\right) _0 \) occurs at the centre if \( \left\{ \left( p_t\right) _0\right\} ^\prime =0 \Rightarrow r=0\) and

    $$\begin{aligned}&{ ( \{ (p_t )_0 \}^{''} )}_{r\ =0}\\&\quad =\frac{-8}{c_3^2} (2c_2-4c_4c_2 ). \end{aligned}$$

    For \( ( \{ (p_t )_0 \}^{''} )_{r\ =0}<0\), we must choose \(c_4<\frac{1}{2}\).

    Therefore, the solution satisfies the energy conditions if we choose parameters in pressure density with the conditions \(c_1>0\), \(c_3>0\), \(0<c_4<\frac{1}{2}\) and \(0<c_2<3c_4\).

5 Numerical solution

In the above discussion, the function f(t), given by the second order ordinary differential equation (ODE) (3.9), is unknown. The analytical solution for the ODE (3.9) is not available. The equation is non-linear with the boundary conditions \(f(-\infty )=1\), \(f(0)=0\). It is expected that \(f'(-\infty )\approx 0\). The coefficients in the ODE are dependent on initial mass, radius and the charge of the star. The ODE (3.9) is solved numerically in maplesoft. The numerical solution of f(t) and its derivative is plotted for different charge/mass ratio in the Fig. 1. Since the charge is represented by the parameter b in the Eq. (3.9). Therefore, instead of taking different Q/m ratios, we have taken different values of b. Of course b and Q/m increases or decreases simultaneously for a given star of mass m. The values of b are chosen suitably so that the effect of charge could be seen on the dependent quantities. If enough charge is not available, that is, if b is small, the effect will also be small and it will be difficult to conclude if the charge has any significant impact on the collapse process.

We see the derivative is negative. Figure 1 indicates that \(\frac{df}{dt}\) does not reach the same minimum value as we increase charge/mass ratio. In the last stages of the contraction of the overly charged stars, that is, for bigger values of b, the decrease of the function f(t) decelerates and it reaches a minimum value (see the printed values in Fig. 1 right panel). After this point, the function starts increasing sharply. This idea is physically inconsistent, since the luminosity becomes negative for positive \(\frac{df}{dt}\) (see equation (5.1) below). Therefore, we have to stop the integration at this point. The solution is just valid until this minimum point, where the luminosity, heat flux and the rate of decrease are positive.

Event horizon occurs when the surface redshift becomes infinity, therefore, from (2.17)

$$\begin{aligned}&\dot{f}_{h}=-\frac{c_1\left( 1+c_2r_\Sigma ^2\right) \left( 1+c_4r_\Sigma ^2\right) \left( 1+c_4r_\Sigma ^2-2c_4r_\Sigma \right) }{c_3r_\Sigma }. \end{aligned}$$

We see from Fig. 1, \(\dot{f}_{h}\) values decreases as charge/mass ratio increases. This indicates that if the charge is increased substantially the event horizon formation may be avoided altogether.

From (2.9), we get the expression for collapse rate

$$\begin{aligned} \Theta =\frac{3\dot{f}}{c_1(1+c_2r^2)(1+c_4r^2)f^2}. \end{aligned}$$

\(\Theta \) is depicted in Fig. 2. It is clear from the plot that the collapse rate has decreased. To reach the same level of decay, the star is now taking more time.

The surface luminosity is given by

$$\begin{aligned} L_\Sigma =\frac{-2c_3r_\Sigma ^3(c_4+c_2+2c_4c_2r_\Sigma ^2)}{c_1{(1+c_2r_\Sigma ^2)}^2 (1+c_4r_\Sigma ^2 )^3}\frac{\dot{f}}{f^3}. \end{aligned}$$
(5.1)

Figure 2 shows the luminosity variation of the stellar object. Clearly the luminosity may be seen decreasing, which is justified for the reason that the collapse has slowed down and so the fusions reactions are not as intense as in earlier case of no charge.

Figure 3 shows the effect of charge on heat flux and density. With increase in charge, the evolution of heat flux seems to be delayed. Similarly, the density increase is also subdued.

Figure 4 portrays the evolution of radial and tangential pressures with respect to time. Since the entire process of collapse has been delayed, the same may be seen in such quantities from these figures.

The energy conditions are checked. However, not all energy conditions required a verification, since some of them may be seen satisfied directly from nature of density and pressure. Density and pressure are positive quantities as plotted in Fig. 4. We have plotted energy conditions (i) and (v) in Fig. 5. Thus, we observe all the energy conditions are satisfied.

6 Conclusion

We have studied the shear-free collapse of a charged radiating star. The involvement of charge gives rise to a highly non-linear ordinary differential equation \(2f^3\ddot{f}+f^2\dot{f}^2-2\bar{a}f^2\dot{f}-\bar{b}(1-f^2)=0\). A new ansatz is proposed in the present article which simplifies the differential equation and reduces the non-linearity in the equation. The proposed ansatz gives a fairly easy differential equation \(2f\ddot{f}-\dot{f}^2-2af\dot{f}-b(1-f^2)=0\). Further, the proposed ansatz generalizes the model to a fair extent in the sense that now X(tr) and Y(tr) both are functions of t and r. The resulting equations are solved numerically and different physical quantities are plotted. It is observed that the charge affects the collapse process significantly. Depending on the charge/mass ratio, the collapse of a star may either be delayed or may even be prevented if sufficient amount of charge is available.