1 Introduction

Since the birth of the Einstein gravity theory, general relativity (GR). It has been a great challenge to find solutions that describe a well behaved structures from the physical point of view in the Universe. The first who gives an exact solution to Einstein field equations describing the exterior of a spherically symmetric and static fluid sphere was Schwarzschild [1]. Then R. Tolman found several solutions corresponding to a perfect fluid matter distributions [2], but was G. Lamaitre who pointed out that all the structures inside the Universe may contain anisotropic matter distributions, explaining that the spherically symmetry do not require the isotropic condition \(p_{r}=p_{t}\) at all [3]. On the other hand, the work of Bowers and Liang, about local anisotropic equation of state for relativistic spheres [4], allowed a better understanding respect to this type of matter distributions. Also the studies of Ruderman about more realistic stellar models show that the nuclear matter may be anisotropic at least in certain very high density ranges \((\rho >10^{15} \mathrm{g/cm}^{3})\), where the nuclear interactions must be treated relativistically [5]. In the recent years several works available in the literature [6,7,8,9,10,11] (and reference contained therein) address this issue in order to examined how anisotropic matter distribution affects on the effective mass, radius of the stars, central energy density, critical surface red-shift and stability of highly compact bodies, since in some cases the presence of anisotropy rises in a repulsive force (\(p_{t}>p_{r}\)) which counteracts the gravitational gradient [12]. Moreover, models with a matter tensor containing anisotropy, must be consistent with physical requirements for astrophysical applications. This is so because the presence of anisotropic pressures leads to values of observed compactness parameters for several astrophysical bodies [7].

All the mentioned works above, concerned only a neutral spherically symmetric and static configurations. However, it is also interesting study these fluid spheres in presence of a static electric field. As a extension of the exterior Schwarzschild’s solution to this context, we have the well known Reissner–Nordstrom solution [13, 14]. As was pointed out by Thirukkanesh et al. [15] it is interesting to note that, in presence of the electromagnetic fields, the collapse of a spherically symmetric matter distribution to a point singularity may be avoided during the gravitational collapse or during an accretion process onto compact object [16]. In this scenario, the gravitational attraction is counterbalanced by the repulsive Coulomb force in addition to the pressure gradient [17]. Another important feature is related with the energy density associated to the electric field, which has a significant role in producing the gravitational mass of the object [18]. In fact, several literature [19,20,21,22,23,24] can be referred to understand the effects of the electric charge on the relativistic compact stellar system. In a more widely context, charged self-gravitating anisotropic fluid spheres have been extensively investigated in general relativity since the pioneering work of Bonnor [25]. In fact, the presence of anisotropy + static electric field enhances the stability and equilibrium conditions of compact objects [11, 18, 26,27,28]. Of course, as mentioned earlier each of these ingredients counteracts the gravitational force.

So, in the present work we obtain from the charged isotropic Heinzmann’s interior solution describing compact star [15], an anisotropic extension. It’s achieved employing the so called minimal geometric deformation approach (MGD) [29, 30]. This method was originally proposed in the context of the Randall–Sundrum braneworld [31, 32] and was designed to deform the standard Schwarzschild solution [33, 34]. The main point of this scheme is that the isotropic and anisotropic sectors can be split. Therefore, the decoupling of both gravitational sources can be done in a simple form establishing a novel way to search new families of anisotropic solutions of Einstein field equations.

The paper is organized as follows: Sect. 2 presents the Einstein field equations for an anisotropic matter distributions. In Sect. 3 the MGD approach is presented in brief, in order to explain how to generate arbitrary anisotropic solutions. Section 4 is devoted to apply this method to a particular seed solution, the charged isotropic Heinzmann model for compact objects. In Sect.  5 we analyzed all the requirements for a well behaved solution from the physical point of view. Finally, in Sect. 6 we give some conclusions for the reported study.

2 Main field equations for anisotropic distributions

The starting point is the static, spherically symmetric line element represented in Schwarzschild-like coordinates. It reads

$$\begin{aligned} ds^{2}=e^{\nu }dt^{2}-e^{\lambda }dr^{2}-r^{2}\left( d\theta ^{2}+\sin ^{2}\theta d\phi ^{2}\right) , \end{aligned}$$
(1)

where \(\nu =\nu (r)\) and \(\lambda =\lambda (r)\). The metric (1) is a generic solution of the Einstein field equations

$$\begin{aligned} R_{\mu \nu }-\frac{1}{2}Rg_{\mu \nu }=-\kappa {T}_{\mu \nu }, \end{aligned}$$
(2)

describing an anisotropic fluid sphere. The coupling constant is given by \(\kappa =\frac{8\pi G}{c^{4}}\), from now on we will employ relativistic geometrized units, that is \(c=G=1\).

The stress-energy tensor \({T}_{\mu \nu }\) corresponding to an anisotropic matter distribution, in an orthonormal basis is characterized by \({\rho }\), \({p}_{r}\) and \({p}_{t}\) [35], which are related to the metric functions \(\nu \) and \(\lambda \) through (2). Then the field equations explicitly reads

$$\begin{aligned} 8\pi {\rho }= & {} \frac{1}{r^2}-e^{-\lambda }\left( \frac{1}{r^2}-\frac{\lambda ^{\prime }}{r}\right) \end{aligned}$$
(3)
$$\begin{aligned} 8\pi {p}_{r}= & {} -\frac{1}{r^2}+e^{-\lambda }\left( \frac{1}{r^2}-\frac{\nu ^{\prime }}{r}\right) \end{aligned}$$
(4)
$$\begin{aligned} 8\pi {p}_{t}= & {} \frac{1}{4}e^{-\lambda }\left( 2\nu ^{\prime \prime }+\nu ^{\prime 2}-\lambda ^{\prime }\nu ^{\prime }+2\frac{\nu ^{\prime }-\lambda ^{\prime }}{r}\right) . \end{aligned}$$
(5)

The primes denote differentiation with respect to r. Bianchi identity invokes the following conservation equation for the stress-energy tensor

$$\begin{aligned} \nabla ^{\nu }{T}_{\mu \nu }=0. \end{aligned}$$
(6)

On the other hand we will make use the following representation for the energy-momentum tensor

$$\begin{aligned} {T}_{\mu \nu }=\tilde{T}_{\mu \nu } + \alpha \theta _{\mu \nu }, \end{aligned}$$
(7)

where the first term in the right hand side represents an isotropic perfect fluid,

$$\begin{aligned} \tilde{T}_{\mu \nu }=\left( \tilde{\rho }+\tilde{p}\right) u_{\mu }u_{\nu }-\tilde{p}g_{\mu \nu }, \end{aligned}$$
(8)

