1 Introduction

Einstein’s theory of General Relativity (GR) (1915a, 1915b, 1915c) is the most promising theory to study the universe and astrophysical objects. GR plays a vital role in comprehending many astrophysical objects, namely, black holes, compact stars, supernovae and the formation of the structure of the universe. Compact stars are objects with high density and compactness factor \(\frac{M}{R} \leq 0.5\) in GR. Studying stellar models for compact objects is an active field of research in present times. The exact vacuum solution of the Einstein Field equations (EFE) was first obtained by Schwarzschild (1916). The singularity in the Schwarzchild metric led to a black hole (BH) called Schwarzchild black hole. The spurt in research activities to understand different features of astrophysical objects with a radius more than the Schwarzchild radius are interesting as the matter inside are at extraterrestrial conditions which are not known in the laboratory yet. Chandrasekhar (1931), Tolman (1939) and Oppenheimer and Volkoff (1939) explored these objects theoretically, proposing models of relativistic stars with high density imposing limits on the mass of white dwarf (WD), BH, etc. The pressure inside highly compact astrophysical objects, namely, X-Ray buster, X-Ray pulsar, Her X-1, etc., are studied by Ruderman (1972). Subsequently, it was proposed by Witten (1984) that the pressure inside the compact objects may not satisfy a pure linear equation of state (EoS) and proposed that quark phase transition might be essential to understand the features of some of the stars. The EoS for the interior matter composition of strange stars can be described by the MIT Bag model: \(p = \frac{1}{3}(\rho - 4B_{g})\) in an isotropic star, where \(p\) is the pressure, \(\rho \) is the energy density and \(B_{g}\) is the Bag constant. Farhi and Jaffe (Farhi and Jaffe 1984) constructed stable stellar models with strange quark matter for the Bag constant within the limit \(57 MeV/fm^{3} \leq B_{g} \leq 94 MeV/fm^{3}\) in GR. This triggered the investigation of an entirely new class of compact stars called strange stars. It was proposed that Her X-1, SAX J 1808.4-3658, PSR 0943+10, 4U 1728-34, 4U 1820-30 are the candidates for strange stars. The solution of the Einstein field equation is used to construct stellar models, and several such relativistic solutions are found which are employed to construct stellar models. Delgaty and Lake (1998) first showed that out of 127 exact solutions of Einstein field equations, only 9 of them are found physically viable. Since then, there have been a significant effort in finding exact solutions in GR and modified theories of gravity relevant for the compact objects. Maurya et al. (2015) obtained anisotropic solutions analogous to the perfect fluid solution obtained by Durgapal and Fuloria (1985) that are found by contracting the anisotropy factor. Das et al. (2019) obtained closed-form solutions of the Einstein field equation for a spherically symmetric anisotropic matter distribution for a physically reasonable spatial metric potential with a specific choice of the anisotropy. Recently, a new class of relativistic exact solution of compact objects in hydrostatic equilibrium is obtained in \(f(R,T)\) gravity by Dey et al. (2021).

Tolman obtained a number of stellar models considering metric potentials that are permitted by the Einstein’s field equation. In 1939, Tolman (1939) independently gave an analytical solution of EFE assuming eight different types of metric potentials. Zubair and Azmat (2020) extended the Tolman V solution to an anisotropic version using gravitational decoupling by minimal geometric deformation (MGD) approach and analyzed the behavior of the new solutions. Subsequently, MGD method is used to construct strange star model using the Tolman ansatz in the framework of Einstein-Gauss-Bonnet gravity (2022a) and in \(f(Q)\) gravity (2022b). Maurya et al. (2022) found strange star solutions in \(f(Q)\) gravity adoptiong a complete geometric deformation (CGD) technique. In 1968, Kuchowicz (1968) independently gave a singularity-free metric potential which can describe the stellar configuration. Naz and Shamir (2020) studied the effects of electric charge for static spherically symmetric stellar models in the modified \(f(G)\) gravity making use of the metric given by Tolman-Kuchowicz metric. Rej et al. (2021) also employed Tolman-Kuchowicz metric to construct stellar model in the \(f(R,T)\) modified gravity. Thereafter a number of papers appeared in the literature (Maurya 2020; Majid and Sharif 2020; Rej and Karmakar 2023) with the Tolman-Kuchowicz metric for modelling of compact objects. Gangopadhyay et al. (2013) considered 12 known strange star candidates and estimated their radii. In recent years, a lot of work has also explored the MIT Bag model to construct and analyse stable stellar structure (Maurya and Tello-Ortiz 2019; Kaur et al. 2022; Podder et al. 2022; Banerjee et al. 2022; Das et al. 2023). Stellar models are also explored for polynomial functions of pressure with density (Maharaj and Takisa 2012; Maurya et al. 2017; Deb et al. 2022; Ditta et al. 2022). There are also alternate ways to obtain stellar models as the EoS is not known, where a known geometry is employed to find out the EoS suitable for the stable, compact objects (Mukherjee et al. 1997; Paul and Deb 2014; Paul and Dey 2018; Chanda et al. 2019; Das et al. 2022).

The compact objects are studied assuming spherical symmetry and isotropic pressure. However, a dense compact object may not be isotropic in nature. As pointed out by Canuto (1974), two different pressure, namely, radial pressure (\(p_{r}\)) and transverse pressure (\(p_{\perp}\)) in a high-density compact object, may exist. Subsequently, an anisotropic matter distribution in GR was considered by Bowers and Liang (1974) to obtain a relativistic stellar model for anisotropic star and examined the surface redshift and generalised gravitational mass in hydrostatic equilibrium. Ruderman (1972) pointed out that matter density in a compact object tends to become anisotropic in nature for the energy density of the order \(\sim 10^{15} \) \({ gm/cm^{3}}\). Weber (1999) showed that the generation of an anisotropic pressure inside the compact star may be due to a strong magnetic field. It is also shown that anisotropy may originate for many other reasons \(viz\)., viscosity, phase transition (Sokolov 1980), pion condensation (Sawyer 1972), the shear of the fluid (Di Prisco et al. 2007). Mak and Harko (2003) obtained a class of exact solutions of EFE for a spherically symmetric anisotropic static star. Petri (2004) obtained a self-gravitating spherically symmetric compact object with local anisotropic pressure. For a realistic anisotropic star, bounds on the surface redshifts are also explored (2002). Maurya and his collaborators (Maurya et al. 2017, 2019) did significant work to find exact solutions for an anisotropic fluid sphere which are Buchdahl-type relativistic compact stars. Recently, a new class of relativistic anisotropic stellar model in Einstein-Gauss-Bonnet gravity is obtained by Das et al. (2022). Further, spherically symmetric charged anisotropic star has been probed by Kaur et al. (2022) in the modified theories of gravity. The role of pressure anisotropy on the structure of static spherically symmetric compact objects are also investigated in the literatures (Maurya et al. 2018, 2019; Chanda et al. 2019; Dey and Paul 2020; Dey et al. 2021; Dey and Paul 2022; Das et al. 2023).

