1 Introduction

Very early in the study of pulsars it was realized that anisotropies inside the star can grow due to superfluidity [1, 2] (see [3] for a modern review) and solidification [4,5,6,7]. An anisotropic core may also originate [8] from hyperons [9], quarks [10] as well as pion and kaon condensates [11, 12]. In addition, nuclear matter in a magnetic field becomes anisotropic, with different pressures in directions along and transverse to the field [13, 14]. The electromagnetic energy–momentum tensor is naturally anisotropic. Accounting for all these theoretical predictions it seems more realistic that pulsars contain an anisotropic core, rather than an ideally isotropic one.

The theory of anisotropic compact objects in General Relativity has been developing for half a century. Bowers and Liang [15] calculated the anisotropic generalization of Tolman–Oppenheimer–Volkov equation and generalized Bondi’s analysis [16]. An isotropic solution involves the emergence of a tangential pressure \(p_t = p_\theta = p_\phi \) in the angular directions that is different than the radial pressure \(p_r \ne p_t\). If the anisotropy parameter is positive \(\Delta \equiv p_t-p_r>0\) an additional repulsive anisotropic force enhances stability, enabling more compact stable configurations to appear in the anisotropic than in the isotropic case [17]. It is in particular proposed [18, 19] that anisotropic compact stars may be arbitrarily compact up to compactness \(C=2GM/Rc^2\) equal to one. Heintzmann and Hillebrandt [20] estimated the maximum mass of anisotropic compact stars \(M_\mathrm{max}\sim 4M_\odot \) by use of semi-realistic equations of state. The Jeans stability criterion has been extended in the anisotropic case by Herrera and Santos [21].

A lot of anisotropic solutions and anisotropic compact star models have been proposed and studied [22,23,24,25,26,27,28,29,30,31,32]. Ivanov has calculated general bounds on the redshift for any anisotropic compact star in Ref. [33]. We will work here in a metric ansatz introduced by Krori and Barua [34]. Anisotropic compact star models in the Krori–Barua spacetime in General Relativity have been studied in Refs. [35,36,37,38,39,40] and in modified theories of gravity in Refs. [41,42,43,44,45,46,47,48,49,50,51].

We will perform a general analysis of physical viability and stability of anisotropic solutions in KB-spacetime without preassuming an equation of state. We introduce dimensionless variables in which the KB-solutions can be parametrized with respect to the compactness. We impose general conditions for stability and physical consistency, which imply constraints on the maximum allowed compactness. We further use pulsars’ observational data of total mass and radius to estimate the boundary density of the core within our model and calculate the predicted mass–radius curve under a certain boundary condition.

To this end we have to use measurements of the mass and radius of pulsars, which are independent and do not rely on pre-assumptions regarding the equation of state in the core. We shall use six pulsars, members of low-mass X-ray binaries, which present thermonuclear bursts and therefore is possible to get correlated MR constraints [52, 53]. More importantly we shall use data from additional two rotation-powered millisecond pulsars, PSR J0437-4715 and PSR J0030+0451, for which there exist reliable measurements of their radius independent from measurements of their mass and also not depending on assumptions regarding the equation of state [53,54,55,56]. These two pulsars are special in that such measurements are as yet very rare. Both pulsars data are found to be consistent with the same boundary density which amazingly turns out to equal the nuclear saturation density that typically designates the boundary of the neutron core.

In addition, we shall use data regarding the recent gravitational-wave signals GW170817 [57, 58] and GW190814 [59]. We will finally supplement our analysis with data regarding quiescent low-mass X-ray binaries [60, 61] and pulsars presenting thermonuclear bursts [62].

In the next section we review KB-spacetime and introduce our dimensionless variables. In Sect. 3 we perform the physics and stability analysis. In Sect. 4 we discuss observational data and in the final section we discuss our conclusions.

2 Krori–Barua spacetime

A general spherically symmetric metric in General Relativity may be written in the spherical coordinates \((t,r,\theta , \phi )\) as

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

where \(\alpha (r)\) and \(\beta (r)\) are unknown functions of r. The spherically symmetric, anisotropic energy momentum tensor may be written as