representing the vector \(u^{\mu }=e^{-\nu (r)/2}\delta ^{\mu }_{0}\) the unit timelike four-velocity. Along this work the thermodynamics observable \(\tilde{\rho }\) and \(\tilde{p}\), correspond to charged isotropic Heintzmann interior solution [15]. According to this representation, the extra gravitational contribution is given by the \(\theta \)-term, which causes a deviation from GR. In principle this additional gravitational source can be e.g. a scalar field, a vector field or a tensor field. It is coupled to gravity via a dimensionless parameter \(\alpha \). It noteworthy that in the limit \(\alpha \rightarrow 0\) GR is recovered, i.e. Einstein equations for isotropic matter distributions are obtained.

In the system of Eqs. (3)–(5), \({\rho }\), \({p}_{r}\) and \({p}_{t}\) represent the effective density, the effective radial pressure and the effective tangential pressure respectively, that are given by

$$\begin{aligned} {\rho }= & {} \tilde{\rho }+\alpha \theta ^{t}_{t} \end{aligned}$$
(9)
$$\begin{aligned} {p}_{r}= & {} \tilde{p}-\alpha \theta ^{r}_{r} \end{aligned}$$
(10)
$$\begin{aligned} {p}_{t}= & {} \tilde{p}-\alpha \theta ^{\varphi }_{\varphi }. \end{aligned}$$
(11)

Hence, it is clear that the presence of the \(\theta \)-term raises an anisotropy if \(\theta ^{r}_{r}\ne \theta ^{\varphi }_{\varphi }\). Thus the effective anisotropy is defined as

$$\begin{aligned} \varPi \equiv {p}_{t}-{p}_{r}=\alpha \left( \theta ^{r}_{r}- \theta ^{\varphi }_{\varphi }\right) \end{aligned}$$
(12)

Taking into account the expression (7) the corresponding conservation law (6) yields to

$$\begin{aligned}&\tilde{p}^{\prime }+\frac{\nu ^{\prime }}{2}\left( \tilde{p}+\tilde{\rho }\right) -\alpha \bigg [\left( \theta ^{r}_{r}\right) ^{\prime } +\frac{\nu ^{\prime }}{2}\left( \theta ^{r}_{r}-\theta ^{t}_{t}\right) \nonumber \\&\quad +\frac{2}{r}\left( \theta ^{r}_{r}-\theta ^{\varphi }_{\varphi }\right) \bigg ]=0, \end{aligned}$$
(13)

being the above expression a linear combination of the Eqs. (3)–(5). To solve the system of Eqs. (3)–(5) we will face it applying the MGD scheme [29].

3 Minimal geometric deformation scheme in brief

Here we present in short the MGD approach, an extensive development of this method is given in references [36,37,38,39,40,41] and recent applications of it can be found in [42,43,44,45]. So this scheme causes an anisotropic modification to usual solutions of Einstein field equations. In order to tackle the system of Eqs. (3)–(5), we take a spherically symmetric isotropic matter distribution, this is \(p_{r}=p_{t}=p\). From this seed solution also are known the metric functions \(e^{\lambda }\) and \(e^{\nu }\). The output will be a shift in the effective pressures such that \(p_{r}\ne p_{t}\). To accomplish it, one makes a most general minimal geometric deformation on the temporal and radial metric functions keeping the spherically symmetry of the original solution

$$\begin{aligned} e^{\nu (r)}\mapsto & {} e^{\nu (r)}+\alpha h^{*}(r) \end{aligned}$$
(14)
$$\begin{aligned} e^{-\lambda (r)}\mapsto & {} \mu (r)+\alpha f^{*}(r). \end{aligned}$$
(15)

In the above linear mapping \( h ^ {*} (r) \) and \( f ^ {*} (r) \) are the corresponding deformations. In principle the method allows to us set \( h ^ {*} (r) = 0 \). Therefore all the anisotropic sector \(\theta _{\mu \nu }\) relies over the radial deformation (15). The most remarkable feature of the MGD method is that it decouple the system (3)–(5) resulting in two separated system of equations related only by the metric function \(\nu \). One of them corresponds to the standard Einstein equations for the chosen solution (perfect fluid solution), and the second one an effective “quasi-Einstein” system of equations to the anisotropic sector. Then we have

$$\begin{aligned} 8\pi \tilde{\rho }= & {} \frac{1}{r^{2}}-\frac{\mu }{r^{2}}-\frac{\mu ^{\prime }}{r} \end{aligned}$$
(16)
$$\begin{aligned} 8\pi \tilde{p}= & {} -\frac{1}{r^{2}}+\mu \left( \frac{1}{r^{2}}+\frac{\nu ^{\prime }}{r}\right) \end{aligned}$$
(17)
$$\begin{aligned} 8\pi \tilde{p}= & {} \frac{\mu }{4}\left( 2\nu ^{\prime \prime }+\nu ^{\prime 2}+2\frac{\nu ^{\prime }}{r}\right) +\frac{\mu ^{\prime }}{4}\left( \nu ^{\prime }+\frac{2}{r}\right) , \end{aligned}$$
(18)

along with the conservation equation

$$\begin{aligned} \tilde{p}^{\prime }+\frac{\nu ^{\prime }}{2}\left( \tilde{\rho } +\tilde{p}\right) =0, \end{aligned}$$
(19)

this is a linear combination of the Eqs. (16)–(18). On the other hand we have the following equations to the \(\theta \)- sector

$$\begin{aligned} 8\pi \theta ^{t}_{t}= & {} -\frac{f^{*}}{r^{2}}-\frac{f^{*\prime }}{r} \end{aligned}$$
(20)
$$\begin{aligned} 8\pi \theta ^{r}_{r}= & {} -f^{*}\left( \frac{1}{r^{2}}+\frac{\nu ^{\prime }}{r}\right) \end{aligned}$$
(21)
$$\begin{aligned} 8\pi \theta ^{\varphi }_{\varphi }= & {} -\frac{f^{*}}{4}\left( 2\nu ^{\prime \prime }+\nu ^{\prime 2}+2\frac{\nu ^{\prime }}{r}\right) -\frac{f^{*\prime }}{4}\left( \nu ^{\prime }+\frac{2}{r}\right) . \end{aligned}$$
(22)

The corresponding conservation equation \(\nabla ^{\nu }\theta _{\mu \nu }=0\) then yields to

$$\begin{aligned} \left( \theta ^{r}_{r}\right) ^{\prime }-\frac{\nu ^{\prime }}{2}\left( \theta ^{t}_{t}-\theta ^{r}_{r}\right) -\frac{2}{r}\left( \theta ^{\varphi }_{\varphi }-\theta ^{r}_{r}\right) =0. \end{aligned}$$
(23)

Being the Eq. (23) a linear combination of the quasi-Einstein equations. At this stage it is clear that the interaction between the two sectors is completely gravitational. It is reflected in the Eqs. (19) and (23), where both sectors are individually conserved.