The presence of an electromagnetic field affects the physical characteristics of a relativistic star. The coupled Einstein and Maxwell field equations are considered to study the effects of the electromagnetic field in the strong gravitational field of a compact object. Rosseland (1924) was the first to propose the inclusion of a charged component in a compact star. He considered that compact stars are collections of electrons and ions and came to the conclusion that because electrons have more kinetic energy than ions, they may have a stronger tendency to escape the star. Therefore, a star carries a significant amount of positive charge. This phenomenon will continue until the star establishes an electric field to stop the further escape of electrons. Majumdar (1947), De and Raychaudhuri (1968) and Papapetrou (1947) studied relativistic charged dust models. Whitman and Burch (1981) pointed out that a homogeneous charged fluid sphere is more stable than a system without charge. Bohra and Mehra (1971), and Omote and Sato (1974) studied charged spheres in the presence of matter with the variation of mass with charge. Ghezzi (2005) and Ghezzi with Letelier (2007) constructed a stable equilibrium configuration in the high-density regime that can hold a massive amount of charge. Varela et al. (2010) analyzed self-gravitating, charged, anisotropic fluid distribution in the coupled Einstein–Maxwell equations using Krori-Barua metric (Krori and Barua 1975) potentials with a given equation of state of matter. Arbanil et al. (2013) studied both the Oppenheimer-Volkoff limit and the Buchdhal limit for the charged polytropic spheres and found the extremal limit that predicts a quasi black hole. The relativistic compact stars in the presence of electric charge have been examined in the following works (Das et al. 2011; Sunzu et al. 2014; Maurya 2020; Maurya and Al-Farsi 2021; Maurya et al. 2021).

The motivation of the paper is to construct a charged anisotropic star satisfying MIT bag model with radial pressure given by \(p_{r} = \frac{1}{3}(\rho - 4B_{g})\) in a generalized Tolman-Kuchowicz (GTK) ansatz in GR. We present the paper as follows: In Sect. 2, the basic mathematical formulation of the coupled Einstein-Maxwell fields is derived. Stellar models in the generalized Toman-Kuchowicz metric are derived in Sect. 3. Boundary conditions for a viable stellar model have been discussed in Sect. 4. In Sect. 5, criteria for a physically stable stellar object are discussed. In Sect. 6, we analyzed different physical features like energy density, and pressure for a set of model parameters for which a physically acceptable model is permitted. A comparative study of the model with some well-known stars is discussed in Sect. 7. Section 8 finally present a brief discussion about the stellar model we obtained here.

2 Basic mathematical formulation of Einstein-Maxwell spacetime

We consider a spacetime in four dimensions as follows (Bondi 1947; Martin and Visser 2004):

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

where \(t\), \(r\), \(\theta \) \(\phi \) are the coordinates and the exponents \(\mu \) and \(\lambda \) are functions of \(r\) only. We consider a generalised Tolman-Kuchowicz metric given by,

$$ e^{\lambda} = (1 + ar^{2} + br^{4})^{n} \; \; \; ,\; \; \; e^{\nu} = C^{2} e^{Ar^{2}} $$
(2)

where \(a\), \(b\), \(A\) and \(C\) are unknown model parameters and \(n\) is a positive integer,\(i.e\)., \(n \geq 1\). The modified metric potential \(g_{tt}\) in the generalized Tolman-Kuchowicz (GTK) \(ansatz\) contains an exponent \(n\), which reduces to the original Tolman-Kuchowicz \(ansatz\) for \(n=1\) (Tolman 1939; Kuchowicz 1968). In the paper we consider anisotropic star with charge for different values of \(n\) to study the structure of the geometry in a compact object.

The Einstein-Maxwell coupled field equations (Debney et al. 1969) are as usual given by,

$$ \mathcal{R_{\mu \nu}} - \frac{1}{2}g_{\mu \nu} \mathcal{R} = 8\pi (T_{ \mu \nu} + E_{\mu \nu}), $$
(3)

where \(\mathcal{R_{\mu \nu}}\) is the Ricci tensor, \(g_{\mu \nu}\) is the metric tensor, ℛ is the Ricci scalar, \(T_{\mu \nu}\) is the energy-momentum tensor of fluid distribution and \(E_{\mu \nu}\) is the electromagnetic field tensor. We have considered the natural unit here as \(G = c^{2} = 1\). We assume the energy-momentum tensor (Gutfreund and Renn 2017; Misner and Sharp 1964), \(T_{\mu \nu}\) as,

$$ T_{\mu \nu} = diag (-\rho , p_{r}, p_{\perp},p_{\perp}), $$
(4)

where \(\rho \) is the energy density of matter, \(p_{r}\) is the radial pressure, \(p_{\perp}\) is the transverse pressure. The electromagnetic field tensor (Debney et al. 1969) is given by,

$$ E_{\mu \nu} = \frac{1}{4\pi} \Bigg( F^{\alpha}_{\mu} F_{\nu \alpha} - \frac{1}{4}F^{\alpha \beta} F_{\alpha \beta} g_{\mu \nu} \Bigg), $$
(5)

where \(F_{\mu \nu}\) is the second rank antisymmetric electromagnetic field tensor which is defined as,

$$ F_{\mu \nu} = \frac{\partial A_{\nu}}{\partial x^{\mu}} - \frac{\delta A_{\mu}}{\partial x^{\nu}}, $$
(6)

where \(A_{\nu} = (\phi (r),0,0,0)\) is the four potential. The Maxwell field equations can be obtained from,

$$ F^{\mu \nu}_{;\nu} = \frac{1}{\sqrt{-g}}\frac{\partial}{x^{\nu}} ( \sqrt{-g} F^{\mu \nu}) = -4\pi j^{\mu} , $$
(7)
$$ F_{\mu \nu ;\lambda} + F_{\nu \lambda ; \mu} + F_{\lambda \mu ; \nu} = 0, $$
(8)

where \(j^{\mu}\) is the four-current density vector given by

$$ j^{\mu} = \frac{\rho _{e}}{\sqrt{g_{00}}}\frac{dx^{\mu}}{dx^{0}}, $$
(9)

In the above \(\rho _{e}\) denotes the proper charge density. The electric field can be obtained from Eq. (7) as,

$$ F^{01} = -e^{\frac{\lambda +\nu}{2}}\frac{q(r)}{r^{2}}, $$
(10)

here \(q(r)\) represents the net charge inside a sphere of radius r and it can be obtained as follows:

$$ q(r) = 4\pi \int ^{r}_{0} \rho _{e} e^{\frac{\lambda}{2}}r^{2} dr. $$
(11)

