1 Introduction

Electromagnetic effects are important in the modeling of compact objects in general relativity. It has been demonstrated that the presence of charge affects the rate of gravitational collapse, luminosities, stellar masses and other physical features. Some recent examples of charged static stars and their interesting properties are given in [1,2,3,4,5,6]. In radiating stars, the radial pressure at the stellar boundary is nonvanishing [7,8,9,10]. As a result, in the modeling of a charged radiating stellar structure, an additional differential equation has to be solved, in addition to the field equations. This adds to the complexity of the modeling process; fewer exact models of radiating stars are known with electromagnetic fields. An expansion-free radiating body was developed by Sharif and Azam [11]. A geodesic stellar body in the presence of the electromagnetic field was generated by Ivanov [12] and Mahomed et al. [13]. Also, the condition for vanishing shear was made by Charan et al. [14], and the shear-free condition has been investigated in different physical scenarios [15,16,17]. Particular models are known which have nonzero shear [18,19,20,21]. Abebe and Maharaj [22] found charged radiating stars using Lie symmetry infinitesimal generators to exactly solve the boundary condition. This class of models admits a linear equation of state and contains Euclidean stars in the uncharged limit [23, 24]. A general formalism for studying charged physically acceptable dissipating bodies with spherical symmetry was undertaken in several treatments [25,26,27,28] where the dynamical equations were analysed in relation to dissipative phenomena.

The matching of general hypersurfaces was considered by Mars and Senovilla [29] and Fayos et al. [30] in general relativity. Olmo and Rubiera-Garcia [31] and Yousaf [32, 33] studied the matching conditions in f(R) gravity theories. Mena and Oliveira [34] considered the collapse of a gravitational body and the formation of trapped surfaces with different topologies. Our principle interest is matching across a comoving surface in spherical symmetry. The junction conditions for an uncharged radiating star in general relativity were completed by Santos [35] for a shear-free matter distribution. De Oliveira et al. [36] extended this result to include electric charge. Tikekar and Patel [37], Banerjee and Choudury [38], and Maharaj and Govender [39] considered nonzero shear viscosity and found the generalised junction conditions with an electromagnetic field. In a recent treatment, the matching of a composite matter distribution (a combination of a barotropic fluid, null dust and a null string) to the generalised Vaidya atmosphere was considered by Maharaj and Brassel [40]. Remarkably, matching across a comoving surface is possible with a composite matter distribution. The pressure at the boundary is determined by physical matter variables from both the interior of the star and the exterior stellar atmosphere. Consequently the radiating star allows for more general and omnifarious physical behaviour. This physical feature is not present in previous investigations. The results of Santos [35] with interior heat flux, Di Prisco et al. [41] with interior null fluid, and Maharaj et al. [42] with the exterior null string, arise as special cases in the generalised treatment [40].

The boundary condition at the stellar surface in [40] was generated for an uncharged composite matter source. As the electromagnetic field is an important ingredient in astrophysical phenomena, it is necessary to consider the junction conditions with charge. In this study we extend the results of [40] to find the junction conditions with charge across a comoving hypersurface. We find that the interior general matter distribution, including the electromagnetic field, matches to an external generalised stellar atmosphere, i.e. the generalised Vaidya metric. This means that we can match a radiating stellar interior with a barotropic fluid, null dust, null string and an electric field, to an external stellar atmosphere described by the generalised Vaidya spacetime. This feature should be incorporated in astrophysical models of radiating stars for a complete description of gravitating effects. Earlier results are regained as special cases from the generalised junction conditions found in this paper.

We utilise units in which \(G=c=1\). The coupling constant in Einstein’s equations then becomes \(\kappa =8\pi \). The four-dimensional spacetime manifolds have Lorentzian signature \((-,+,+,+)\).

2 Einstein–Maxwell equations and junction conditions

The full energy momentum tensor is written as

$$\begin{aligned} T_{ab}= & {} (\rho +p)u_{a}u_{b}+pg_{ab}+q_{a}u_{b}+q_{b}u_{a}\nonumber \\&+\varepsilon l_{a}l_{b}+(\mu +{\mathscr {P}})(l_{a}n_{b}+l_{b}n_{a})\nonumber \\&+{\mathscr {P}}g_{ab}+\pi _{ab}+E_{ab}. \end{aligned}$$
(1)

This matter distribution describes the composite matter profile in the interior of the stellar body. In the above, \(\rho \) is the energy density, p is the isotropic pressure, \(\varepsilon \) is the energy density of the internal null dust, \(\mu \) is the null string energy density and \({\mathscr {P}}\) is the pressure of the internal null fluid. The vectors \(\mathbf {l}\) and \(\mathbf {n}\) are null. The tensor \(\pi _{ab}\) represents the anisotropic stresses. The timelike vectors \(\mathbf{q}\) and \(\mathbf{u}\) represent the heat flux and fluid velocity respectively. These quantities satisfy

$$\begin{aligned} u^au_{a}= & {} -1, u^aq_{a}=0,\\ l^al_{a}= & {} n^an_{a}=0, l_{a}n^a=-1,\\ \pi _{ab}u^a= & {} 0, \pi ^{a}{}_{a}=0. \end{aligned}$$

The quantity \(E_{ab}\) defines the electromagnetic energy tensor which represents the contribution of charge.