Summarizing, we began with a complete general system of Eqs. (3)–(5). Then a linear mapping over the radial metric function is performed (15), which leads to two decoupled system of equations. The system corresponding to a perfect fluid sector \(\{\tilde{\rho },\tilde{p},\nu ,\mu \}\) given by (16)–(18) is completely determined once we pick a well behaved isotropic solution. To the remainnig Eqs. (20)–(22) one can imposes some constrints over the unknown functions \(\{f^{*},\theta ^{t}_{t},\theta ^{r}_{r},\theta ^{\varphi }_{\varphi }\}\) in order to generate the anisotropic solution, which it described by the thermodynamic observables (9)–(11).

4 Charged anisotropic Heintzmann solution

The above explanation w.r.t MGD approach, is the most general case where the input corresponds to a perfect fluid solution. However, the seed can be another type of matter distribution. For example, it could be anisotropic from the beginning i.e described by

$$\begin{aligned} \tilde{T}_{\mu \nu }=\left( \tilde{\rho }+\tilde{p}_{r}\right) u_{\mu }u_{\nu }-\tilde{p}_{t}g_{\mu \nu }+\left( \tilde{p}_{r}-\tilde{p}_{t}\right) \eta _{\mu }\eta _{\nu }, \end{aligned}$$
(24)

with \(u_{\mu }\) being the fluid four-velocity and \(\eta _{\mu }\) a spacelike vector which is orthogonal to \(u_{\mu }\). Another option is take a perfect fluid coupled to a static electric field (like in our case), where the energy-momentum tensor reads

$$\begin{aligned} \begin{aligned} \tilde{T}_{\mu \nu }&=\left( \tilde{\rho }+\tilde{p}\right) u_{\mu }u_{\nu }-\tilde{p}g_{\mu \nu } +\frac{1}{4\pi }\bigg (-F_{\mu }^{\sigma }F_{\nu \sigma } \\&\quad +\frac{g_{\mu \nu }}{4}F^{\alpha \beta }F_{\alpha \beta }\bigg ). \end{aligned} \end{aligned}$$
(25)

Here \(F_{\mu \nu }\) is the anti-symmetric electromagnetic field tensor and can be defined as

$$\begin{aligned} F_{\mu \nu }=\partial _{\mu }A_{\nu }-\partial _{\nu }A_{\mu } \end{aligned}$$
(26)

where \(A_{\mu }=\left( \phi (r),0,0,0\right) \) is the four-potential. \(F_{\mu \nu }\) satisfies the covariant Maxwell equations, given by

$$\begin{aligned}&\partial _{\mu }\left[ \sqrt{-g}F^{\nu \mu }\right] =4\pi \sqrt{-g} J^{\nu }, \end{aligned}$$
(27)
$$\begin{aligned}&\partial _{\alpha }F_{\beta \sigma }+\partial _{\beta } F_{\sigma \alpha }+\partial _{\sigma }F_{\alpha \beta }=0, \end{aligned}$$
(28)

where \(J^{\nu }\) is the electromagnetic four-current vector defined as

$$\begin{aligned} J^{\nu }=\sigma u^{\nu }, \end{aligned}$$
(29)

where \(\sigma =e^{\nu /2}J^{0}(r)\) represents the charge density and g is the determinant of the metric (1), which explicitly reads

$$\begin{aligned} g=-e^{\nu +\lambda }r^{4}\sin ^{2}\theta . \end{aligned}$$
(30)

For a static spherically symmetric stellar system \(J^{0}\) is the only non vanishing component of the electromagnetic four-current \(J^{\nu }\) which is a purely radial function. The only non zero components of the electromagnetic field tensor are \(F^{01}\) and \(F^{10}\), which are related by \(F^{01}=-F^{10}\). Being both the radial component of the electric field. From Eqs. (27) and (29) the electric field E(r) reads

$$\begin{aligned} E(r)=F^{01}(r)=\frac{4\pi }{r^{2}}e^{-(\nu +\lambda )/2}\int ^{r}_{0}r^{\prime 2}\sigma e^{\lambda } dr^{\prime }, \end{aligned}$$
(31)

and the total charge q(r) is given by

$$\begin{aligned} q(r)={E(r)}{r^{2}}. \end{aligned}$$
(32)

So, from the expressions (27), (29), (31) and (32) the energy-momentum tensor (25) becomes

$$\begin{aligned} T_{\mu \nu }=diag\left( -\tilde{\rho }-\frac{E^{2}}{8\pi },\tilde{p}-\frac{E^{2}}{8\pi },\tilde{p}+\frac{E^{2}}{8\pi },\tilde{p}+\frac{E^{2}}{8\pi }\right) . \end{aligned}$$
(33)

Thus, the Einstein–Maxwell equations for (33) are

$$\begin{aligned} 8\pi \tilde{\rho }+E^{2}= & {} \frac{1}{r^{2}}-\frac{\mu }{r^{2}}-\frac{\mu ^{\prime }}{r} \end{aligned}$$
(34)
$$\begin{aligned} 8\pi \tilde{p}-E^{2}= & {} -\frac{1}{r^{2}}+\mu \left( \frac{1}{r^{2}}+\frac{\nu ^{\prime }}{r}\right) \end{aligned}$$
(35)
$$\begin{aligned} 8\pi \tilde{p}+E^{2}= & {} \frac{\mu }{4}\left( 2\nu ^{\prime \prime }+\nu ^{\prime 2}+2\frac{\nu ^{\prime }}{r}\right) +\frac{\mu ^{\prime }}{4}\left( \nu ^{\prime }+\frac{2}{r}\right) . \end{aligned}$$
(36)

Now let’s apply the MGD approach in order to solve the Einstein field equations for the interior of charged anisotropic compact stars. We take as a seed the charged Heintzmann solution \(\{\nu ;\mu ;\tilde{\rho };\tilde{p}\}\) modelling compact objects [15]. As said above, MGD approach decouple the system of Eqs. (3)–(5), one of them corresponding in this case to the Einstein–Maxwell system (34)–(36), solved once the seed solution is specified. In this case we have that the seed is described by

$$\begin{aligned} \tilde{\rho }(r)= & {} \frac{1}{16\pi }\Bigg [\frac{\left( 12a^{3}r^{4}+39a^{2}r^{2} +9a\right) \left( 1+4ar^{2}\right) ^{1/2}}{\left( 1+4ar^{2}\right) ^{3/2}\left( 1+ ar^{2}\right) ^{2}} \nonumber \\&+\frac{9\left( 1+3ar^{2}\right) ac-2\left( 32r^{4}a^{2}+46ar^{2}+11\right) \beta r^{2}}{\left( 1+4ar^{2}\right) ^{3/2}\left( 1+ar^{2}\right) ^{2}}\Bigg ],\nonumber \\ \end{aligned}$$
(37)
$$\begin{aligned} \tilde{p}(r)= & {} \frac{3}{16\pi }\Bigg [\frac{\left( 3a-3a^{2}r^{2}\right) \left( 1+4ar^{2}\right) ^{1/2}-\left( 1+7ar^{2}\right) ca}{\left( 1+4ar^{2}\right) ^{1/2}\left( 1+ar^{2}\right) ^{2}} \nonumber \\&+\frac{\left( 2+12r^{2}\right) \beta r^{2}}{\left( 1+4ar^{2}\right) ^{1/2}\left( 1+ar^{2}\right) ^{2}}\Bigg ], \end{aligned}$$
(38)