The electric field is determined by the quantity q(r) as follows,

$$ E(r) = \frac{q(r)}{r^{2}} $$
(12)

For the spherically symmetric GTK metric given by (1), the Einstein-Maxwell coupled field equations are obtained as follows,

$$ 8\pi \rho + \frac{q^{2}}{r^{4}} = \frac{\lambda '}{r}e^{-\lambda} + \frac{1}{r^{2}}(1-e^{-\lambda}), $$
(13)
$$ 8\pi p_{r} - \frac{q^{2}}{r^{4}} = \frac{\nu '}{r}e^{-\lambda} + \frac{1}{r^{2}}(e^{-\lambda}-1), $$
(14)
$$ 8\pi p_{\perp} + \frac{q^{2}}{r^{4}} = \frac{1}{4}e^{-\lambda} \Bigg( 2 \nu '' + \nu ^{\prime \,2} - \lambda ' \nu ' + \frac{2}{r}(\nu ' - \lambda ') \Bigg). $$
(15)

The prime denotes the differentiation with respect to r.

3 Stellar models in the GTK metric

Using the metric (2), the Einstein-Maxwell Eqs. (13)-(15) yields,

8 π ρ = 1 + ( a ( 2 n 1 ) r 2 + b ( 4 n 1 ) r 4 1 ) ψ 1 n r 2 q 2 r 4 ,
(16)
$$ 8\pi p_{r} = \frac{\left (1+2 A r^{2}\right ) \psi ^{-n} - 1}{r^{2}} + \frac{q^{2}}{r^{4}}, $$
(17)
$$\begin{aligned} 8\pi p_{\perp} ={}& \frac{ r^{2} \left ( A^{2} -a A (n-2)-2 b n \right )}{\psi ^{n+1} } \\ &{}+ \frac{A r^{4} (a A-2 b (n-1)) + (2A - a n + b A^{2} r^{6})}{\psi ^{n+1}} \\ &{}- \frac{q^{2}}{r^{4}}, \end{aligned}$$
(18)

where, \(\psi = (1+a r^{2}+b r^{4})\). We consider MIT Bag model for describing the strange quark matter distribution in an anisotropic star as,

$$ p_{r} = \frac{1}{3}(\rho - 4B_{g}), $$
(19)

where, \(B_{g}\) is the Bag constant and its unit is \(MeV/fm^{3}\) (Chodos et al. 1974; Deb et al. 2022). The above EOS can be obtained assuming massless non-interacting quarks confined by a bag constant. As the star is anisotropic we study variation of the transverse pressure separately, which may not vanish at the boundary of the star.

Using Eqs. (16)-(19), the electric field (\(E\)) obtained as,

E 2 = ( 2 ( 1 8 π r 2 B g ) ψ n + 1 3 A ψ r 2 2 ψ ) 2 r 2 ψ n + 1 + n ( a + 2 b r 2 ) 2 ψ n + 1 .
(20)

Thereafter, the density and the radial and transverse pressures yield from the Einstein field equation as,

$$ \rho = B_{g} + \frac{3 \left (A+a n+(a A+2 b n) r^{2}+A b r^{4}\right )}{16 \pi \psi ^{n+1} }, $$
(21)
$$ p_{r} = -B_{g} + \frac{ \left ( A+a n+(a A+2 b n) r^{2}+A b r^{4} \right ) }{16 \pi \psi ^{n+1} }, $$
(22)
p = B g n r 2 ( 2 A r 2 + 3 ) ( a + 2 b r 2 ) + 2 ψ n + 1 16 π r 2 ψ n + 1 ( 2 A 2 r 4 + 7 A r 2 + 2 ) 16 π r 2 ψ n .
(23)

We define measure of anisotropy as \(\Delta = p_{\perp} - p_{r}\), which is given by,

Δ = 2 B g n r 2 ( A r 2 + 2 ) ( a + 2 b r 2 ) + ψ n + 1 8 π r 2 ψ n + 1 ( A 2 r 4 + 3 A r 2 + 1 ) 8 π r 2 ψ n .
(24)

4 Matching conditions

In this section, the unknown model parameters \(a\), \(b\), \(A\) and \(C\) is determined using the matching conditions at the boundary of the compact object described by generalised Tolman-Kuchowicz metric with Reissner-Nordstrom metric (Reissner 1916; Nordstrom 1918) as the exterior metric. The Reissner-Nordstrom metric is given by,

d s 2 = ( 1 2 M r + Q 2 r 2 ) d t 2 + ( 1 2 M r + Q 2 r 2 ) 1 d r 2 + r 2 ( d θ 2 + sin 2 θ d ϕ 2 ) .
(25)

The Reissner-Nordstrom metric is the exterior metric where the event horizon corresponds to \(r > M + \sqrt{M^{2} - Q^{2}}\) (\(M\) and \(Q\) are respectively the total mass and charge enclosed within the boundary \(r = R\)). The continuity of the metric coefficients \(g_{tt},g_{rr}\) and \(\frac{\partial g_{tt}}{\partial r}\) across the boundary \(r=R\) gives us the boundary conditions of the star that can be obtained from Eqs. (1) and (25) (Darmois 1927; Israel 1967; Bonnor and Vickers 1981),

$$ 1 - \frac{2M}{R} + \frac{Q^{2}}{R^{2}} = C^{2} e^{AR^{2}}, $$
(26)
$$ 1 - \frac{2M}{R} + \frac{Q^{2}}{R^{2}} = (1 + aR^{2} + bR^{4})^{-n}, $$
(27)
$$ \frac{M}{R} - \frac{Q^{2}}{R^{2}} = AR^{2} C^{2} e^{AR^{2}}. $$
(28)

Now, using the condition \(p_{r}(R) = 0\) (Bonnor and Vickers 1981) and the boundary conditions (26)-(28) we can obtain the values of the constant a,b,A and C as follows,

$$ a = \frac{-2n +U \left (2n +A R^{2} (1+3 U^{n})\right )}{nR^{2} \left (1+3 U^{n+1}\right )}, $$
(29)
$$ b = \frac{U - 1 - aR^{2}}{R^{4}}, $$
(30)
$$ A = \frac{1}{R^{2} } \frac{(\frac{M}{R} - \frac{Q^{2}}{R^{2}})}{(1 - \frac{2M}{R} + \frac{Q^{2}}{R^{2}})}, $$
(31)
$$ C = e^{-\frac{AR^{2}}{2}} \Big(1 - \frac{2M}{R} + \frac{Q^{2}}{R^{2}} \Big)^{\frac{1}{2}}. $$
(32)

where, \(U = (1 - \frac{2M}{R} + \frac{Q^{2}}{R^{2}})^{\frac{-1}{n}} \). It is to be noted that the value of \(a\) and \(b\) depends on the value of \(n\). It is now evident that there are six unknowns \(viz\)., \(a\), \(b\), \(A\), \(C\), \(n\), \(B_{g}\) and five equations. Therefore to construct a stellar model we assume an \(ad\) \(hoc\) relation, say different values of \(n\) (\(\in \mathbb{Z} \)) in Eq. (2). Tolman-Kuchowicz metric (Tolman 1939; Kuchowicz 1968) corresponds to \(n=1\). We consider \(n \geq 1\) in order to explore the rich structure of the generalized geometry proposed here. Analytical expressions of the energy-density (\(\rho \)), the radial pressure (\(p_{r}\)), and the transverse pressure (\(p_{\perp}\)) are given below for different values of \(n\) in order to analyse different physical features and stability of the models.

4.1 Case I: \(n\) = 1

For \(n = 1\) Eqs. (21)-(23) becomes,

$$ \rho _{1} = B_{g}+ \frac{3 \left (a+A+(2 b+a A) r^{2}+b A r^{4}\right )}{16 \pi \psi ^{2}}, $$
(33)
$$ {p_{r}}_{1} = -B_{g}+ \frac{a+A+(2 b+a A) r^{2}+b A r^{4}}{16 \pi \psi ^{2}}, $$
(34)
p 1 = B g r 2 ( 2 A r 2 + 3 ) ( a + 2 b r 2 ) + 2 ψ 2 16 π r 2 ψ 2 ( 2 A 2 r 4 + 7 A r 2 + 2 ) 16 π r 2 ψ .
(35)

4.2 Case II: \(n\) = 2

For \(n = 2\) Eqs. (21)-(23) becomes,

$$ \rho _{2} = B_{g}+ \frac{3 \left (2 a+A+(4 b+a A) r^{2}+b A r^{4}\right )}{16 \pi \psi ^{3}}, $$
(36)
$$ {p_{r}}_{2} = -B_{g}+ \frac{2 a+A+(4 b+a A) r^{2}+b A r^{4}}{16 \pi \psi ^{3}}, $$
(37)
p 2 = B g 2 r 2 ( 2 A r 2 + 3 ) ( a + 2 b r 2 ) + 2 ψ 3 16 π r 2 ψ 3 ( 2 A 2 r 4 + 7 A r 2 + 2 ) 16 π r 2 ψ 2 .
(38)

4.3 Case III: \(n\) = 3

For \(n = 3\) Eqs. (21)-(23) becomes,

$$ \rho _{3} = B_{g}+ \frac{3 \left (3 a+A+(6 b+a A) r^{2}+b A r^{4}\right )}{16 \pi \psi ^{4}}, $$
(39)
$$ {p_{r}}_{3} = -B_{g}+ \frac{3 a+A+(6 b+a A) r^{2}+b A r^{4}}{16 \pi \psi ^{4}}, $$
(40)
p 3 = B g 3 r 2 ( 2 A r 2 + 3 ) ( a + 2 b r 2 ) + 2 ψ 4 16 π r 2 ψ 4 ( 2 A 2 r 4 + 7 A r 2 + 2 ) 16 π r 2 ψ 3 .
(41)

4.4 Case IV: \(n\) = 4

For \(n = 4\) Eqs. (21)-(23) becomes,

$$ \rho _{4} = B_{g}+ \frac{3 \left (4 a+A+(8 b+a A) r^{2}+b A r^{4}\right )}{16 \pi \psi ^{5}}, $$
(42)
$$ {p_{r}}_{4} = -B_{g}+ \frac{4 a+A+(8 b+a A) r^{2}+b A r^{4}}{16 \pi \psi ^{5}}, $$
(43)
p 4 = B g 4 r 2 ( 2 A r 2 + 3 ) ( a + 2 b r 2 ) + 2 ψ 5 16 π r 2 ψ 5 ( 2 A 2 r 4 + 7 A r 2 + 2 ) 16 π r 2 ψ 4 .
(44)

4.5 Case V: \(n\) = 5

For \(n = 5\) Eqs. (21)-(23) becomes,

$$ \rho _{5} = B_{g}+ \frac{3 \left (5 a+A+(10 b+a A) r^{2}+b A r^{4}\right )}{16 \pi \psi ^{6}}, $$
(45)
$$ {p_{r}}_{5} = -B_{g}+ \frac{5 a+A+(10 b+a A) r^{2}+b A r^{4}}{16 \pi \psi ^{6}}, $$
(46)
p 5 = B g 5 r 2 ( 2 A r 2 + 3 ) ( a + 2 b r 2 ) + 2 ψ 6 16 π r 2 ψ 6 ( 2 A 2 r 4 + 7 A r 2 + 2 ) 16 π r 2 ψ 5 .
(47)

Since the equations are highly non-linear we adopt numerical analysis to explore the variation of the physical criteria inside the star.

5 Criteria for a realistic model of compact object

A realistic stable star must satisfy the following criteria:

(i) The energy density and the pressure must be positive inside the star. They should be finite at the center of the star also, \(i.e\). \(\rho (0) = \rho _{c}\) and \(p(0) = p_{c}\).

(ii) Radial pressure must be equal to the transverse pressure at the center (\(r=0\)), \(i.e\)., \(p_{r0} = p_{\perp 0}\) which signifies that the anisotropy at the center must be zero.

(iii) The boundary of the star (R) can be found out by the condition \(p_{r}(R) = 0\), \(i.e\). the radial pressure vanishes at the boundary of the stellar object.

(iv) The stellar model must satisfy the condition \(0 \leq v_{r}^{2} (=\frac{dp_{r}}{d\rho}) < 1 \) and \(0 \leq v_{\perp}^{2} (=\frac{dp_{\perp}}{d\rho}) < 1\) for maintaining causality.

(v) The Adiabatic index (\(\Gamma \)) should be greater than the critical value (\(\Gamma _{crit}\)) inside the star.

(vi) The energy conditions, \(i.e\). null energy condition (NEC), Weak energy condition (WEC), Strong energy condition (SEC), Dominant energy condition (DEC) and the Trace energy condition (TEC) must be satisfied inside the star.

6 Physical analysis

Gravitational-field equations’ for inner region of a static fluid sphere must adhere to some fundamental physical requirements in order to be physically meaningful. Here we will perform both an analytical and graphical analysis of the physical conditions in order to test the physical viability of the models. For a given value of \(n\), we investigate the physical properties of anisotropic compact star with charge for a given mass and radius of a star. We also explore stellar models that are permitted for any value of mass and radius satisfying the criteria liad down to obtain physically acceptable model. To begin with, we consider a known compact object namely, SAX J 1808.4-3658 (Ergma and Antipova 1999) with it’s observed mass \(M = 0.88\) \(M_{\odot}\) and predicted radius \(R = 8.9\) km to obtain a relativistic stellar model. We have also taken charge \(Q= 0.0089\) to construct the stellar model. The parameters for a physically acceptable stellar models are determined using the prescription of Delgaty and Lake (1998). The physical features of compact objects are studied in the framework of the GTK metric tabulating the model parameters in Table. (1) for a given compact star namely SAX J 1808.4-3658.

Table 1 Different values of parameters \(a\), \(b\), \(A\) and \(C\) for SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\))