The energy momentum tensor (1) may be used to describe the matter distribution of a radiating star with a generalised atmosphere. One of the first analytical models for a barotropic fluid with heat conduction was found by Kolassis et al. [43] which has a Friedmann-like behaviour within the interior. The electromagnetic field was introduced to the matter field by de Oliveira and Santos [36], and later a model for a star with viscosity, shear and charge was presented by Sharif and Azama [44]. The relevance of anisotropy in the matter distribution was emphasised by Herrera and Santos [45], and an analytical anisotropic model was generated by Naidu et al. [46]. The energy momentum tensor may also contain the energy density of a null dust fluid as shown in Herrera et al. [47] in a stellar setting. This result was extended by Maharaj et al. [42] so that the external matter field is a combination of null dust and a null string fluid. The significance of multi-component fluids was highlighted in [45] and these can be attributed to magnetic fields, mixtures of gases (hydrogen, ionized hydrogen and electrons), rotational effects, anisotropic velocity distributions, and net radiation flows entering or leaving the stellar atmosphere. An explicit model of a two-fluid star in general relativity undergoing dissipative collapse was found by Govender [48]. The matter distribution (1) includes all these physical effects.

The Einstein–Maxwell equations are given by

$$\begin{aligned} G_{ab}= & {} 8\pi T_{ab}, \end{aligned}$$
(2a)
$$\begin{aligned} F_{ab;c}+F_{bc;a}+F_{ca;b}= & {} 0, \end{aligned}$$
(2b)
$$\begin{aligned} F^{ab}{}_{;b}= & {} 4\pi J^a, \end{aligned}$$
(2c)

where \(\mathbf{G}\) is the Einstein tensor, \(\mathbf{T}\) is the energy momentum tensor, \(\mathbf{F}\) is the Faraday tensor (or Maxwell bivector) and \(\mathbf{J}\) is the current. We can define

$$\begin{aligned} F_{ab}=\Phi _{b;a}-\Phi _{a;b}, \end{aligned}$$
(3)

where \(\Phi _{a}\) is the electromagnetic potential, and

$$\begin{aligned} J^a=\zeta u^a, \end{aligned}$$
(4)

where \(\zeta \) is the proper charge density. The electromagnetic energy tensor can be written in terms of the Faraday tensor (3) as

$$\begin{aligned} E_{ab}=\frac{1}{4\pi }\left( F_{a}{}^{c}F_{bc}-\frac{1}{4}F^{cd}F_{cd}g_{ab}\right) . \end{aligned}$$
(5)

It is important to note that (5) is trace-free. The various quantities defined above hold in four spacetime dimensions.

The field equations (2) are valid for the interior matter distribution in the spacetime manifold \({\mathscr {M}}^{-}\). Matching has to take place across a comoving surface \(\Sigma \) to an exterior geometry and matter distribution in the spacetime manifold \({\mathscr {M}}^{+}\), via the embedding maps \(\Psi ^{\pm }:\Sigma ^{\pm }\longrightarrow {{\mathscr {M}}}^{\pm }\) and \(\xi ^{i}_{\pm }\mapsto x^{a}_{\pm }=\Psi ^{i}_{\pm }(\xi ^{i}_{\pm })\). If we consider the two bulk spacetime manifolds \({\mathscr {M}}^{-}\) and \({\mathscr {M}}^{+}\), the junction conditions for the matching of these two spacetimes over a comoving surface \(\Sigma \) are given by

$$\begin{aligned} (ds^2_{-})_{\Sigma ^{-}}= & {} (ds^2_{+})_{\Sigma ^{+}}=ds^2_{\Sigma }, \end{aligned}$$
(6a)
$$\begin{aligned} K^{-}_{ij}= & {} K^{+}_{ij}=K_{ij}\big |_{\Sigma }, \end{aligned}$$
(6b)

where

$$\begin{aligned} K^{\pm }_{ij}\equiv -{\mathfrak {N}}^{\pm }_{a}\frac{\partial ^2 \chi ^{a}_{\pm }}{\partial \xi ^{i}_{\pm }\partial \xi ^{j}_{\pm }}-{\mathfrak {N}}^{\pm }_ {a}\Gamma ^a{}_{{}bc}\frac{\partial \chi ^{b}_{\pm }}{\partial \xi ^{i}_{\pm }} \frac{\partial \chi ^{c}_{\pm }}{\partial \xi ^{j}_{\pm }}. \end{aligned}$$
(7)

In the above \(\Gamma ^{a}{}_{bc}\) are the Christoffel symbols of the second kind and \({\mathfrak {N}}^{\pm }_{a}(\chi ^{b}_{\pm })\) are the unit vectors normal to the boundary \(\Sigma \). The coordinates of the spacetimes are written as \(\chi ^{a}_{\pm }=\chi ^{a}_{\pm }(\xi ^{i}_{\pm })\); these are expressed as functions of the intrinsic coordinates \(\xi ^{i}\), that define the boundary surface \(\Sigma \), embedded in the higher dimensional bulk spaces \({\mathscr {M}}^{\pm }\). For further details on the matching of two spacetimes \({\mathscr {M}}^{-}\) and \({\mathscr {M}}^{+}\), see the treatments of Santos [35], Herrera and Santos [45], Israel [49], O’Brien and Synge [50] and Lichnerowicz [51].

3 The model

We develop the model of a composite radiating star in general relativity in four dimensions.

3.1 Interior spacetime

We consider the interior spacetime \({\mathscr {M}}^{-}\) to be the general shearing metric, given by

$$\begin{aligned} ds_{-}^2=-A^2dt^2+B^2dr^2+Y^2(d\theta ^2+\sin ^2\theta d\phi ^2), \end{aligned}$$
(8)