with the following metric components

$$\begin{aligned} e^{\nu (r)}= & {} A^{2}\left( 1+ar^{2}\right) ^{3} \end{aligned}$$
(39)
$$\begin{aligned} \mu (r)= & {} 1-\frac{3ar^{2}}{2}\left[ \frac{1+\left( c-\frac{4\beta r^{2}}{3a}\right) \left( 1+4ar^{2}\right) ^{-1/2}}{1+ar^{2}}\right] ,\nonumber \\ \end{aligned}$$
(40)

which are regular everywhere inside the star even at the center \(r=0\), where \(e^{\lambda (r=0)}=\mu (r=0)=1\) and \(e^{\nu (r=0)}> 0\). The constant parameters A, a, c and \(\beta \), will be determined using junction conditions at the surface \(r=R\). For this purpose the interior solution will be joined smoothly at the surface of spheres with the exterior Reissner–Nordstrom solution. Here the \(\beta \) parameter is related with the electric field, given by

$$\begin{aligned} E^{2}(r)=\frac{\beta r^{2}\sqrt{1+4ar^{2}}}{\left( 1+ar^{2}\right) ^{2}}. \end{aligned}$$
(41)

Once the system of Eqs. (3)–(5) has been decoupled, the remaining Eqs. (20)–(22) must be solved in order to obtain an anisotropic solution. For that, it is unavoidable to choose reasonable constraints that lead to physically acceptable solutions. The next section shows at least one restriction that leads to an admissible solution from the physical point of view.

4.1 Mimicking the pressure for the anisotropy

The closure of the system (3)–(5) must be complemented with extra information. In principle nothing prevents us to choose some expression for \(f^{*}(r)\) that results in a physically well-behaved solution, or perhaps impose some restrictions on \(\theta _{\mu \nu }\) that leads to the desired result. In this opportunity we consider a restriction on \(\theta ^{r}_{r}\), imposing that it be equal to the pressure \(\tilde{p}\) of the seed solution

$$\begin{aligned} \theta ^{r}_{r}(r)=\tilde{p}(r). \end{aligned}$$
(42)

The previous assignment establishes a direct relationship between Eqs. (17) and (21), from which the following expression is derived for \(f^{*}(r)\)

$$\begin{aligned} f^{*}(r)=-\mu (r)+\frac{1}{1+r\nu ^{\prime }(r)}. \end{aligned}$$
(43)

Thus the deformed radial component (15) becomes to

$$\begin{aligned} e^{-\lambda }\mapsto \left( 1-\alpha \right) \mu (r)+\alpha \frac{1+ar^{2}}{1+7ar^{2}}, \end{aligned}$$
(44)

while the temporal component \(e^{\nu }\) remains unchanged. Consequently (39) and (44) constitute the deformed solution

$$\begin{aligned} ds^{2}= & {} A^{2}\left( 1+ar^{2}\right) ^{3}dt^{2}-\Bigg [ \left( 1-\alpha \right) \mu (r) \nonumber \\&+\,\alpha \frac{1+ar^{2}}{1+7ar^{2}}\Bigg ]^{-1}dr^{2} -r^{2}\left( d\theta ^{2}+\sin ^{2}\theta d\phi ^{2}\right) , \end{aligned}$$
(45)

where \(\mu (r)\) is given by (40). Of course, taking \(\alpha =0\) in (44) we recover the original solution (39)–(40).

5 Effective thermodynamic observables and mass function

By virtue of the mimicking (42) and the expression given for \(f^{*}(r)\) in (43), and using the Eqs. (20)–(22) we obtain the following effective thermodynamic observables that characterize the fluid

$$\begin{aligned} {p}_{r}(\alpha ;r)= & {} \left( 1-\alpha \right) \tilde{p} \end{aligned}$$
(46)
$$\begin{aligned} {p}_{t}(\alpha ;r)= & {} {p}_{r}+\frac{\alpha r^{2}}{8\pi }\Bigg [\frac{9a^{2}\left( 7a^{2}r^{4}+10a r^{2}+3\right) }{\left( 1+7ar^{2}\right) ^{2}\left( 1+ar^{2}\right) ^{2}} \nonumber \\&-\frac{\beta \left( 1+4a r^{2}\right) ^{1/2}}{\left( 1+ar^{2}\right) ^{2}}\Bigg ]. \end{aligned}$$
(47)

From the latter equations, the anisotropy is directly computed; comparing with Eq. (12) we obtain

$$\begin{aligned} \varPi (\alpha ;r)= & {} \frac{\alpha r^{2}}{8\pi }\Bigg [\frac{9a^{2}\left( 7a^{2}r^{4}+10a r^{2}+3\right) }{\left( 1+7ar^{2}\right) ^{2}\left( 1+ar^{2}\right) ^{2}} \nonumber \\&-\frac{\beta \left( 1+4a r^{2}\right) ^{1/2}}{\left( 1+ar^{2}\right) ^{2}}\Bigg ]. \end{aligned}$$
(48)

One can go on computing the density following (9) with the temporal component of the anisotropy given by (20)

$$\begin{aligned} {\rho }(\alpha ;r)&=\tilde{\rho }+\frac{\alpha }{16\pi }\bigg [\frac{9a\left( 3ar^{2}+3-7a^{3}r^{6}-31a^{2}r^{4}\right) }{\left( 1+7ar^{2}\right) ^{2}\left( 1+ar^{2}\right) ^{2}} \nonumber \\&\quad +\frac{a^{2}r^{2}\left( 32\beta r^{4}-27c\right) +a\left( 76\beta r^{4}-9c\right) +20\beta r^{2}}{\left( 1+4ar^{2}\right) ^{3/2}\left( 1+ar^{2}\right) ^{2}}\bigg ]. \end{aligned}$$
(49)

As we will see later, an admissible solution must satisfy some general physical requirements. However, we analyze some of them early in order to achieve the corresponding constants parameters that lead a well behaved anisotropic solution. These physical features are respect to the regularity of the effective thermodynamic observables \(\tilde{\rho }\), \(\tilde{p_{r}}\) and \(\tilde{p_{t}}\) inside the star \((0\le r \le R)\). All of them must be positive and monotonically decreasing toward to the surface object. The effective central pressure and density at the interior are given by