6.1 Energy-density and pressure

The radial variation of energy density \((\rho )\), radial pressure \((p_{r})\) and transverse pressure \((p_{\perp})\) for different values of \(n\) are shown in Fig. (1),(2) and (3) respectively. It is evident that energy-density, radial pressure and transverse pressure is positive inside the stellar interior and is maximum at the center, which decreases away from the center. Moreover the central density \((\rho _{c})\) and the central pressure \((p_{c})\) can be obtained as,

$$ \rho _{c} = B_{g}+\frac{3 (A+a \;n)}{16 \pi } \; \; \; ; \; \; \; p_{c} = -B_{g}+\frac{A+a \;n}{16 \pi } $$
(48)

It is clear from Fig. (1) that as \(n\) increase, energy density at the center of the star increases. The radial variation of radial and transverse pressure in Fig. (2) and (3) show that both the pressure falls as \(n\) increase. The value of the central density for \(n \in [1,5]\) is within the range \(\in [50.6413,50.8597] \times 10^{-5}\) \(km^{-2}\). The density at the surface is in the range of \(\in [39.2262,39.6630] \times 10^{-5}\) \(km^{-2}\). The central pressure stays in the range \(\in [38.0525,37.3223] \times 10^{-6}\) \(km^{-2}\). Moreover,at the boundary radial pressure vanishes and \(p_{\perp} > p_{r}\), giving rise to anisotropy.