$$\begin{aligned} T_\nu ^\mu {} =\left( \frac{p_t}{c^2}+\rho \right) u^\mu u_\nu + p_t\delta _a{}^\mu + (p_r - p_t) \xi ^\mu \xi _\nu , \end{aligned}$$
(2)

where \(\rho \), \(p_r\), \(p_t\) denote the mass density, the radial pressure and the tangential pressure, respectively. We denote \(u^\mu \) the four-velocity and \(\xi ^\mu \) is the unit space-like vector in the radial direction. The energy–momentum tensor can always be brought in the diagonal form \(T^\mu _\nu = \mathrm{diag}(\rho c^2,-p_r,-p_t,-p_t)\).

Einstein equations give

$$\begin{aligned} \frac{8\pi G}{c^2}\rho&= \frac{e^{-\beta }}{r^2} \left( e^{\beta }+\beta 'r-1 \right) , \end{aligned}$$
(3)
$$\begin{aligned} \frac{8\pi G}{c^4} p_r&= \frac{e^{-\beta }}{r^2} \left( 1-e^{\beta }+r\alpha '\right) , \end{aligned}$$
(4)
$$\begin{aligned} \frac{8\pi G}{c^4} p_t&= e^{-\beta } \left( \frac{\alpha ''}{2} - \frac{\alpha '\beta '}{4} + \frac{\alpha '^2}{4} + \frac{\alpha ' - \beta '}{2r} \right) , \end{aligned}$$
(5)

where prime denotes derivative w.r.t the radial coordinate r.

Following Krori and Barua [34] we assume the following ansatz for the metric potentials

$$\begin{aligned} \alpha (x) =a_0 x^2+a_1,\quad \beta (x) =a_2 x^2, \end{aligned}$$
(6)

where however we use the dimensionless variable

$$\begin{aligned} x\equiv \frac{r}{R} \in [0,1] \end{aligned}$$
(7)

and the star is assumed to be extended up to the radius \(r=R\). The parameters \(a_0\), \(a_1\), \(a_2\) in our ansatz are dimensionless and will be determined from the matching conditions on the boundary. The KB ansatz (6) ensures that the gravitational potentials and their derivatives are finite at the center.

We further introduce the characteristic density

$$\begin{aligned} \rho _\star \equiv \frac{c^2}{8\pi G R^2} \end{aligned}$$
(8)

which we use to scale the density and pressures, getting the dimensionless variables

$$\begin{aligned} \tilde{\rho } = \frac{\rho }{\rho _\star },\quad \tilde{p}_r = \frac{p_r}{\rho _\star c^2},\quad \tilde{p}_t = \frac{p_t}{\rho _\star c^2},\quad \tilde{\Delta } = \frac{\Delta }{\rho _\star c^2}. \end{aligned}$$
(9)

Here \(\Delta (r) = p_t - p_r\) is the anisotropic parameter of the star. Note that for a typical radius of neutron stars \(R=10\mathrm{km}\) we get \(\rho _\star = 5.4\times 10^{14}\,\mathrm{g/cm^3}\) that is twice the nuclear saturation density \(\rho _\mathrm{sat} = 2.7\times 10^{14}\,\mathrm{g/cm^3}\). Using the dimensionless variables (9) and substituting (6) in the system (3)–(5) we get

$$\begin{aligned} \tilde{\rho }&= \frac{ e^{-a_2 x^2}}{x^2} \left( e^{a_2 x^2}-1 + 2a_2 x^2 \right) , \end{aligned}$$
(10)
$$\begin{aligned} \tilde{p}_r&= \frac{ e^{-a_2 x^2}}{x^2} \left( 1-e^{a_2 x^2}+2a_0 x^2 \right) , \end{aligned}$$
(11)
$$\begin{aligned} \tilde{p}_t&= e^{-a_2x^2} \left( 2a_0 -a_2 + a_0 (a_0 - a_2) x^2 \right) , \end{aligned}$$
(12)
$$\begin{aligned} \tilde{\Delta }&= \frac{e^{-a_2 x^2}}{x^2} \left( e^{a_2 x^2} - 1 - a_2 x^2 + a_0(a_0-a_2) x^4 \right) . \end{aligned}$$
(13)

The mass contained within a radius r of the sphere is defined as

$$\begin{aligned} \mathcal {M}(r)={\int _0}^r 4\pi \rho \xi ^2 d \xi . \end{aligned}$$
(14)

Substituting the density we get

$$\begin{aligned} \mathcal {M}(x)=M\, C^{-1} x\left( 1-e^{-a_2 x^2}\right) . \end{aligned}$$
(15)

where M denotes the total mass of the star and C is the compactness

$$\begin{aligned} C = \frac{2GM}{Rc^2}. \end{aligned}$$
(16)

We match the interior solution with the Schwartzschild solution at the boundary of the star \(r=R\). In addition we assume that the radial pressure vanishes at the boundary. Our boundary conditions are therefore

$$\begin{aligned} \alpha (r=R)= & {} \ln \left( 1-\frac{2GM}{Rc^2}\right) , \nonumber \\ \beta (r=R)= & {} \ln \left( 1-\frac{2GM}{Rc^2}\right) ^{-1}, \quad p_r(r=R) = 0. \end{aligned}$$
(17)

By use of Eqs. (6), (11), the boundary conditions (17) give the dimensionless parameters \(a_0\), \(a_1\) and \(a_2\) with respect to the compactness of the star as follows

$$\begin{aligned} a_0(C)= & {} \frac{1}{2}\frac{C}{1-C}, \quad a_1 (C)=-(a_0 (C) +a_2 (C)), \nonumber \\ a_2(C)= & {} \ln \left( 1- C\right) ^{-1}. \end{aligned}$$
(18)

Note also that since \(C < 1\) we get

$$\begin{aligned} a_0>0,\quad a_1 <0,\quad a_2>0. \end{aligned}$$
(19)

Thus, we parametrized any neutron star model in KB-spacetime with respect to the compactness of the star. The quantities \(\tilde{\rho } (x;C) \), \(\tilde{p}_r(x;C) \), \(\tilde{p}_t (x;C) \) are the same for stars with the same compactness C. In Fig. 1 is evident that the equation of state \(p_r=p_r(\rho )\), \(p_t = p_t(\rho )\) is well fitted by a linear fit. In Fig. 1c, d we plot the slope of the fit with respect to compactness. It is evident that causality is violated for sufficiently high compactness. We discuss in detail the constraints imposed by requiring that the solution is stable and physical in the next section.

Fig. 1
figure 1

In the upper panel is depicted the equation of state \(p = p(\rho )\) for the radial and tangential pressures. In the lower panel we draw the slope of the linear fit of \(p=p(\rho )\) for the radial and tangential pressures with respect to the compactness of the star

3 Constraints imposed by physical and stability conditions

We impose the following reasonable physical requirements to a KB-spacetime (outlined in general very nicely in [63]).

  1. (i)

    The gravitational potentials \(\exp (\alpha (r))\), \(\exp (\beta (r))\) and the physical quantities \(\rho (r)\), \(p_r(r)\), \(p_t(r)\) should be well defined in the center as well as regular and singularity free throughout the interior of the star. These properties are directly implied by Eqs. (6), (10), (11), and (12).

  2. (ii)

    The anisotropy parameter should be positive throughout the whole interior of the star [64, 65]. Indeed, we have that

    $$\begin{aligned}&e^{a_2 x^2} - 1 - a_2 x^2 - a_0(a_2-a_0) x^4\nonumber \\&\quad = \sum _{n=3}^\infty \frac{1}{n!}(a_2 x^2)^n + \frac{1}{2}(a_2-a_0)^2 x^4 + \frac{1}{2} a_0^2 x^4 > 0.\nonumber \\ \end{aligned}$$
    (20)

    From Eq. (13) follows directly that \(\Delta >0\) for all \(a_0\), \(a_2\), r. It should also be vanishing in the center. Indeed, we have

    $$\begin{aligned} \tilde{p}_r(0)= \tilde{p}_t(0)= 2a_0-a_2. \end{aligned}$$
    (21)
  3. (iii)

    The energy density, the radial and tangential pressures should be positive at the center. The energy density at the center is

    $$\begin{aligned} \tilde{\rho }(0)= 3a_2 >0. \end{aligned}$$
    (22)

    It is positive also throughout the stellar interior. Indeed

    $$\begin{aligned} e^{a_2r^2}-1 + 2a_2r^2= & {} 1 + a_2r^2 + \sum _{n=2}^{\infty } \frac{1}{n!}(a_2 r^2)^n \nonumber \\&- 1 + 2a_2r^2\nonumber \\= & {} \sum _{n=2}^{\infty } \frac{1}{n!}(a_2 r^2)^n + 3a_2r^2 >0 \end{aligned}$$
    (23)

    which, considering Eq. (10), implies \(\rho > 0\). Regarding the radial and tangential pressure from Eq. (18) we get

    $$\begin{aligned} a_0&= a_2 f(C),\quad \mathrm{where }\, f(C) \nonumber \\&\quad \equiv \frac{1}{2}\frac{C}{(1-C)\ln (1-C)^{-1}}. \end{aligned}$$
    (24)

    Since \(C<1\) we have \(f(C) > 1/2\). This is straightforward because \(f(0) = 1/2\) and \(df/dC > 0\). Thus

    $$\begin{aligned} a_0 > \frac{a_2}{2}. \end{aligned}$$
    (25)

    from which it follows \(p_r(0)>0\), \(p_t(0)>0\) where the central pressures are given in (21). The radial pressure is positive also throughout the whole interior of the star since

    $$\begin{aligned} 1- e^{a_2 x^2} + 2a_0 x^2 = \frac{(1-C)^{x^2} - (1-C)}{(1-C)^{x^2+1}} > 0, \end{aligned}$$
    (26)

    because \(C<1\) and \(x\le 1\). Considering Eq. (11), it follows that \(p_r>0\). Since the anisotropy parameter is positive, the tangential pressure is also positive throughout the interior of a star.

  4. (iv)

    The density and the pressures should be decreasing functions of r. We have

    $$\begin{aligned} \tilde{\rho }{\,}^{\prime }&= 2 \frac{ e^{-a_2 x^2}}{x^3} \left( -e^{a_2 x^2} + 1 + a_2 x^2 - 2a_2^2x^4 \right) , \end{aligned}$$
    (27)
    $$\begin{aligned} \tilde{p}_r{}^{\prime }&= 2 \frac{ e^{-a_2 x^2}}{x^3} \left( e^{a_2 x^2} - 1 - a_2x^2 - 2a_0 a_2 x^4 \right) , \end{aligned}$$
    (28)
    $$\begin{aligned} \tilde{p}_t{}^{\prime }&= 2 x e^{-a_2x^2} \left( a_0^2 + a_2^2 - 3a_0a_2 - a_0 a_2 (a_0 - a_2) x^2 \right) , \end{aligned}$$
    (29)

    where prime denotes derivative with respect to x. We have

    $$\begin{aligned} -e^{a_2 x^2} + 1 + a_2 x^2 - 2a_2^2x^4 = - \sum _{n=2}^\infty \frac{1}{n!} (a_2 x^2)^n - 2a_2^2 x^4 < 0,\nonumber \\ \end{aligned}$$
    (30)

    which, considering Eq. (27), implies \(\rho ' < 0 \). Regarding now \(p_r'\), we have by use of (18) that on the boundary the derivative is negative

    $$\begin{aligned} e^{a_2 } - 1 - a_2 - 2a_0 a_2&= \frac{ C - \ln (1-C)^{-1} }{1-C}< 0 \nonumber \\&\Rightarrow p_r'(x=1) < 0. \end{aligned}$$
    (31)

    Since we have proven that \(p_r>0\), it is possible for \(p_r\) to be increasing somewhere in the interval \(x\in (0,1)\) if and only if there exists \(x_0\) such that

    $$\begin{aligned} \tilde{p}_r''(x_0) = 0 \Rightarrow 1 - e^{a_2 x_0^2} + 2a_0 x_0^2 = - 2a_0 x_0^2 . \end{aligned}$$
    (32)

    However we have that

    $$\begin{aligned} \tilde{p}_r> 0 \Rightarrow 1 - e^{a_2 x^2} + 2a_0 x^2 > 0,\quad \forall x\in (0,1) \end{aligned}$$
    (33)

    and thus Eq. (32) is impossible. Since \(p_r\) is positive in the interval \(x\in [0,1)\), vanishes in the boundary \(x=1\), and has no inflection point in the interval (0, 1) it follows that it is a decreasing function in [0, 1]. The case of tangential pressure is more involved because there do exist inflection points of \(p_t\). This occurs at high compactness and at low distance from the center, as depicted in Fig. 2a. We calculate numerically that for \(p_t\) being a monotonically decreasing function the compactness should satisfy that

    $$\begin{aligned} C < 0.94. \end{aligned}$$
    (34)
  5. (v)

    We require that causality holds, namely that the speed of sound \(v^2 = \frac{dp}{d\rho }\) is lower than the speed of light

    $$\begin{aligned} 0 \le v_r \le c,\quad 0 \le v_t \le c. \end{aligned}$$
    (35)

    The radial and transverse velocity of sound are

    $$\begin{aligned} v_r{}^2&= \frac{dp_r}{d\rho }=c^2 \frac{ 1 + a_2 x^2 + 2a_0 a_2 x^4 - e^{a_2 x^2}}{e^{a_2 x^2} - 1 -a_2 x^2+2a_2{}^2 x^4}, \end{aligned}$$
    (36)
    $$\begin{aligned} v_t{}^2&= \frac{dp_t}{d\rho }= c^2 \frac{x^4(3a_0a_2-a_0a_2{}^2 x^2+a_0{}^2a_2 x^2-a_2{}^2-a_0{}^2)}{e^{a_2 x^2} - 1 - a_2 x^2 + 2a_2{}^2 x^4}\, . \end{aligned}$$
    (37)

    We find numerically that the inequalities (35) impose constraints on maximum allowed compactness. The radial velocity imposes that \(C < 0.86\) and the tangential velocity that \(C<0.87\), therefore causality is satisfied if

    $$\begin{aligned} C < 0.86. \end{aligned}$$
    (38)

    These results are also in accordance with the linear fit of Fig. 1. The fact that causality is not satisfied for sufficiently high compactness is depicted in Fig. 3.

  6. (vi)

    We require stability against cracking which is satisfied if [66, 67]

    $$\begin{aligned} 0< v_r{}^2-v_t{}^2 < c^2. \end{aligned}$$
    (39)

    This condition imposes an additional constraint on maximum allowed compactness

    $$\begin{aligned} C < 0.78. \end{aligned}$$
    (40)

    The fact that cracking stability is violated for sufficiently high compactness is depicted in Fig. 4.

  7. (vii)

    We require that the strong energy condition (SEC) [63, 68] holds

    $$\begin{aligned} \rho c^2 - p_r - 2p_t > 0. \end{aligned}$$
    (41)

    It places an additional constraint to the maximum allowed compactness, which we calculate numerically to be

    $$\begin{aligned} C \le 0.715. \end{aligned}$$
    (42)

    In Fig. 5 is depicted that indeed for sufficiently high compactness, SEC is violated.

  8. (viii)

    Our model satisfies the stability condition for the adiabatic index [69, 70]

    $$\begin{aligned} \Gamma \equiv \frac{\rho + p_r}{p_r}\frac{dp_r}{d \rho } > \frac{4}{3}. \end{aligned}$$
    (43)

    The adiabatic index may be written as

    $$\begin{aligned}&\Gamma (x;C) \nonumber \\&\quad = \frac{2 x^2(a_0 + a_2)(1 + a_2 x^2 + 2 a_0 a_2 x^4 - e^{a_2 x^2} )}{(1 - e^{a_2 x^2} + 2a_0 x^2 )(e^{a_2 x^2} - 1 - a_2 x^2 + 2a_2{}^2 x^4)}. \end{aligned}$$
    (44)

    From inequalities (26), (30) it follows that \(\Gamma > 0\). We verify numerically that \(\Gamma \) is a monotonically increasing function for all \(C\in [0,1]\) and \(x\in [0,1]\), with \(a_0=a_0(C)\), \(a_2=a_2(C)\) as in Eq. (18). This is depicted in Fig. 6. We also have that

    $$\begin{aligned} \Gamma (x=0) = \frac{4}{5}\frac{(\frac{a_0}{a_2}+1)(2\frac{a_0}{a_2}+\frac{1}{2})}{2\frac{a_0}{a_2}-1} > \frac{7}{5}\left( 1+ \frac{2\sqrt{6}}{7}\right) , \end{aligned}$$
    (45)

    where \(\frac{a_0}{a_2} > \frac{1}{2} \) as in (25). The inequality (45) follows from the monotonicity of the function

    $$\begin{aligned} h(z) = \frac{4}{5}\frac{(z+1)(2z+\frac{1}{2})}{2z-1} \end{aligned}$$
    (46)

    in the interval \(z>\frac{1}{2}\). The function h(z) presents a minimum at \(z_\mathrm{min} = \frac{1}{2}+\frac{\sqrt{6}}{4}\). It is \(h(z_\mathrm{min}) = \frac{7}{5}\left( 1+ \frac{2\sqrt{6}}{7}\right) \). It follows that \(\Gamma > 4/3\) for all x and C in the interval [0, 1].

Fig. 2
figure 2

a The derivative of \(p_t\) with respect to compactness \(2GM/Rc^2\) of a star and distance r/R from its center. It is evident that for high compactness values, \(p_t\) is not monotonically decreasing. b The tangential pressure \(p_t\) with respect to the distance from the center of the star for two compactness values

Fig. 3
figure 3

For sufficiently high compactness, causality is violated

Fig. 4
figure 4

For sufficiently high compactness, stability against cracking as in condition (39) is violated

Fig. 5
figure 5

For sufficiently high compactness, SEC as in condition (41) is violated

Fig. 6
figure 6

The adiabatic index \(\Gamma \) with respect to compactness and distance from the center

To conclude, we find that conditions (i), (ii), (iii), (viii) are all satisfied by KB-spacetime for any compactness value. Conditions (iv), (v), (vi), (vii) impose constraints to compactness given by (34), (38), (40), (42), respectively. Combining these constraints we get that it should hold

$$\begin{aligned} C \le 0.715, \end{aligned}$$
(47)

for a stable, physical solution within a KB-spacetime.

4 Observational data

Independent mass measurements of neutron stars are relatively easy. Their fast pulsation is ideal for timing measurements and since the pulsar is often a member of a binary system, this precise timing can be used to measure its orbital motion with astonishing precision [53]. On the other hand the independent radius measurement, depending on the thermal emission of the stellar surface, is much more difficult.

Table 1 The boundary density \(\rho _R\) and slope of the \(p_r(\rho )\) linear fit within our model for several observational data of mass M and radius R of pulsars. The “LIGO constraints” label refers to the radius constraints on a canonical mass neutron star obtained from GW170817, GW190814 in [59]

Rotation-powered millisecond pulsars allow for the measurement of radius based on thermal emmision in soft X-rays [53, 54]. The mass of the pulsar can be measured independently by radio-timing measurements. There exist two such pulsars, PSR J0437-4715 (we shall call J0437) and PSR J0030+0451 (we shall call J0030), for which there exist very recent independent and reliable measurements from NICER [55, 56].

In addition to J0437 and J0030 we consider the gravitational-wave signals GW170817[57, 58] and GW190814 [59]. GW170817 was the first detection of coalescence of two neutron stars [57]. The subsequent analysis of LIGO/Virgo collaboration [58] constrained significantly the radii and masses of the two neutron stars. GW190814 was the first detection of an object within the mass-gap [59] with mass \(M = 2.6\mathrm{M}_\odot \). If this component is a neutron star and not a black hole the equation of state is further constrained.

We supplement our analysis with data regarding two quiescent low-mass X-ray binaries [60, 61] and six pulsars, members of low-mass X-ray binaries, that present thermonuclear X-ray bursts. For such pulsars it is possible to get correlated MR constraints [52, 53] independent from assumptions regarding the equation of state.

Fig. 7
figure 7

The mass–radius curve for three different boundary conditions \(\rho _R\) along with (RM) points of all pulsars of Table 1

In Table 1 we see that the boundary density of all pulsars within a KB-spacetime lies in the range (2.5–6.5) \(\times 10^{14}\,{\mathrm{g/cm}^3}\). These values are consistent with a neutron core. All pulsars are consistent with a linear equation of state as already shown in Fig. 1. The corresponding slope is depicted in the last column of Table 1.

In Fig. 7 is plotted the mass–radius curve with a certain boundary condition. It is evident that the most recent and reliable independent data from NICER and LIGO are consistent with the same boundary density which amazingly turns out to equal the nuclear saturation density \(\rho _\mathrm{sat} = 2.7\times 10^{14}\,\mathrm{g/cm^3}\). This value perfectly describes a neutron core since typically it designates core’s boundary. Furthermore, anisotropies can grow down to this density. In Ref. [5] is argued that solidification occurs at the nuclear density \(\rho _\mathrm{solid}= 2.8\times 10^{14}\,\mathrm{g/cm^3}\), and similar results are obtained in [73] which predict \(\rho _\mathrm{solid}= 3.7\times 10^{14}\,\mathrm{g/cm^3}\). Even if solidification occurs at higher densities as predicted by other studies [6, 7], anisotropic superfluidity of nuclear matter appears at low densities such as \(\rho = 1.5\times 10^{14} \,\mathrm{g/cm^3}\) [2].

The mass–radius curve with the boundary condition \(\rho _R = \rho _\mathrm{sat}\), which fits well NICER and LIGO data, is depicted in Fig. 8). We have calculated in previous section the maximum allowed compactness for a physical anisotropic core within a KB-spacetime to be \(C_\mathrm{max} = 0.71\). This limits the maximum mass to \(M_\mathrm{max} = 4.1M_\odot \) at \(R = 16.8\,\mathrm{km}\).

Our results does not exclude the possibility that the secondary component of GW190814 with mass \(M=2.6\mathrm{M}_\odot \) is an anisotropic neutron star. The condition \(C<0.71\) implies that it should have a radius \(R>10.8\,\mathrm{km}\). The corresponding boundary density should be lower than \(\rho _R< 6.6\times 10^{14}\,\mathrm{g}/\mathrm{cm}^3\).

Fig. 8
figure 8

The curve corresponds to equilibrium solutions with the same boundary condition \(\rho _R = 2.7\times 10^{14}\,\mathrm{g/cm^3}\). The solid branch corresponds to stable, physical solutions and the dotted branch represents unstable or nonphysical solutions. The maximum mass is \(4.1M_\odot \) at radius 16.8 km with corresponding compactness 0.71. On the right panel we focus on the area including the most recent data from NICER and LIGO. The “LIGO” label refers to the radius constraints on a canonical mass neutron star obtained from GW170817, GW190814 in [59]

5 Conclusions

We parametrized any neutron star model in KB-spacetime with respect to the compactness of the star. This description is given by Eqs. (10), (11), (12), and (18). Requiring that any KB-spacetime model of neutron stars is physical and the solution stable constraints the compactness to a maximum value

$$\begin{aligned} \frac{2GM}{Rc^2} < 0.71. \end{aligned}$$
(48)

This is significantly more strict than the bound, 0.95, obtained for general anisotropic stars in Ref. [33] and is in contrast to suggestions that anisotropic compact stars can be arbitrarily compact [18, 19].

The equations of state in a general KB-spacetime, depicted in Fig. 1, are well fitted by a linear fit. A KB-spacetime fits observational data obtained from numerous pulsars of Table 1 with boundary density in the range \(\rho _R \sim \) (2.5–6.5) \(\times 10^{14}\,\mathrm{g/cm^3}\) consistent with an anisotropic neutron core. In Fig. 7 we have calculated the mass–radius curves. An additional direct indication that KB-spacetime is realistic for anisotropic neutron stars is that the most recent data from NICER and LIGO are well fitted with boundary density which equals precisely the nuclear saturation density!

The mass–radius curve with boundary density that equals to the nuclear saturation density presents a mass maximum

$$\begin{aligned} M < 4.1M_\odot \end{aligned}$$
(49)

when the bound (48) to compactness is also taken into account. This limits the maximum allowed mass for any consistent compact star model in KB-spacetime. This result is also in accordance with the estimated maximum mass in general spacetimes by Heintzmann and Hillebrandt [20], who use semi-realistic equations of state.

Our analysis predicts further that anisotropic neutron stars may populate partially the mass gap (2.5–5) \(M_\odot \) regarding compact objects. An observation of a neutron star with \(M>2.5M_\odot \) will be an indication it is composed of an anisotropic core. Especially, the possibility that the secondary component of the gravitational-wave signal GW190814 is a neutron star with an anisotropic core requires further investigation.