$$\begin{aligned} 8\pi {p}_{r}(r=0)= & {} 8\pi {p}_{t}(r=0)=\frac{3a\left( 1-\alpha \right) \left( 3-c\right) }{2}>0,\nonumber \\ \end{aligned}$$
(50)
$$\begin{aligned} 8\pi \rho (r=0)= & {} \frac{9a}{2}\left( c-c\alpha +3\alpha +1\right) >0. \end{aligned}$$
(51)

To satisfy Zeldovich condition at the interior, \({p}_{r}/{\rho }\) at center must be \(\le 1\). Therefore

$$\begin{aligned} \frac{\left( 1-\alpha \right) \left( 3-c\right) }{3\left( c-c\alpha +3\alpha +1\right) }\le 1. \end{aligned}$$
(52)

On using (50) and (52) we get a constraint on c given as

$$\begin{aligned} \frac{3\alpha }{\alpha -1}\le c<3. \end{aligned}$$
(53)

From (46) we obtain an upper limit \(\alpha <1\). This ensures the positiveness of the effective radial pressure \({p}_{r}\) within the star. On the other hand (47) imposes a lower bound \(\alpha >0\), this is so because \({p}_{t}>{p}_{r}>0\) everywhere inside the star. Moreover, we need to ensure the following statement in the surface: \({p}_{r}|_{r=R}=0\) (it determines the star size).

Fig. 1
figure 1

Effective anisotropy factor \(\varPi \), for the strange star candidate \(RXJ 1856-37\)

It is clear from Fig. 1 that the effective anisotropy \(\varPi \), it vanishes at \(r=0\). That is so because at the center the effective radial and transverse pressures coincide. On the other hand, as the radius increases the values of these quantities drift apart, and therefore the anisotropy increases toward the surface of the object.

Table 1 Constant parameters calculated for radii and mass for some strange star candidates with \(\alpha =0.0\)
Table 2 Constant parameters calculated for radii and mass for some strange star candidates with \(\alpha =0.2\)
Table 3 Constant parameters calculated for radii and mass for some strange star candidates with \(\alpha =0.3\)
Fig. 2
figure 2

The mass function m(r) versus the fractional radius r / R, for the strange star candidate \(RXJ 1856-37\). The solid black line corresponds to the seed solution (hereinafter), while the dotted (red line) and the dashed line (green line) are the corresponding minimal deformed metrics for \(\alpha =0.2\) and \(\alpha =0.3\) respectively

5.1 Junction conditions

In order to generate a model of a physically realizable boun -ded object we need to ensure that the interior spacetime \({{\mathscr {M}}^{-}}\) must match smoothly to the exterior spacetime \({{\mathscr {M}}^{+}}\) [46]. In our case, the interior spacetime is given by the deformed metric (45), and since the exterior spacetime is empty, \({{\mathscr {M}}^{+}}\) is taken to be the Reissner–Nordstrom solution

$$\begin{aligned} \begin{aligned} ds^{2}&=\left( 1-\frac{2M}{r}+\frac{Q^{2}}{r^{2}}\right) dt^{2}-\left( 1-\frac{2M}{r}+\frac{Q^{2}}{r^{2}}\right) ^{-1}dr^{2} \\&\quad -r^{2}\left( d\theta ^{2}+\sin ^{2}\theta d\phi ^{2}\right) , \end{aligned} \end{aligned}$$
(54)
Fig. 3
figure 3

a Shows the behaviour of the temporal metric function \(e^{\nu (r)}\). At the center it is completely regular, finite and positive. b Displays the behaviour of the radial function, which is equal to \(e^{\lambda (0)}=1\) at \(r=0\). These plots correspond to the strange star candidate \(RXJ 1856-37\)

Fig. 4
figure 4

Zeldovich’s condition for the ratios \(p_{r}/\rho \) (left panel) and \(p_{t}/\rho \) (right panel) against the dimensionless radius, for the strange star candidate \(RXJ 1856-37\)

Fig. 5
figure 5

a, b Show the dimensionless effective radial and tangential pressure respectively against the dimensionless radius. c Exhibits a comparison between the radial and tangential pressure for \(\alpha =0.2\). The anisotropy causes the pressures values to drift apart. Finally, d shows the dimensionless effective density energy for different values of the constant \(\alpha \). All these plots correspond to the strange star candidate \(RXJ1856-37\)

Fig. 6
figure 6

Variation of the sound speed versus the fractional radius r / R for the strange star candidate \(RXJ 1856-37\). a Corresponds to the radial sound speed and b to the transverse sound speed

which requires the continuity of \(e^{\lambda }\), \(e^{\nu }\) and q across the boundary \(\varSigma \) (defined by \(r=R\)). It is known as the first fundamental form \([ds^{2}]_{\varSigma }=0\), yielding to

$$\begin{aligned} e^{-\lambda (R)}= & {} 1-\frac{2\tilde{M}}{R}+\frac{Q^{2}}{R^{2}} \end{aligned}$$
(55)
$$\begin{aligned} e^{\nu (R)}= & {} 1-\frac{2\tilde{M}}{R}+\frac{Q^{2}}{R^{2}} \end{aligned}$$
(56)
$$\begin{aligned} q(R)= & {} Q. \end{aligned}$$
(57)

On the other hand the effective radial pressure (10) vanishes at the surface star \((r=R)\), consequently

$$\begin{aligned} {p}_{r}|_{r=R^{-}}=\left( \tilde{p}-\alpha \theta ^{r}_{r}\right) |_{r=R^{-}}=0. \end{aligned}$$
(58)

The above expression corresponds to the second fundamental form \([G_{\mu \nu }x^{\nu }]_{\varSigma }=0\), where \(x^{\nu }\) is a unit vector projected in the radial direction. Due the election (42), Eq. (58) is equivalent to request \(\tilde{p}(R)=0\) in (38). Therefore, we obtain the following expression for the constant \(\beta \)

$$\begin{aligned} \beta = \frac{a(3\sqrt{(4R^{2}a+1)}aR^{2}+7acR^{2}-3\sqrt{(4R^{2}a+1)}+c)}{2R^{2}(6R^{2}a+1)}. \end{aligned}$$
(59)

So, the remaining constants A and a are obtained from (55) and (56), it explicitly reads

$$\begin{aligned} A^{2}\left( 1+aR^{2}\right) ^{3}= & {} 1-\frac{2\tilde{M}}{R}+\frac{Q^{2}}{R^{2}} \end{aligned}$$
(60)
$$\begin{aligned} \left( 1-\alpha \right) \mu (R)+\alpha \frac{1+aR^{2}}{1+7aR^{2}}= & {} 1-\frac{2\tilde{M}}{R}+\frac{Q^{2}}{R^{2}}. \end{aligned}$$
(61)

However in order to close the matching conditions, the parameters \(\tilde{M}\) and R for strange star candidates have been used [47]. Tables 1, 2 and 3 shown all the constant parameters calculated for different values of the dimensionless coupling constant \(\alpha \).