Fig. 1
figure 1

Radial variation of matter density (\(\rho \)) in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

Fig. 2
figure 2

Radial variation of radial pressure (\(p_{r}\)) in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

Fig. 3
figure 3

Radial variation of transverse pressure (\(p_{\perp}\)) in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1))

6.2 Anisotropy factor

The anisotropy factor is,

$$ \Delta = p_{\perp} - p_{r} $$
(49)

The anisotropy factor (\(\Delta \)) arises due to difference in transverse pressure \((p_{\perp})\) and radial pressure \((p_{r})\) that originates inside the star which yields an extra force gradient term in the TOV equation. Consequently for \(p_{\perp} > p_{r}\), the force gradient that appears due to anisotropy signifies outward pressure, resulting an increase in repulsive force gradient and for \(p_{\perp} < p_{r}\), the anisotropy results a decrease in anisotropic force gradient implying an increase in attractive force (Gokhroo and Mehta 1994).

In the model, the radial variation of the anisotropy factor is plotted in Fig. (4) for different values of \(n\). For a given \(n\) there is no anisotropy at the center and it increases gradually away from the center. It is clear that as one increase the value of \(n\), \(\Delta \) increases upto a distance away from the center at point where \(\Delta \) is same for all; thereafter the trend of anisotropy reverses. We also note that for \(n =1\) and \(n=2\), \(p_{\perp} < p_{r}\) inside the star,\(i.e\)., \(\Delta < 0\). But for \(n > 2\) we get \(p_{\perp}\) is always more than \(p_{r}\). Therefore, it is conclusive that for \(n > 2\), the model permits a stable stellar configuration for which anisotropy is always positive,\(i.e\)., \(\Delta > 0\).

Fig. 4
figure 4

Radial variation of anisotropy factor (\(\Delta \)) in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

6.3 Electric field

The expression for the electric field is given by Eq. (20) and for a physically acceptable model the following condition need to satisfied which leads to,

$$ E^{2}(r=0)=0 $$
(50)

This condition gives us the expression for \(B_{g}\) which also depend on \(n\), which is given by,

$$ B_{g} = \frac{3( a\;n - A ) }{16 \pi} $$
(51)

The plot of the electric field is shown in Fig. (5). It is evident that for a given \(n\), the electric field increases and attains a maximum. Thereafter it decreases at the surface. It is also found that as \(n\) increases \(E^{2}\) decreases. The variation of \(B_{g}\) against different values of \(n\) in the range \(\in [1,25]\) is plotted in Fig. (6). It is shown that the value of \(B_{g}\) is well within the limit \(i.e\)., \(\in [74.1237,75.0191]\; MeV/fm^{3} \) for \(n \in [1,25]\) (Farhi and Jaffe 1984; Kalam et al. 2013; Maurya et al. 2015). It is also noted that as \(n\) increases, the bag constant attains a saturated value.

Fig. 5
figure 5