where the metric functions \(A=A(r,t)\), \(B=B(r,t)\) and \(Y=Y(r,t)\). The fluid four-velocity \(\mathbf{u}\) is comoving. The kinematical quantities are

$$\begin{aligned} \omega _{ab}= & {} 0, \end{aligned}$$
(9a)
$$\begin{aligned} {\mathfrak {a}}^a= & {} \left( 0,\frac{A'}{A},0,0\right) , \end{aligned}$$
(9b)
$$\begin{aligned} \Theta= & {} \frac{1}{A}\left( \frac{\dot{B}}{B}+2\frac{\dot{Y}}{Y}\right) , \end{aligned}$$
(9c)
$$\begin{aligned} \sigma ^1{}_{1}= & {} \sigma ^2{}_{2}=-\frac{1}{2}\sigma ^3{}_{3}=\frac{1}{\sqrt{3}A} \left( \frac{\dot{Y}}{Y}-\frac{\dot{B}}{B}\right) , \end{aligned}$$
(9d)

where we have that \(\omega _{ab}\) is the vorticity tensor, \({\mathfrak {a}}^a\) is the fluid four-acceleration, \(\Theta \) is the expansion invariant and \(\sigma ^2=\frac{1}{2}\sigma ^{ab}\sigma _{ab}\) is the magnitude of the shear. The shear-free line element can be regained when

$$\begin{aligned} \frac{\dot{Y}}{Y}-\frac{\dot{B}}{B}=0, \end{aligned}$$

using (9d) or alternatively when \(Y=rB\).

The anisotropic stress tensor \(\pi _{ab}\) is defined as

$$\begin{aligned} \pi _{ab}=\Delta \left( {\mathcal {N}}_{a}{\mathcal {N}}_{b}-\frac{1}{3}h_{ab}\right) . \end{aligned}$$
(10)

In the above, the quantity \(\Delta =p_{||}-p_{\perp }\) is the degree of anisotropy. We have that \(p_{||}\) is the radial pressure, \(p_{\perp }\) is the tangential pressure and \({\mathcal {N}}_{a}\) is a unit radial vector. The quantity \(h_{ab}=g_{ab}+u_{a}u_{b}\) is the projection tensor. The isotropic pressure

$$\begin{aligned} p=\frac{1}{3}(p_{||}+2p_{\perp }), \end{aligned}$$
(11)

relates the radial pressure and the tangential pressure. We regain the isotropic pressure \(p=p_{||}=p_{\perp }\), when \(\Delta =0\).

We follow the notation and treatment of Ellis [52] and Ellis et al. [53] in the definition of the energy momentum tensor (1). Observe that \(p=\frac{1}{3}h^{ab}T_{ab}\) is the isotropic (relativistic) pressure and \(\pi _{ab}\) is the stress tensor due to viscosity. With the definition (10) we find that we can obtain the equivalent expression

$$\begin{aligned}&(\rho +p)u_{a}u_{b}+pg_{ab}+\pi _{ab} \nonumber \\&\quad = (\rho +p_{\perp })u_{a}u_{b}+p_{\perp }g_{ab}+\left( p_{||}-p_{\perp }\right) {\mathcal {N}}_{a}{\mathcal {N}}_{b}, \end{aligned}$$
(12)

with \(\Delta =p_{||}-p_{\perp }\). The expression (12) is the form that is often used in the description of anisotropic fluids as pointed out in references [41, 45]. For more discussions on this point and a derivation, see Herrera and Santos [45] (in particular page 60) and [54]. We have followed this notation so that our results can easily be compared with earlier treatments, as shown later. Our approach has the advantage of regaining the special case of vanishing anisotropy \(\Delta =0\) in a transparent manner. In particular we regain the seminal result of Santos [35] for nonadiabatic radiating collapse with \(p_{||}=p_{\perp }=p\).

The four-vectors associated with the interior matter distribution are given by

$$\begin{aligned} u^a= & {} \left( \frac{1}{A},0,0,0\right) , q^a=\left( 0, \frac{1}{B}q,0,0\right) ,\\ l^a= & {} \left( \frac{1}{A},\frac{1}{B},0,0\right) , n^a= \left( \frac{1}{2A},\frac{1}{2B},0,0\right) ,\\ \Phi _{a}= & {} (\varphi (r,t),0,0,0), {\mathcal {N}}^a=\left( 0,\frac{1}{B},0,0\right) , \end{aligned}$$

for the metric (8).

From the system (2), we have

$$\begin{aligned} \varphi ''-\left( \frac{A'}{A}+\frac{B'}{B}-2\frac{Y'}{Y}\right) \varphi '= & {} 4\pi \zeta AB^2, \end{aligned}$$
(13a)
$$\begin{aligned} {\dot{\varphi }}'-\left( \frac{\dot{A}}{A}+\frac{\dot{B}}{B}-2\frac{\dot{Y}}{Y}\right) \varphi '= & {} 0, \end{aligned}$$
(13b)

for the electromagnetic field. Integrating (13b) yields

$$\begin{aligned} \varphi '=\frac{AB}{Y^2}Q(r), \end{aligned}$$
(14)

and substituting this into (13a) gives the condition on Q(r) as

$$\begin{aligned} Q(r)=4\pi \int ^{r}\zeta BY^2d{\bar{r}}, \end{aligned}$$
(15)

which is the conserved total charge contained in the star, since \(J^a{}_{;a}=0\). Thus the expressions (14) and (15) close the system (13). The nonzero components of (1) are then given by

$$\begin{aligned} T^{-}_{00}= & {} A^2\left( \rho +\varepsilon +\mu +\frac{1}{8\pi }\frac{Q^2}{Y^4}\right) , \end{aligned}$$
(16a)
$$\begin{aligned} T^{-}_{01}= & {} -AB(q+\varepsilon ), \end{aligned}$$
(16b)
$$\begin{aligned} T^{-}_{11}= & {} B^2\left( p+\varepsilon -\mu +\frac{2}{3}\Delta -\frac{1}{8\pi }\frac{Q^2}{Y^4}\right) , \end{aligned}$$
(16c)
$$\begin{aligned} T^{-}_{22}= & {} Y^2\left( p+{\mathscr {P}}-\frac{1}{3}\Delta +\frac{1}{8\pi }\frac{Q^2}{Y^4}\right) , \end{aligned}$$
(16d)
$$\begin{aligned} T^{-}_{33}= & {} \sin ^2\theta T_{22}, \end{aligned}$$
(16e)

where we have utilised (10), (14) and (15). The nonvanishing components of the Einstein tensor \(G_{ab}=R_{ab}-\frac{1}{2}Rg_{ab}\) are given by

$$\begin{aligned} G^{-}_{00}= & {} 2\frac{\dot{B}\dot{Y}}{BY}+\frac{A^2}{Y^2}+\frac{\dot{Y}^2}{Y^2}\nonumber \\&-\frac{A^2}{B^2}\left( 2\frac{Y''}{Y}+\frac{Y'^2}{Y^2}-2\frac{B'Y'}{BY}\right) , \end{aligned}$$
(17a)
$$\begin{aligned} G^{-}_{01}= & {} 2\left( -\frac{\dot{Y}'}{Y}+\frac{\dot{B}Y'}{BY}+\frac{A'\dot{Y}}{AY}\right) , \end{aligned}$$
(17b)
$$\begin{aligned} G^{-}_{11}= & {} \frac{B^2}{A^2}\left( -2\frac{\ddot{Y}}{Y}-\frac{\dot{Y}^2}{Y^2}+2\frac{\dot{A}\dot{Y}}{AY}\right) \nonumber \\&+\frac{Y'^2}{Y^2}+2\frac{A'Y'}{AY}-\frac{B^2}{Y^2}, \end{aligned}$$
(17c)
$$\begin{aligned} G^{-}_{22}= & {} -\frac{Y^2}{A^2}\left( \frac{\ddot{B}}{B}-\frac{\dot{A}\dot{B}}{AB}+ \frac{\dot{B}\dot{Y}}{BY}-\frac{\dot{A}\dot{Y}}{AY}+\frac{\ddot{Y}}{Y}\right) \nonumber \\&+\frac{Y^2}{B^2}\left( \frac{A''}{A}-\frac{A'B'}{AB}+\frac{A'Y'}{AY}-\frac{B'Y'}{BY}+\frac{Y''}{Y}\right) , \end{aligned}$$
(17d)
$$\begin{aligned} G^{-}_{33}= & {} \sin ^2\theta G^{-}_{22}, \end{aligned}$$
(17e)

for the metric (8). The Einstein–Maxwell field equations \(G^{-}_{ab}=8\pi T^{-}_{ab}\), with shear and anisotropic pressures, are therefore

$$\begin{aligned}&8\pi (\rho +\varepsilon +\mu ) +\frac{Q^2}{Y^4}=\frac{2}{A^2}\frac{\dot{B}\dot{Y}}{BY}+\frac{1}{Y^2}+\frac{1}{A^2}\frac{\dot{Y}^2}{Y^2}\nonumber \\&\quad -\frac{1}{B^2}\left( 2\frac{Y''}{Y}+\frac{Y'^2}{Y^2}-2\frac{B'Y'}{BY}\right) , \end{aligned}$$
(18a)
$$\begin{aligned}&8\pi \left( p{+}\varepsilon {-}\mu {+}\frac{2}{3}\Delta \right) {-}\frac{Q^2}{Y^4}{=}\frac{1}{A^2}\left( -2\frac{\ddot{Y}}{Y}{-}\frac{\dot{Y}^2}{Y^2}{+}2\frac{\dot{A}\dot{Y}}{AY}\right) \nonumber \\&\quad +\frac{1}{B^2}\left( \frac{Y'^2}{Y^2}+2\frac{A'Y'}{AY}\right) -\frac{1}{Y^2}, \end{aligned}$$
(18b)
$$\begin{aligned}&8\pi \left( p{+}{\mathscr {P}}{-}\frac{1}{3}\Delta \right) {+}\frac{Q^2}{Y^4}{=}-\frac{1}{A^2}\left( \frac{\ddot{B}}{B}{-}\frac{\dot{A}\dot{B}}{AB}{+}\frac{\dot{B}\dot{Y}}{BY}-\frac{\dot{A}\dot{Y}}{AY}\right. \nonumber \\&\quad \left. +\frac{\ddot{Y}}{Y}\right) +\frac{1}{B^2}\left( \frac{A''}{A}-\frac{A'B'}{AB}+\frac{A'Y'}{AY}-\frac{B'Y'}{BY}+\frac{Y''}{Y}\right) ,\nonumber \\ \end{aligned}$$
(18c)
$$\begin{aligned}&8\pi (q+\epsilon )=-\frac{2}{AB}\left( \frac{\dot{B}Y'}{BY}+\frac{A'\dot{Y}}{AY}-\frac{\dot{Y}'}{Y}\right) , \end{aligned}$$
(18d)
$$\begin{aligned}&\quad \zeta =\frac{Q'}{4\pi BY^2}, \end{aligned}$$
(18e)

for the general spherically symmetric metric (8).

3.2 Exterior spacetime

For the exterior spacetime manifold \({\mathscr {M}}^{+}\), the generalised Vaidya metric, with Eddington retarded coordinates \((v,\textsf {r},\theta ,\phi )\), is given as

$$\begin{aligned} ds^2_{+}= & {} -\left( 1-\frac{2m(v,\textsf {r})}{\textsf {r}}\right) dv^2\nonumber \\&-2dvd\textsf {r}+\textsf {r}^2(d\theta ^2+\sin ^2\theta d\phi ^2). \end{aligned}$$
(19)

Here the function \(m(v,\textsf {r})\) describes the Misner–Sharp mass of the star, which is also called the mass function [55, 56]. It gives a measure of the gravitational energy within a given radius \(\textsf {r}\).

The exterior energy momentum tensor is defined by

$$\begin{aligned} T^{+}_{ab}=T_{ab}^{(n)}+T_{ab}^{(m)}, \end{aligned}$$
(20)

which is a superposition of null dust and null string fluids. We can write

$$\begin{aligned} T_{ab}^{+}={\bar{\epsilon }} {\bar{l}}_{a}{\bar{l}}_{b}+({\bar{\mu }}+\bar{{\mathscr {P}}})({\bar{l}}_{a}{\bar{n}}_{b}+{\bar{l}}_{b}{\bar{n}}_{a})+\bar{{\mathscr {P}}}g_{ab}. \end{aligned}$$
(21)

Here, \({\bar{\varepsilon }}\) is the energy density of the null dust radiation, \({\bar{\mu }}\) is the null string energy density and \(\bar{{\mathscr {P}}}\) is the null string pressure. In the above we have

$$\begin{aligned} {\bar{l}}_{a}=(1,0,0,0), {\bar{n}}_{a}=\left( \frac{1}{2}\left[ 1-\frac{2m(v,\textsf {r})}{\textsf {r}}\right] ,1,0,0\right) . \end{aligned}$$

The null vector \({\bar{l}}^a\) is a double null eigenvector of the energy momentum tensor (20). The nonzero components of (20) are

$$\begin{aligned} T^{+}_{00}= & {} {\bar{\varepsilon }}+{\bar{\mu }}\left( 1-\frac{2m}{\textsf {r}}\right) , \end{aligned}$$
(22a)
$$\begin{aligned} T^{+}_{01}= & {} {\bar{\mu }}, \end{aligned}$$
(22b)
$$\begin{aligned} T^{+}_{22}= & {} \textsf {r}^2\bar{{\mathscr {P}}}, \end{aligned}$$
(22c)
$$\begin{aligned} T^{+}_{33}= & {} \sin ^2\theta T^{+}_{22}, \end{aligned}$$
(22d)

which represents a Type II fluid. The nonzero components of the Einstein tensor are given by

$$\begin{aligned} G^{+}_{00}= & {} -\frac{2}{\textsf {r}^3}\left( 2mm_{\textsf {r}}-\textsf {r}m_{\textsf {r}}+\textsf {r}m_{v}\right) , \end{aligned}$$
(23a)
$$\begin{aligned} G^{+}_{01}= & {} \frac{2m_{\textsf {r}}}{\textsf {r}^2}, \end{aligned}$$
(23b)
$$\begin{aligned} G^{+}_{22}= & {} -\textsf {r}m_{\textsf {rr}}, \end{aligned}$$
(23c)
$$\begin{aligned} G^{+}_{33}= & {} \sin ^2\theta G^{+}_{22}, \end{aligned}$$
(23d)

where we have used \(m_{v}=\frac{\partial m}{\partial v}\) and \(m_{\textsf {r}}=\frac{\partial m}{\partial \textsf {r}}\).

The Einstein field equations \(G^{+}_{ab}=8\pi T^{+}_{ab}\) for the exterior spacetime manifold \({\mathcal {M}}^{+}\) are then given by

$$\begin{aligned} 8\pi {\bar{\epsilon }}= & {} -\frac{2m_{v}}{\textsf {r}^2}, \end{aligned}$$
(24a)
$$\begin{aligned} 8\pi {\bar{\mu }}= & {} \frac{2m_{\textsf {r}}}{\textsf {r}^2}, \end{aligned}$$
(24b)
$$\begin{aligned} 8\pi \bar{{\mathscr {P}}}= & {} -\frac{m_{\textsf {rr}}}{\textsf {r}}. \end{aligned}$$
(24c)

In the field equations (24), \({\bar{\epsilon }}\), \({\bar{\mu }}\) and \(\bar{{\mathscr {P}}}\) depend on the coordinates v and \(\textsf {r}\) in the external atmosphere of the star.

4 Matching

We now generate the matching conditions of the two bulk spacetimes given by (8) and (19) respectively. The unit normal vectors \({\mathfrak {N}}^{\pm }_{a}\) to \(\Sigma \) are given by

$$\begin{aligned} {\mathfrak {N}}_{a}^{-}= & {} [0,B(r_{\Sigma },t),0,0], \end{aligned}$$
(25a)
$$\begin{aligned} {\mathfrak {N}}_{a}^{+}= & {} \left( 1-\frac{2m}{\textsf {r}_{\Sigma }}+2\frac{d\textsf {r}_ {\Sigma }}{dv}\right) ^{-\frac{1}{2}}\left( -\frac{d\textsf {r}_{\Sigma }}{dv},1,0,0\right) . \end{aligned}$$
(25b)

The nonvanishing extrinsic curvature components (6b) for the interior and exterior spacetimes are given by

$$\begin{aligned} K_{\tau \tau }^{-}= & {} \left( -\frac{1}{B}\frac{A'}{A}\right) _{\Sigma }, \end{aligned}$$
(26a)
$$\begin{aligned} K_{\theta \theta }^{-}= & {} \left( \frac{YY'}{B}\right) _{\Sigma }, \end{aligned}$$
(26b)
$$\begin{aligned} K_{\phi \phi }^{-}= & {} \sin ^2\theta K_{\theta \theta }^{-}, \end{aligned}$$
(26c)
$$\begin{aligned} K_{\tau \tau }^{+}= & {} \left( \frac{\grave{\grave{v}}}{\grave{v}}-\grave{v}\frac{m}{\textsf {r}^2}+ \grave{v}\frac{m_{\textsf {r}}}{\textsf {r}}\right) _{\Sigma }, \end{aligned}$$
(26d)
$$\begin{aligned} K_{\theta \theta }^{+}= & {} \left( \grave{v}\left( 1-\frac{2m}{\textsf {r}}\right) -\textsf {r}\grave{\textsf {r}}\right) _ {\Sigma }, \end{aligned}$$
(26e)
$$\begin{aligned} K_{\phi \phi }^{+}= & {} \sin ^2\theta K_{\theta \theta }^{+}, \end{aligned}$$
(26f)

for \({\mathscr {M}}^{-}\) and \({\mathscr {M}}^{+}\) respectively, and the derivative \({}^{\grave{}}\equiv \frac{d}{d\tau }\) on the hypersurface \(\Sigma \). Therefore, the necessary and sufficient conditions on the spacetimes for the first junction condition (6a) to be valid are

$$\begin{aligned} (Adt)_{\Sigma }= & {} \left( 1-\frac{2m}{\textsf {r}}+2\frac{d\textsf {r}}{dv}\right) _{\Sigma }, \end{aligned}$$
(27a)
$$\begin{aligned} Y_{\Sigma }= & {} \textsf {r}_{\Sigma }(v). \end{aligned}$$
(27b)

Using equations (26a), (26b), (26d) and (26e), we have the second junction conditions

$$\begin{aligned} \left( -\frac{1}{B}\frac{A'}{A}\right) _{\Sigma }= & {} \left( \frac{\grave{\grave{v}}}{\grave{v}}-\grave{v}\frac{m}{\textsf {r}^2}+\grave{v} \frac{m_{\textsf {r}}}{\textsf {r}}\right) _{\Sigma }, \end{aligned}$$
(28a)
$$\begin{aligned} \left( \frac{YY'}{B}\right) _{\Sigma }= & {} \left( \grave{v}\left( 1-\frac{2m}{\textsf {r}}\right) -\textsf {r}\grave{\textsf {r}}\right) _{\Sigma }, \end{aligned}$$
(28b)

Using the Eq. (28b), we can write the mass function, with the aid of (27) as

$$\begin{aligned} m(v,\textsf {r})=\left[ \frac{Y}{2}\left( 1+\frac{\dot{Y}^2}{A^2}-\frac{Y'^2}{B^2}\right) \right] _{\Sigma }, \end{aligned}$$
(29)

which is expressed only in terms of the metric potentials A, B and Y, and contains the total energy within \(\Sigma \). Using (27) and the mass function (29), and substituting these into (28b) gives

$$\begin{aligned} \grave{v}_{\Sigma }=\left( \frac{Y'}{B}+\frac{\dot{Y}}{A}\right) ^{-1}. \end{aligned}$$
(30)

Differentiating (30) with respect to \(\tau \), gives \(\grave{\grave{v}}\). Substituting \(\grave{v}\), \(\grave{\grave{v}}\) and the mass function (29) into (28a) yields after some calculation, the condition at the stellar surface

$$\begin{aligned} \frac{2\dot{Y}'}{ABY}-2\frac{\dot{B}Y'}{AB^2Y}-2\frac{A'\dot{Y}}{A^2BY}-2\frac{m_{\textsf {r}}}{\textsf {r}^2}\nonumber \\ -\frac{1}{A^2}\left( -2\frac{\ddot{Y}}{Y}-\frac{\dot{Y}^2}{Y^2}+2\frac{\dot{A}\dot{Y}}{AY}\right) \nonumber \\ -\frac{1}{B^2}\left( \frac{Y'^2}{Y^2}+2\frac{A'Y'}{AY}\right) +\frac{1}{Y^2}= & {} 0. \end{aligned}$$
(31)

Observe that the result (31) is a shearing generalisation of the shear-free equation to which it reduces to when \(\sigma =0\). The Eq. (31) can be written in terms of the matter variables, with the aid of the field equations (18b) and (18d), as

$$\begin{aligned} 8\pi (q+\epsilon )_{\Sigma }= & {} \left[ 8\pi \left( p+\epsilon -\mu +\frac{2}{3}\Delta -\frac{1}{8\pi }\frac{Q^2}{Y^4}\right) +2\frac{m_{\textsf {r}}}{\textsf {r}^2}\right] _{\Sigma }. \end{aligned}$$

This simplifies to

$$\begin{aligned} 8\pi p\bigg |_{\Sigma }=\left[ 8\pi \left( q+\mu -{\bar{\mu }}-\frac{2}{3}\Delta \right) +\frac{Q^2}{Y^4}\right] _{\Sigma }, \end{aligned}$$
(32)

since \(2\frac{m_{\textsf {r}}}{\textsf {r}^2}=8\pi {\bar{\mu }}\) in (24b). We observe from (11) and (32) that an equivalent form of our result is

$$\begin{aligned} 8\pi p_{||}\bigg |_{\Sigma }=\left[ 8\pi \left( q+\mu -{\bar{\mu }}\right) +\frac{Q^2}{Y^4}\right] _{\Sigma }, \end{aligned}$$
(33)

so that p and \(\Delta \) have been replaced by the radial pressure \(p_{||}\). The form (32) makes it easier to compare with earlier results. For example, when \(\Delta =\mu ={\bar{\mu }}=Q=0\) we regain the boundary condition of Santos [35] and with \(\Delta =Q=0\), we regain the result of Maharaj and Brassel [40]. In addition, the boundary condition (32) has to be considered together with the field equations (18) for a complete model of a radiating star. The anisotropy \(\Delta \) (or the tangential pressure \(p_{\perp }\)) affects the dynamics of the model.

The pressure p at the stellar surface \(\Sigma \) depends on exterior quantity \({\bar{\mu }}\), the interior quantities \(\mu \), q, \(\Delta \) and the charge l of the radiating star. These physical quantities determine the evolution of the radiating star in general relativity. Our result emphasises the importance of taking into consideration different matter distributions in the energy momentum tensor (1), for the interior, and the matter tensor (20), for the exterior. The matter variables q, \(\mu \), \({\bar{\mu }}\), \(\Delta \) and l directly affect the pressure p at the stellar surface. Our result (32) reduces to that of Maharaj and Brassel [40]

$$\begin{aligned} p\bigg |_{\Sigma }=\left( q+\mu -{\bar{\mu }}-\frac{2}{3}\Delta \right) _{\Sigma }, \end{aligned}$$
(34)

in the absence of charge. The significant physical observation that follows from our analysis of the Einstein-Maxwell system is that the internal charge directly affects the pressure at the boundary of the radiating star. It leads to greater pressure at the stellar surface slowing down gravitational collapse. This is consistent with many static relativistic models in which the presence of charge distributions close to the stellar surface may be significant, and this works against gravitational collapse, see for example [2, 57,58,59]. As far as we are aware, this is a new physical feature for a radiating star with the generalised Vaidya spacetime describing the external stellar atmosphere. The charged Vaidya spacetime is a special case in which (32) takes a simpler form. We discuss the change in the form of (32) for the charged Vaidya exterior in the next section.

We can now state our result as the following theorem:

Theorem 1

Consider two four-dimensional spacetime manifolds \({\mathscr {M}}^{-}\) and \({\mathscr {M}}^{+}\) connected by the three-dimensional comoving boundary surface \(\Sigma \). The interior spacetime \({\mathscr {M}}^{-}\) is described by the general spherically symmetric metric with a matter field containing a combination of a barotropic fluid, an electromagnetic field, null dust and a null string fluid. The exterior spacetime \({\mathscr {M}}^{+}\) is described by the generalised Vaidya metric containing null dust and a null string fluid. The pressure at the boundary \(\Sigma \) is then given by

$$\begin{aligned} 8\pi p\bigg |_{\Sigma }=\left[ 8\pi \left( q+\mu -{\bar{\mu }}-\frac{2}{3}\Delta \right) +\frac{Q^2}{Y^4}\right] _{\Sigma }, \end{aligned}$$

relating the internal heat flux q, the string density \(\mu \), the anisotropy \(\Delta \) and the total charge \(Q=Q(r)\big |_{\Sigma }\) to the external string density \({\bar{\mu }}\).

5 Charged Vaidya

The mass function \(m(v,\textsf {r})\), given by equation (29) describing the exterior spacetime, is valid for all types of matter distributions and represents the gravitational energy contained in an four-dimensional hypersphere within the boundary \(\Sigma \). The physical features of the model will determine the various forms of \(m(v,\textsf {r})\) that are permissible. Dawood and Ghosh [60] list the forms of \(m(v,\textsf {r})\) corresponding to Type II fluids and their related energy conditions. These contain the Vaidya, charged Vaidya, ds/Ads global monopole, Husain and Harko-Cheng metrics as indicated in [60].

In the context of radiating stars, the charged Vaidya metric is of particular importance. It is illuminating to observe the role of the mass function for a charged distribution. The mass function in this case becomes

$$\begin{aligned} m(v,\textsf {r})=M(v)-\frac{Q^2}{2\textsf {r}}, \end{aligned}$$
(35)

which gives

$$\begin{aligned} m_{\textsf {r}}=\frac{Q^2}{2\textsf {r}^2}. \end{aligned}$$
(36)

Equation (29) can then be written as

$$\begin{aligned} M(v)= & {} \left[ \frac{Y}{2}\left( 1+\frac{\dot{Y}^2}{A^2}-\frac{Y'^2}{B^2}\right) +\frac{Q^2}{2\textsf {r}}\right] _{\Sigma }. \end{aligned}$$
(37)

With the form of (35), the exterior spacetime (19) becomes

$$\begin{aligned} ds^2_{+}= & {} -\left( 1-\frac{2M(v)}{\textsf {r}}+\frac{Q^2}{\textsf {r}^{2}}\right) dv^2\nonumber \\&-2dvd\textsf {r}+\textsf {r}^2(d\theta ^2+\sin ^2\theta d\phi ), \end{aligned}$$
(38)

which is the charged Vaidya spacetime in four dimensions. Also, from the Einstein field equation (24b), we get

$$\begin{aligned} 8\pi {\bar{\mu }}=\frac{Q^2}{\textsf {r}^4}. \end{aligned}$$
(39)

Hence equation (32) becomes

$$\begin{aligned} p\bigg |_{\Sigma }= & {} \left\{ q+\mu -\frac{2}{3}\Delta \right\} _{\Sigma }, \end{aligned}$$
(40)

where we have used the fact that \(Y_{\Sigma }=\textsf {r}_{\Sigma }\) from (27b).

It is interesting to observe that the charge distribution Q(r) of the stellar interior does not appear in the boundary condition (40). This is true only for the mass function (35) corresponding to the charged Vaidya exterior atmosphere. On physical grounds we interpret this to mean that an external observer detects only the charge distribution contained within the boundary of the star with no charge contribution from the external Vaidya atmosphere.

In the case when \(\mu =\Delta =0\), the condition (40) reduces to the results of Tikekar and Patel [37], Maharaj and Govender [39] and Di Prisco et al. [41].

6 Special cases

It should be noted that the above Theorem 1 holds in the presence of null matter, shear, anisotropy and charge, and it is the most general result known for spherical symmetry. We are now in the position to state several consequences in the form of corollaries.

Corollary 1

The boundary condition (32) holds for a composite matter distribution across a comoving surface \(\Sigma \). The interior matter distribution comprises of null dust, a null string, barotropic matter and an electromagnetic field. The exterior matter distribution is a combination of null dust and a null string.

Corollary 2

The interior manifold \({\mathcal {M}}^{-}\) is the general spherically symmetric metric and the exterior \({\mathcal {M}}^{+}\) is described by the generalised Vaidya metric; both spacetimes match smoothly across \(\Sigma \).

Corollary 3

The interior manifold \({\mathcal {M}}^{-}\) may be expanding, accelerating and shearing in general. The special cases of

  • conformally flat,

  • expansion-free,

  • geodesic,

  • shear-free,

spacetimes arise as particular cases of the boundary condition (32).

Corollary 4

In the absence of charge, the boundary condition is given by (34). All previous treatments with uncharged matter are contained in our cases.

Corollary 5

The isotropic pressure p on the surface \(\Sigma \) may be nonzero even if the heat flux vanishes for a composite matter distribution.

It is important to note that our analysis is general and all previous treatments of the matching conditions across a comoving surface are contained in our treatment. The presence of a composite matter distribution leads to several interesting physical features. For example, consider the treatment of [35] whom matches an interior uncharged fluid to the external pure Vaidya spacetime leading to \((p=q)_\Sigma \). Therefore the pressure vanishes if and only if the heat flux is absent. For the composite distribution the isotropic pressure p in (32) may be nonzero even if the internal flux is absent with \(q=0\). This is possible because of the presence of the matter quantities \(\mu \), \({\bar{\mu }}\), \(\Delta \) and Q in (32).

Particular spacetimes of physical interest are related to the boundary condition (32) across a comoving surface \(\Sigma \). The relevant spacetimes include the Schwarzschild, Reissner–Nordström, Vaidya, charged Vaidya, composite and charged composite metrics. We find the spacetimes by specifying particular forms of the mass function \(m(v,\textsf {r})\). The various possibilities are listed in Table 1.

Table 1 Spacetimes, mass functions and boundary conditions

7 Discussion

We have modeled a radiating star with general spherical symmetry containing a composite matter distribution in the presence of an electromagnetic field across a comoving surface \(\Sigma \). We summarized our result in Theorem 1 with the pressure at \(\Sigma \) given by Eq. (32). To cater for various physical scenarios we have taken the stellar interior to contain a combination of a barotropic fluid, null dust and a null string fluid in the presence of an electromagnetic field. The stellar exterior consists of a combination of null dust and a null string fluid. The matching conditions show that the pressure at the surface \(\Sigma \) depends on the internal heat flux q, the anisotropy \(\Delta \), the charge Q, the string density \(\mu \) and the external string density \({\bar{\mu }}\). This shows that they dynamical behaviour of a composite stellar object is more complex than relativistic stars which have only the Vaidya as the exterior. The pressure p at \(\Sigma \) may be nonzero even if \(q=0\) for a composite fluid; for a barotropic fluid in Vaidya space, \(q=0\) implies that \(p=0\) on \(\Sigma \). We considered the special case of the charged Vaidya spacetime and showed that the relationship \(8\pi {\bar{\mu }}=\frac{2m_{\textsf {r}}}{\textsf {r}^2}=\frac{Q^2}{\textsf {r}^4}\) holds. This condition leads to the equation

$$\begin{aligned} p\bigg |_{\Sigma }=\left( q+\mu -{\bar{\mu }}-\frac{2}{3}\Delta \right) _{\Sigma }, \end{aligned}$$

and the charge Q does not appear explicitly in the boundary condition which is consistent with earlier treatments. For other forms of the mass function \(m(v,\textsf {r})\), in an electromagnetic field, the charge Q(r) appears explicitly in the boundary condition. We regained the physically important spacetimes in relativistic astrophysics corresponding to the metrics of Schwarzschild, Reissner–Nordström, Vaidya, charged Vaidya and the composite. The general case is the charged composite distribution considered in this paper. These physically interesting cases for the general composite distribution are listed in Table 1.