5.2 Mass function

The mass function m(r) can be calculated from

$$\begin{aligned} e^{-\lambda (r)}=1-\frac{2m(r)}{r}+\frac{q^{2}(r)}{r^{2}}, \end{aligned}$$
(62)

then using the Eqs. (32), (40), (41) and (44) we arrive to

$$\begin{aligned} m(r)&=\frac{r}{2}\Bigg [\frac{3ar^2(ar^2+1)(\sqrt{4ar^2+1}+c)+2\beta r^4(2ar^2-1)}{2\sqrt{4ar^2+1}(ar^2+1)^2} \nonumber \\&\quad + \alpha \bigg [\frac{(4+17ar^2-5a^2r^4)\sqrt{4ar^2+1}}{2\sqrt{4ar^2+1}(ar^2+1)(7ar^2+1)} \nonumber \\&\quad -\frac{r^2(7ar^2+1)(3ac-4\beta r^2)}{2\sqrt{4ar^2+1}(ar^2+1)(7ar^2+1)}\bigg ] \Bigg ]. \end{aligned}$$
(63)

We observe from (63) that \(m(0)=0\). However \(m^{\prime }(r)\) is positive for \(r >0\). It indicates that m(r) is increasing monotonically away from centre and attains regular minimum at \(r=0\) (see Fig. 2).

6 Physical features

In order to be physically meaningful, the interior solution for static fluid spheres must satisfy some more general physical requirements. The following conditions have been generally recognized to be crucial for anisotropic fluid spheres [48]

  1. 1.

    The solution should be free from physical and geometric singularities and non zero positive values of \(e^{\lambda }\) and \(e^{\nu }\) i.e. \((e^{\lambda })_{r=0}=1\) and \(e^{\nu }>0\).

  2. 2.

    The radial pressure \(p_{r}\) must be vanishing but the tangential pressure \(p_{t}\) may not vanish at the boundary \(r=R\) of the sphere. However the radial pressure equal to the tangential pressure at the centre of the fluid sphere.

  3. 3.

    The density \(\rho \) and pressures \(p_{r}\), \(p_{t}\) should be positive inside the star.

  4. 4.

    \(\left( \frac{dp_{r}}{dr}\right) _{r=0}=0\) and \(\left( \frac{d^{2}p_{r}}{dr^{2}}\right) _{r=0}<0\) so that pressure gradient \(\frac{dp_{r}}{dr}\) is negative for \(0<r\le R\).

  5. 5.

    \(\left( \frac{dp_{t}}{dr}\right) _{r=0}=0\) and \(\left( \frac{d^{2}p_{t}}{dr^{2}}\right) _{r=0}< 0\) so that pressure gradient \(\frac{dp_{t}}{dr}\) is negative for \(0<r\le R\).

  6. 6.

    \((\frac{d\rho }{dr})_{r=0}=0\) and \(\left( \frac{d^{2}\rho }{dr^{2}}\right) _{r=0}<0\) so that density gradient \(\frac{d\rho }{dr}\) is negative for \(0<r\le R\). The condition (4), (5) and (6) imply that pressure and density should be maximum at the centre and monotonically decreasing towards the surface.

  7. 7.

    Inside the static configuration the speed of sound should be less than the speed of light, i.e. \(0\le \sqrt{\frac{dp_{r}}{d\rho }}<1\) and \(0\le \sqrt{\frac{dp_{t}}{d\rho }}<1\). In addition to the above, the velocity of sound should be decreasing towards the surface. i.e. \(\frac{d}{dr}\left( \frac{dp_{r}}{d\rho }\right) <0\) or \(\left( \frac{d^{2}p_{r}}{d\rho ^{2}}\right) >0\) and \(\frac{d}{dr}\left( \frac{dp_{t}}{d\rho }\right) <0\) or \(\left( \frac{d^{2}p_{t}}{d\rho ^{2}}\right) >0\) for \(0\le r \le R\) i.e. the velocity of sound is increasing with the increase of density.

  8. 8.

    A physically reasonable energy-momentum tensor has to obey the null energy condition (NEC), weak energy condition (WEC), strong energy condition (SEC) and the dominant energy condition (DEC).

  9. 9.

    Electric intensity E, such that \(E(0)= 0\), is taken to be monotonically increasing i.e. \((dE/dr) > 0\) for \(0<r<R\).

  10. 10.

    The central red shift \(Z_{0}\) and surface red shift \(Z_{R}\) should be positive and finite i.e. \(Z_{0}= \left[ e^{-\nu (r)/2}-1\right] _{r=0}>0\) and \(Z_{R} =\left[ e^{\lambda (r)/2} - 1\right] _{r=R}>0\) and both should be bounded.

6.1 Regularity of the metric functions at the center

A well behaved spherically symmetric and static solution of the Einstein’s gravitational field equations should be free of geometric singularities. This means that the temporal \(e^{\nu (r)}\) and the radial \(e^{\lambda (r)}\) metric functions are continuous within the star, and completely regular at the object center \(r=0\). The corresponding behaviour of the metric functions inside the compact object it shown in Fig. 3.

Fig. 7
figure 7

Energy conditions for a charged anisotropic fluid sphere againts fractional radius r / R, corresponding to the strange star candidate \(RXJ 1856-37\)

6.2 Effective thermodynamic quantities

Respect to the effective quantities, say \({p}_{r}\), \({p}_{t}\) and \({\rho }\) they must be positive, finite and monotonically decreasing towards the surface through the star. Moreover all these observables have their maximum value at the center of the object. On the other hand, the ratios \(dp_{r}/d \rho \) and \(dp_{t}/d \rho \) obey the Zeldovich’s condition \(\le 1\) (Fig. 4). In the Fig. 5 panel c), is noteworthy the presence of a force due to the anisotropic nature of the fluid. This force is directed outward when \(p_{t}>p_{r}\) (inward otherwise). In this case we are in presence of a repulsive force, which allows the construction of more compact objects when using anisotropic fluid than when using isotropic fluid [12, 49].

6.3 Causality condition

The anisotropic models should satisfy the causality conditions, i.e. \(0 \le v_{r}=\sqrt{\frac{dp_{r}}{d\rho }}<1\) and \(0\le v_{t}=\sqrt{\frac{dp_{t}}{d\rho }}<1\), at all points inside the star. From Fig. 6, we can see that our model is satisfying the above causality conditions. Moreover, the velocities of sound \(v_{r}\) and \(v_{t}\) are increasing with the increase of density and it should be decreasing outwards. Therefore, we observe that the speed of sound decreases monotonically from the center of star (high density region) towards the surface of the star (low density region). So our anisotropic solution is well behaved.

6.4 Energy conditions