Radial variation of \(E^{2}\) in SAX J 1808.4-3658 (\(M = 0.88 M_{ \odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

Fig. 6
figure 6

Variation of \(B_{g}\) against \(n\) in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\)). Graph plotted following the numerical values from Table.(1)

6.4 Herrera’s cracking criteria

In order to fulfil the physical requirements for realistic models, it is important to examine the causality conditions of the self-gravitating system. The causality condition suggests that the square of the radial sound velocity (\(v_{r}^{2}=\frac{dp_{r}}{d\rho}\)) and square of the transverse sound velocity (\(v_{\perp}^{2}=\frac{dp_{\perp}}{d\rho}\)) must lie in the ranges \(0< v_{r}^{2} < 1\) and \(0< v_{\perp}^{2} < 1\) (Herrera 1992; Abreu et al. 2007). Moreover, for a relativistic object Abreu’s conditions against Herreras’s cracking approach can be mathematically expressed as,

$$ |v_{\perp}^{2} - v_{r}^{2}| \leq 1 \rightarrow \textstyle\begin{cases} -1 \leq v_{\perp}^{2} - v_{r}^{2} \leq 0 \\ \quad \text{: Stable Region} \\ \; \; \;0 < v_{\perp}^{2} - v_{r}^{2} \leq 1 \\ \quad\text{: Unstable Region} \end{cases} $$
(52)

Plots of \(v_{r}^{2}\), \(v_{\perp}^{2}\) and \(v_{\perp}^{2} - v_{r}^{2} \) for different \(n\) are shown in Fig. (7) and (8) respectively. It is evident from Fig. (7) that for all values of \(n\), \(v_{r}^{2} = \frac{1}{3}\) at all points inside the star. We also note that \(v_{\perp}^{2}\) decrease very sharply for \(n=1\) compared to the other values of \(n\), but inside the star causality is maintained as \(0< v_{\perp}^{2} \leq 1\) holds good. In Fig. (8), \(v_{\perp}^{2} - v_{r}^{2} \) for SAX J 1808.4-3658 shows an interesting behaviour that for \(n=1\) and \(n=2\), \(v_{\perp}^{2} - v_{r}^{2} \) is positive at the center which decreases away from the center and \(v_{\perp}^{2} - v_{r}^{2} > 0\), which implies that cracking may occur leading the model to attain instability. It is found that the inequality \(-1 \le v_{\perp}^{2}-v_{r}^{2} \le 0\) is satisfied for \(n = 3,4\) & 5, which shows no cracking for those values of \(n\) within a stellar interior leading to a stable stellar configuration (Abreu et al. 2007).

Fig. 7
figure 7

Radial variation of square of radial velocity (\(v_{r}^{2}\)) and square of transverse velocity (\(v_{\perp}^{2}\)) in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

Fig. 8
figure 8

Radial variation of \(v_{\perp}^{2} - v_{r}^{2} \) in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

6.5 Adiabatic index

The radial variation of the relativistic adiabatic index, which also describes the stiffness of the EoS for a specific density is studied here. The stability of both relativistic and non-relativistic compact star models are determined from the magnitude of the adiabatic index. The collapsing condition in case of a classical isotropic fluid distribution is \(\Gamma > \frac{4}{3}\) (Bondi 1964), which follows the Newtonian limit. However, in the relativistic limit, the collapsing compact object can be determined from the validity of the constraint (Chan et al. 1992, 1993),

$$ \Gamma < \frac{4}{3} + \Bigg[\frac{1}{3}\kappa \frac{\rho _{0} p_{r0}}{|p_{r0}^{\prime }|} + \frac{4}{3} \frac{(p_{\perp 0} - p_{r0})}{|p_{r0}^{\prime }|r} \Bigg]_{max} $$
(53)

where \(\rho _{0}\), \(p_{r0}\) and \(p_{\perp 0}\) are the initial density, radial pressure and transverse pressure of the fluid at static equilibrium. On the right side of Eq. (53), the second and third terms denote the relativistic correction and the anisotropy adjustment, respectively. This general expression for the collapsing condition revert back to the Newtonian limit for a non-relativistic and isotropic fluid distribution (Ortiz et al. 2020; Maurya and Nag 2021). However, the relativistic adjustments in the parameter \(\Gamma \) may cause instabilities within the compact star (Chandrasekhar 1964a,b). Consequently, Moustakidis (2017) considered another constraint that is imposed on the adiabatic index to describe the stability of such compact objects. The constraint found here lead to a critical value of the adiabatic index (\(\Gamma _{crit}\)), which is also dependent on the compactness factor (u = M/R) of the star as,

$$ \Gamma _{crit} < \frac{4}{3} + \frac{19}{21}u $$
(54)

Therefore, in order to have a stable stellar configuration it is crucial to have \(\Gamma \geq \Gamma _{crit}\). The expression for the adiabatic index is given by,

$$ \Gamma = \Big(\frac{\rho + p_{r}}{p_{r}} \Big) \Big( \frac{d p_{r}}{d \rho} \Big)_{S} $$
(55)

Here the derivation is performed at constant entropy. It is clear form Fig. (9) that the adiabatic index is greater than the critical value (\(\Gamma _{crit} = 1.46529\)) of the adiabatic index at the center which increases thereafter. It is also found that for all values of \(n\) considered, \(i.e\)., \(n \geq 1\) the adiabatic index increases and found to satisfy the condition for stability of the stellar models with the new GTK metric configuration.

Fig. 9
figure 9

Radial variation of \(\Gamma \) in SAX J 1808.4-3658 (\(M = 0.88 M_{ \odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

6.6 Energy conditions

We consider the following energy conditions,

$$ \text{NEC} : \rho + \frac{E^{2}}{8\pi} \geq 0 $$
(56)
$$ \left . \begin{aligned} \text{WEC}_{r} &: \rho + p_{r} \geq 0 \\ \text{WEC}_{t} &: \rho + p_{\perp} + \frac{E^{2}}{8\pi} \geq 0 \end{aligned} \right \} \text{ : WEC} $$
(57)
$$ \text{SEC} : \rho + p_{r} + 2p_{\perp} + \frac{E^{2}}{4\pi} \geq 0 $$
(58)
$$ \left . \begin{aligned} \text{DEC}_{r} &: \rho + \frac{E^{2}}{8\pi} - |p_{r} - \frac{E^{2}}{8\pi}| \geq 0 \\ \text{DEC}_{t} &: \rho + \frac{E^{2}}{8\pi} - |p_{\perp} + \frac{E^{2}}{8\pi}| \geq 0 \end{aligned} \right \} \text{ : DEC} $$
(59)
$$ \text{TEC} : \rho - p_{r} - 2p_{\perp} + \frac{E^{2}}{4\pi} \geq 0 $$
(60)

Plots of the energy conditions are shown in Figs.(10)-(14). It is evident that all the energy conditions are satisfied inside the star with the GTK metric and the parameters considered here.

Fig. 10
figure 10

Radial variation of \(NEC\) in SAX J 1808.4-3658 (\(M = 0.88 M_{ \odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

Fig. 11
figure 11

Radial variation of \(WEC\) in SAX J 1808.4-3658 (\(M = 0.88 M_{ \odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

Fig. 12
figure 12

Radial variation of \(DEC\) in SAX J 1808.4-3658 (\(M = 0.88 M_{ \odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

Fig. 13
figure 13

Radial variation of \(SEC\) in SAX J 1808.4-3658 (\(M = 0.88 M_{ \odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

Fig. 14
figure 14

Radial variation of \(TEC\) in SAX J 1808.4-3658 (\(M = 0.88 M_{ \odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

6.7 Hydrostatic equilibrium under different forces

The structure of an isotropic, spherically symmetric entity in static gravitational equilibrium is constrained by the Tolman-Oppenheimer-Volkoff (TOV) equation. In the present model there are four force gradient namely: (i) anisotropic force gradient (\(F_{a}\)), (ii) electric force gradient (\(F_{e}\)), (iii) hydrostatic force gradient (\(F_{h}\)), and (iv) gravitational force gradient (\(F_{g}\)). Expressions for these force gradients are,

$$ F_{g} = -\nu '(\rho + p_{r}), $$
(61)
$$ F_{h}= -\frac{dp_{r}}{dr}, $$
(62)
$$ F_{a}= \frac{2}{r} (p_{\perp} - p_{r}), $$
(63)
$$ F_{e}= \frac{q}{4\pi r^{4}} \frac{dq}{dr}, $$
(64)

Therefore, the hydrostatic equation yields,

$$ -\nu '(\rho +p_{r}) -\frac{dp_{r}}{dr} + \frac{2}{r} (p_{\perp} - p_{r}) + \frac{q}{4\pi r^{4}} \frac{dq}{dr} = 0 $$
(65)

which can be expressed as,

$$ F_{g} + F_{h} + F_{a} + F_{e} = 0 $$
(66)

In Fig. (15) and (16) we plot different force gradients and found that the hydrostatic equilibrium is achieved with the GTK metric. It is evident that \(F_{g}\) is balanced by the other three force gradients for a certain radial distance inside the star, but near the surface \(F_{g}\) and \(F_{e}\) is balanced by \(F_{a}\) and \(F_{h}\).

Fig. 15
figure 15

Radial variation of the forces in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

Fig. 16
figure 16

Radial variation of the forces in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\)) for different values of \(n\). Graph plotted following the numerical values from Table.(1)

6.8 Mass and compactness

The mass-radius relation and the maximum mass are of special significance in determining the viability of any prescribed model. In GR the effective gravitational mass for a perfect isotropic or anisotropic uncharged fluid distribution is given by,

$$ M_{0}(r) = 4\pi \int ^{r}_{0} r^{2} \rho (r) dr $$
(67)

In this context, Buchdahl (1959) found the upper limit of the mass-radius ratio for the isotropic perfect fluid matter distribution with decreasing trend of the energy density towards the boundary. The maximum limit for mass-radius limit is given by,

$$ \frac{M_{0}}{R} \leq \frac{4}{9} $$
(68)

where R is the radius of the compact object. However, introduction of charge to the fluid distribution may change the effective gravitational mass of the star. In Einstein-Maxwell gravity the effective gravitational mass within radius \(r\) of a charged star is (Murad and Fatema 2015),

$$ M_{ch}(r) = 4\pi \int ^{r}_{0} r^{2} \rho (r) dr + \frac{q^{2}}{2r} + \frac{1}{2} \int ^{r}_{0} \frac{q^{2}}{r^{2}} dr $$
(69)

The presence of charge in a compact obejct changes the mass-radius limit as found in Ref. (Maurya 2020; Maurya and Al-Farsi 2021; Maurya et al. 2021). Andreasson (2008) and Bohmer-Harko (2007) obtained the modified mass-radius limit in presence of charge and found the following upper bound and lower bound to the limit which is given by,

$$\begin{aligned} &\frac{Q^{2} (18R^{2} + Q^{2})}{2R^{2} (12R^{2} + Q^{2})} \\ &\quad\leq \frac{M_{ch}}{R} \leq \frac{2R^{2} + 3Q^{2} + 2R \sqrt{R^{2} + 3Q^{2}}}{9R^{2}} \end{aligned}$$
(70)

The mass function is regular at the center as \(M_{ch}(r) \rightarrow 0\) as \(r \rightarrow 0\). Therefore the compactness factor inside the strange star of radius r is, \(u(r) = \frac{M_{ch}(r)}{r}\). Compactness factor is useful to classify the compact objects in following: for a normal star \(u(R) \sim 10^{-5}\), for a white dwarf \(u(R) \sim 10^{-3}\), for a neutron star \(u(R) \in (10^{-5}, \frac{1}{4})\), for ultra compact objects \(u(R) \in (\frac{1}{4},\frac{1}{2})\) and for black holes \(u(R) = \frac{1}{2}\). For the compact object SAX J 1808.4-3658 the lower limit of the mass-radius ratio is \(7.5 \times 10^{-7}\) and the upper bound is 0.444445. The mass-radius ratio for the compact object is 0.194787, which satisfy the limiting range. The radial variation of the mass function and compactness factor are drawn in Fig. (17). It is evident that a definite limiting value exists for the mass-radius ratio of a compact object in the GTK framework.

Fig. 17
figure 17

Radial variation of mass and the compactness factor in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\))

The Mass-Radius profile are plotted in Figs.(18) and (19). In Fig.(18) the mass-radius profile is plotted for a fixed surface density \(4.5 \times 10^{14}\) \(gm\) \(cm^{-3}\) taking \(n =1\) to 5. In Fig. (19) the mass-radius profile is plotted for \(n=4\) only for different values of surface density. We found that for a given surface density as \(n\) increases, the maximum allowed mass for our model increases which is approximately \(4 M_{\odot}\) which is similar to that of the result attained in Ref. (Rhoades and Ruffini 1974).

Fig. 18
figure 18

Mass-Radius profile for surface density \(4.5 \times 10^{14}\) \(gm\) \(cm^{-3}\) for different values of \(n\) in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\))

Fig. 19
figure 19

Mass-Radius profile for \(n=4\) for different values of surface density in SAX J 1808.4-3658 (\(M = 0.88 M_{\odot}; R = 8.9 km; Q = 0.0089\))

7 Comparative study of the model

We obtain relativistic model of a star with it’s known mass and radius. The model parameters are determined for a stable hydrostatic equilibrium configuration. We considered the following stars: Vela X-1 (Roupas and Nashed 2020) (\(M_{\odot }= 1.77 \pm 0.08\) & \(R = 10.654 \pm 0.14\)), Cen X-3 (Roupas and Nashed 2020) (\(M_{\odot }= 1.49 \pm 0.08\) & \(R=9.178 \pm 0.13\)), PSR J1614-2230 (Arzoumanian et al. 2018) (\(M_{\odot }= 1.97 \pm 0.04\) & \(R=10.977 \pm 0.0006\)) and SAX J178.9-2021 (Özel et al. 2016) (\(1.81^{+0.25}_{-0.37} \; M_{\odot}\) & \(R = 11.7 \pm 1.7\) km); which are used to determine the values of the model parameters to check the suitability of the model for different \(n\) as tabulated in Table (2). It can be noted that for all the stars the central density (\(\rho _{c}\)) is higher than the density at the surface (\(\rho _{R}\)). We can also observe the central radial pressure for different compact objects, taking \(Q=0.0089\). It has been found that all the stars form a stablle stellar model for \(n \geq 2\).

Table 2 Best fitted values of model parameters for different known compact objects

8 Discussion

In the paper, relativistic stellar models for anisotropic charged compact objects in Einstein-Maxwell gravity with a generalised Tolman-Kuchowicz metric are obtained. The exponent \(n\) introduced in the GTK metric plays an important role in deciding the matter configuration inside the compact object. The exponent \(n=1\) corresponds to the Tolman-Kuchowicz metric; however, it is found that one can extend the exponent \(n >1\), which is considered here for constructing a physically acceptable stellar model. Although \(n\) may be taken with large value to construct stellar models, we consider in the paper with \(n \in [1,5]\) (\(n \in \mathbb{Z} \)) and analyse the physical features of compact objects for a given mass and radius of a known star SAX J 1808.4-3658. The contribution of an increase in \(n\) value is studied for evaluating the energy density, pressure profiles and other physical features. We found that \(n\) plays an essential role in determining a viable stellar model. Since the relativistic field equations are highly non-linear and it is impossible to determine the exact solutions for compact objects, we adopt numerical techniques. We note the followings:

\((i)\) The energy-density and pressure profiles are found positive for a given set of model parameters which are obtained from the criteria for a realistic star as evident from Fig. (1)-(3). It is evident that the energy density inside the star increases as we increase \(n\) shown in Fig. (1). Thus a dense star can be represented by a large value of \(n\) different from that required by the TK metric. The energy-density at the center for \(n \in [1,5]\) is found to satisfy a limit given by: \(\in [50.6413,50.8597] \times 10^{-5}\) \(km^{-2}\). The density at the surface lie in the range of \(\in [39.2262,39.6630] \times 10^{-5}\) \(km^{-2}\). From Fig. (2) and (3), it is evident that the radial pressure (\(p_{r}\)) vanishes at the boundary, which is required to estimate the boundary of a star, but the transverse pressure (\(p_{\perp}\)) is non-zero at the boundary which however decreases as one increases \(n\). The radial and transverse pressures at the center are the same for a given value of \(n\), but both pressures decrease at the center as \(n\) increases. The central pressure is found to satisfy the limit: \(\in [38.0525,37.3223] \times 10^{-6}\) \(km^{-2}\) for \(n \in [1,5]\). Bag constant (\(B_{g}\)) also increases as \(n\) increases.

\((ii)\) Although both the radial and the transverse pressures are the same at the center they branch out away from the center, satisfying an inequality, \(p_{\perp} > p_{r}\). The above observation predicts that the anisotropic force gradient yields repulsive nature. The anisotropy in the stellar model enhances the hydrostatic equilibrium leading to the stability of the model. The anisotropy in pressure, which is zero at the center, gradually increases as \(n\) increases up to 8.2 km inside the star SAX J 1808.4-3658, where the anisotropy is identical for all \(n\); thereafter, anisotropy decreases as \(n\) is increased as shown in Fig. (4). We note an interesting result that for charged anisotropic star in GTK metric with \(n=1\) and \(n=2\), the radial pressure is more than the transverse pressure inside of the star resulting in a negative anisotropic parameter, but away from the center at a considerable distance the role reverses, where radial pressure is less than the transverse pressure resulting \(\Delta > 0\). However, for \(n=3,4\) and 5, the transverse pressure is found greater than the radial pressure, always resulting in a positive anisotropic parameter throughout the star. Therefore, \(n=3,4\) and 5 give us a positive anisotropy inside the stellar body which permits a stable stellar configuration.

\((iii)\) In Fig. (5), the variation of the electric field is plotted for different values of \(n\). It is noted that \(E^{2}\) is positive everywhere inside the star. We note that \(E^{2}\) increases away from the center and attains a maximum; after that decreases but never vanishes at the surface. We also note that \(E^{2}\) is decreasing with the increasing value of \(n\). Variation of \(B_{g}\) against \(n\) is plotted in Fig. (6), which shows that the value of the bag constant is within the limit and gets saturated with increasing \(n\).

\((iv)\) The stability of the stellar models in Einstein-Maxwell gravity with generalised Tolman-Kuchowicz metric is ensured by studying the evolution of the sound speed inside the star shown in Figs. (7) and (8). It is evident that the sound speed is subliminal, and hence causality is maintained inside the star. It is also noted that \(v_{r}^{2}= \frac{1}{3}\) is constant for all \(n\), whereas \(v_{t}^{2}\) decreases sharply for \(n=1\) compared to other values of \(n\). We also note that for \(n=1\) and \(n=2\), the \(v_{\perp}^{2} - v_{r}^{2} \) is positive at the center, which decreases gradually, which implies that the model becomes potentially unstable for these values of \(n\). Again the inequality \(-1 \le v_{\perp}^{2}-v_{r}^{2} \le 0\) holds good for \(n = 3,4\) & 5, \(i.e\). we get a stable stellar configuration for these values of \(n\).

\((v)\) The radial variation of the adiabatic index (\(\Gamma _{r}\)) is plotted for different values of \(n\) in Fig. (9). It is evident that the adiabatic index is always greater than the critical limit, \(\Gamma _{crit} = \Big( \frac{4}{3} + \frac{19}{21}u \Big)\) inside the star, indicating the stability of the model.

\((vi)\) The radial variation of the null energy condition, weak energy condition, strong energy condition, dominant energy condition and the trace energy condition are plotted in Fig. (10)-(14) and found that the charged compact stellar model obeys all the energy conditions inside the star SAX J 1808.4-3658.

\((vii)\) In Fig. (15) and (16), all different force gradients namely, gravitational force gradient (\(F_{g}\)), hydrostatic force gradient (\(F_{h}\)), anisotropic force gradient (\(F_{a}\)) and electric force gradient (\(F_{e}\)) are shown for different values of \(n\). We note that (\(F_{g}\)) is always negative and (\(F_{h}\)) is always positive and another two forces show mixed behaviour leading to equilibrium configuration.

\((viii)\) Fig. (17) plots the radial variation of mass and compactification factor. It is evident that the compactness factor decreases as the value of the exponent in GTK metric: \(n\) increases. However, we found that the values obtained above satisfies the limits obtained here for stable stellar model.

\((ix)\) The Mass-Radius profile plotted in Fig. (18) shows that for a fixed density, the upper bound to the maximum mass allowed in the model increases as one increases the exponent (\(n\)) in the generalised Tolman-Kuchowicz metric. In Fig. (19), we consider a given \(n\) say \(n=4\), to draw the Mass-Radius profile, and it is found that the maximum mass limit increases with the decreasing surface density.

\((x)\) We also consider the observed mass and radius of the following compact objects, namely, Vela X-1, Cen X-3, PSR J 16142230 and SAX J178.9-2021 to construct stellar models with generalised Tolman-Kuchowicz metric. The analysis carried out for stellar models is tabulated in Table. (2) with best-fitted values of the model parameters, and it is found that stable stellar configuration is obtained for all these stellar objects for \(n \geq 2\). From the Table. (1) and Table. (2) it is shown that stable stellar models can be obtained for compact objects with different \(n\).

Therefore, it is evident that for \(n=1\) and \(n=2\), the stellar models we have constructed do not permit positive anisotropy inside the compact object and do not follow the inequality \(-1 \le v_{\perp}^{2}-v_{r}^{2} \le 0\) also. Hence, the stellar model we have constructed is potentially unstable for those given model parameter values \(n\) for the compact object SAX J 1808.4-3658. For \(n=3, 4\) and 5, the stellar model satisfies all the necessary conditions to obtain stable stellar models, giving us potentially stable stellar models for charged compact stars in the framework of GR with a geometry described by a generalised Tolman-Kuchowicz (GTK) metric.