The charged anisotropic fuid sphere should satisfy the following energy conditions: (i) null energy condition (NEC), (ii) weak energy condition (WEC), (iii) strong energy condition (SEC) and (iv) dominant energy condition (DEC). For satisfying the above energy conditions, the following inequalities must be hold simultaneously inside the charged fluid sphere [50, 51]

  1. 1.

    (NEC): \(\rho +p_{r} \ge 0\), \(\rho +p_{t}+\frac{E^{2}}{4\pi } \ge 0\).

  2. 2.

    (WEC): \(\rho +\frac{E^{2}}{8\pi } \ge 0\), \(\rho +p_{r} \ge 0\), \(\rho +p_{t}+\frac{E^{2}}{4\pi } \ge 0\) .

  3. 3.

    (SEC): \(\rho +p_{r} \ge 0\), \(\rho +p_{t}+\frac{E^{2}}{4\pi } \ge 0\), \(\rho +2p_{t}+p_{r}+\frac{E^{2}}{4\pi } \ge 0\).

  4. 4.

    (DEC): \(\rho +\frac{E^{2}}{8\pi }-|p_{r}-\frac{E^{2}}{8\pi }|\ge 0\), \(\rho +\frac{E^{2}}{8\pi }-|p_{t}+\frac{E^{2}}{8\pi }|\ge 0\).

By continuity the (WEC) and (SEC) imply the (NEC). Figure 7 shows that all the above inequalities are satisfied within the object. Therefore we have a well behaved energy-momentum tensor.

Fig. 8
figure 8

The central redshift \(Z_{0}\) against the fractional radius r / R, for the strange star candidate \(RXJ 1856-37\)

Fig. 9
figure 9

The dimensionless electric charge (left panel) and the dimensionless charge density (right panel) versus the fractional radius r / R, for the strange star candidate \(RXJ 1856-37\)

6.5 Maximum allowable mass and redshift

A relativistic uncharged static fluid sphere has a compactness parameter \(u=M/R\) limited by \(\le 4/9\) (in the unit \(c=G=1\)) [52]. However, the last bound has been generalized for static charged configurations. The lower limit was given by Andreasson [53] and the upper bound was given by Bohmer and Harko [54]. This constraint on the mass-radius ratio explicitly reads

$$\begin{aligned} \frac{Q^{2}\left( 18R^{2}+Q^{2}\right) }{2R^{2}\left( 12R^{2}+Q^{2}\right) }\le \frac{M}{R}\le \frac{4R^{2}+3Q^{2}+2R\sqrt{R^{2}+3Q^{2}}}{9R^{2}}. \end{aligned}$$
(64)

So, the compactness parameter u, can be expresses in terms of the effective mass \(M_{eff}\) which for charged matter distribution is given by [55]

$$\begin{aligned} M_{eff}=4\pi \int _{0}^{R}\left( {\rho }+\frac{E^{2}}{8\pi }\right) r^{2}dr=\frac{R}{2}\left[ 1-e^{-\lambda (R)}\right] , \end{aligned}$$
(65)

explicitly

$$\begin{aligned} M_{eff}= & {} \frac{R}{2}\left[ 1-\alpha \frac{1+aR^{2}}{1+7aR^{2}}\right. \nonumber \\&-\left( 1-\alpha \right) \Bigg (1-\frac{3aR^{2}}{2}\left[ \frac{\left( c-\frac{4\beta R^{2}}{3a}\right) \left( 1+4aR^{2}\right) ^{-1/2}}{1+aR^{2}}\right. \nonumber \\&\left. \left. -\frac{1}{1+aR^{2}}\right] \Bigg )\right] . \end{aligned}$$
(66)

The compactness parameter of the star is therefore

$$\begin{aligned} u(R)= & {} \frac{M_{eff}}{R}=\frac{1}{2}\left[ 1-e^{-\lambda (R)}\right] , \end{aligned}$$
(67)
$$\begin{aligned} u(R)= & {} \frac{1}{2}\Bigg [1-\alpha \frac{1+aR^{2}}{1+7aR^{2}} \nonumber \\&-\left( 1-\alpha \right) \Bigg (1-\frac{3aR^{2}}{2}\Bigg [\frac{\left( c-\frac{4\beta R^{2}}{3a}\right) \left( 1+4aR^{2}\right) ^{-1/2}}{1+aR^{2}} \nonumber \\&-\frac{1}{1+aR^{2}}\Bigg ]\Bigg )\Bigg ]. \end{aligned}$$
(68)

The gravtitational surface redshift corresponding to above compactness u (68) can be calculated as

$$\begin{aligned} Z_{s}=\left( 1-2u\right) ^{-1/2}-1. \end{aligned}$$
(69)

In the case of isotropic matter distribution, the maximum possible surface redshift is \(Z_{s}=4.77\). On the other hand, as was pointed out by Bowers and Liang, in the presence of anisotropic matter distribution this upper bound can be exceeded [4]. When the anisotropy parameter is positive i.e. \((p_{t} > p_{r})\) the surface redshift is greater than its isotropic counterpart. On the other hand, the central redshift \(Z_{0}\) is

$$\begin{aligned} Z_{0}(r)=e^{-\nu (r)/2}-1=\frac{1}{\sqrt{A^2(1+ar^2)^3}}-1. \end{aligned}$$
(70)

Its monotonically decreasing behaviour inside the compact star, is shown in Fig. 8.

Fig. 10
figure 10

The electric field E against the fractional radius r / R, for the strange star candidate \(RXJ 1856-37\)

Fig. 11
figure 11

The adiabatic index \(\varGamma \) against the fractional radius r / R, for the strange star candidate \(RXJ 1856-37\)

Fig. 12
figure 12

Variation of the absolute value of square of sound velocity with respect to fractional radius r / R, for the strange star candidate \(RXJ 1856-37\)

6.6 Electric properties

We note from (41) that the electric intensity E vanishes at the center of the configuration and it is monotonically increasing toward the surface of the object. The electric charged defined as

$$\begin{aligned} q=Er^{2}\rightarrow q=r^{2}\sqrt{\frac{\beta r^{2}\sqrt{1+4ar^{2}}}{\left( 1+ar^{2}\right) ^{2}}}, \end{aligned}$$
(71)

has the same behaviour like the electric field E, i.e. null at the center and monotonically increasing with increasing radius r toward the boundary of the compact star. So, the electric charge and electric field behaviour are shown in Figs. 9 (left panel) and 10, respectively.

On the other hand, the surface density is given by

$$\begin{aligned} \sigma =\frac{e^{-\lambda /2}}{4\pi r^{2}}\left( r^{2}E\right) ^{\prime }. \end{aligned}$$
(72)

This has its maximum in the center and decreases as it approaches to the surface of the star, as shown in Fig. 9 (right panel).

Fig. 13
figure 13

The difference \(v^{2}_{t}-v^{2}_{r}\) against the fractional radius r / R, for the strange star candidate \(RXJ 1856-37\)

Fig. 14
figure 14

Variation of square of the radial and transverse velocity with respect to fractional radius r / R, for the strange star candidate \(RXJ 1856-37\)

6.7 Stability conditions

An important analysis in the study of compact objects in GR are the stability conditions, we analyze both the adiabatic index \(\varGamma \) and the radial and tangential sound velocities. In the case of a Newtonian isotropic matter distribution, it is well known that the collapsing condition corresponds to \(\varGamma <4/3\) [56, 57]. On the other hand, with respect to relativistic anisotropic fluid spheres the above collapsing condition becomes [58, 59]

$$\begin{aligned} \varGamma <\frac{4}{3}+\left[ \frac{1}{3}\kappa \frac{\rho _{0}p_{r0}}{|p^{\prime }_{r0}|}r+\frac{4}{3}\frac{\left( p_{t0}-p_{r0}\right) }{|p^{\prime }_{r0}|r}\right] _{max} \end{aligned}$$
(73)

where \(\rho _{0}\), \(p_{r0}\) and \(p_{t0}\) are the initial density, radial and tangential pressure when the fluid is in static equilibrium. The second term in the right hand side represents the relativistic corrections to the Newtonian perfect fluid and the third term is the contribution due to anisotropy. It is clear from (73) that if we have a non-relativistic perfect fluid matter distribution the bracket vanishes and we recast the collapsing Newtonian limit \(\varGamma <4/3\). Heintzmann and Hillebrandt [57] showed that in the presence of a positive an increasing anisotropy factor \(\varPi =p_{t}-p_{r}>0\), the stability condition for a relativistic compact object is given by \(\varGamma >4/3\), that is so because positive anisotropy factor may slow down the growth of instability. We can explicitly obtain the adiabatic index from, [60]

$$\begin{aligned} \varGamma =\frac{\rho +p_{r}}{p_{r}}\frac{dp_{r}}{d\rho }. \end{aligned}$$
(74)

Figure 11 shows that \(\varGamma >4/3\) everywhere within the stellar interior. Therefore our model is stable.

Fig. 15
figure 15

TOV equation for static equilibrium for the strange star candidate \(RXJ 1856-37\)

Table 4 Some physical parameters calculated for radii and mass for some strange star candidates with \(\alpha =0.0\)
Table 5 Some physical parameters calculated for radii and mass for some strange star candidates with \(\alpha =0.2\)
Table 6 Some physical parameters calculated for radii and mass for some strange star candidates with \(\alpha =0.3\)

Another way to study stability within the framework of anisotropic compact objects in GR follows from the well known cracking concept introduced by Herrera [61]. Based on the Herrera’s cracking concept Abreu et al. [62] showed that potentially unstable regions within the stellar matter distribution can be identified as a function of the difference of the radial and tangential speeds. Previously we showed that the radial and tangential speeds of our model satisfy causality condition i.e. \(0\le v_{r}<1\) and \(0\le v_{t}<1\). Moreover, one expects that the square of the above quantities should be within the range \(0\le v^{2}_{r}\le 1\) and \(0\le v^{2}_{t}\le 1\) (see Fig. 14), then we have \(|v^{2}_{t}-v^{2}_{r}|\le 1\). Therefore \(-1\le v^{2}_{t}-v^{2}_{r}\le 0\) represents a potentially stable regions and \(0<v^{2}_{t}-v^{2}_{r}\le 1\) a potentially unstable regions. It can be seen from Fig. 12 that \(|v^{2}_{t}-v^{2}_{r}|\) at the center lies between 0 and 1. On the other hand, from Fig. 13 it is observed that \(v^{2}_{t}-v^{2}_{r}\) lies between \(-1\) and 0, thus our model is stable.

6.8 Equilibrium condition

The Tolman–Oppenheimer–Volkoff (TOV) equation for a charged anisotropic matter fluid spheres reads [63]

$$\begin{aligned} -\frac{1}{2}\nu ^{\prime }\left( {\rho }+{p}_{r}\right) -\frac{d{p}_{r}}{dr}+\sigma Ee^{\lambda /2}+\frac{2}{r}\left( {p}_{t}-{p}_{r}\right) =0. \end{aligned}$$
(75)

This Eq. (75) describes the equilibrium condition for a charged anisotropic fluid subject to gravitational \((F_{g})\), hydrostatic \((F_{h})\), electric \((F_{e})\) and anisotropic stress \((F_{a})\) so that

$$\begin{aligned} F_{g}+F_{h}+F_{e}+F_{a}=0. \end{aligned}$$
(76)

The Fig. 15 shows the TOV equation. It is observed that the system is in static equilibrium under four different forces, e.g. gravitational, hydrostatic, electric and anisotropic to attain overall equilibrium. However, a strong gravitational force is counter balanced jointly by hydrostatic and anisotro- pic forces. Panels e) and f) show that the electric force, it seems, has a negligible effect on this balancing mechanism.

To conclude the physical analysis, we summarize in Tables 4, 5 and 6 some physical parameters, like the central and surface effective density, the central pressure, the electric field at the surface star, the surface electric charge and the ratio central pressure-central density. All these values were obtained using observational data of realistic strange star candidates e.g. \(RXJ1856-37\) and \(SAX J1808.4-3658\) [47].

7 Concluding remarks

Gravitational decoupling through MGD is a novel approach which provides us a new branch to study self-gravitating systems with anisotropic matter distribution. In this opportunity, we have reported radial deformations only, but deformations on the temporal component of the seed metric may bring interesting results. Once the system of Eqs. (3)–(5) is decoupled, the gravitational interaction between both, the Einstein and the quasi-Einstein sectors is purely gravitational, i.e. there is no exchange of energy-momentum between them. Among all the possibilities that the method presents to solve the system of quasi-Einstein Eqs. (20)–(22), for the sake of simplicity we have chosen a simple relation between \(\tilde{p}\) and \(\theta ^{r}_{r}\). Obtaining a well-behaved compact object model from the physical point of view.

Particularly, we have extended the charged isotropic He- intzmann solution to an anisotropic scenario. The resulting model fulfill all the basic criterion demanded for a well behaved solution in this context, such as: regularity of the gravitational potentials at the object center, positive definiteness and monotonic decrease behaviour of the energy density, radial and tangential pressures with increasing radius, vanishing radial pressure at the surface star, the continuity of electric field across the boundary, the speed of sound being less than the speed of light, stability and equilibrium conditions, etc. On the other hand as was pointed out early, the presence of the electric field and the effective anisotropy counterbalance the gravitational force. In the first case due to electric repulsive force and in the second case due to repulsive gravitational force. This fact avoid the collapse of a spherically symmetric matter distribution to a point singularity during the gravitational collapse or during an accretion process onto compact object. Moreover, in view of comparing our model with observational data of realistic stars, several physical parameters were calculated by fixing the radii and mass corresponding to the strange star candidates RXJ 1856-37 and SAX J1808.4-3658 (SS2).