1 Introduction

Symmetries in spacetime generate substantial interest in the literature because they provide insight into geometrical properties of the spacetime and they help in generation of exact solutions to the field equations. Conformal symmetries are particularly important as they generate constants of motion of massless particles, and Lie dragging of the metric along a congruence of the curves gives a quantity which is proportional to the metric. The presence of a conformal Killing vector places constraints on the gravitational field and this simplifies the integration of the Einstein field equations. Consequently, a conformal symmetry is important in relativistic astrophysics and is useful in modelling dense relativistic stars. Herrera et al. [1] were the first to model a conformally invariant gravitating sphere. Herrera and Ponce de Leon [2,3,4] presented other stellar models with conformal symmetry. Many of these solutions were not regular at the centre. Maartens and Maharaj [5] generated models of conformally invariant spheres with an anisotropic energy momentum tensor which is regular at the centre of the star.

Conformal Killing vectors have been comprehensively analysed in static spherical spacetimes by Maartens et al. [6, 7] and Tupper et al. [8]. Manjonjo et al. [9] used the Weyl tensor to find conformally flat and non-conformally flat static metrics with conformal symmetries. In a subsequent paper Manjonjo et al. [10] showed that a conformal symmetry generates an explicit relationship relating the gravitational potentials in general; isotropic and anisotropic matter distributions can then be found with a conformal Killing vector. These studies may be used to model stellar systems in relativistic astrophysics. Mak and Harko [11] modelled a quark star with a one-parameter group of conformal motions. Relativistic stars with a linear equation of state were considered by Esculpi and Aloma [12]. Rahaman et al. [13] and Shee et al. [14] studied anisotropic stars with a nonstatic conformal vector, tangential pressures and a specified spacetime potential. Quintessence fields [15], gravastar models [16] and braneworld structures [17] have been analysed with a conformal symmetry. These studies show that the assumption of a conformal symmetry in spacetime is useful in studying exact solutions of field equations and astrophysical processes in stars.

Table 1 Variation of mass, radius and central density in terms of b and n. The parameters b and n are variable
Table 2 Variation of mass, radius and central density in terms of b. The parameter b is variable and n is fixed

We restrict the spacetime geometry or the matter fluid to solve the Einstein field equations. Here we assume the presence of a conformal Killing vector in the spacetime manifold. The relationship between the gravitational potentials established by Manjonjo et al. [9] forms the basis of our study. We choose the form for one of the gravitational potentials that enables the conformal condition in [9] to be integrated. In this work we present a new anisotropic solution for a compact star with the use of a conformal Killing vector in the spherical spacetime geometry. In Sect. 2, we present the relationship between the gravitational potentials and the Einstein field equations. A new exact anisotropic solution is generated in Sect. 3. In Sect. 4, physical requirement conditions for acceptability of the stellar model and the model parameter constraints are discussed. In Sect. 5, we generate masses and radii for selected pulsars PSR J1614-2230, Vela X-1, PSR J1903+327 and Cen X-3. The results are presented in Tables 1 and 2, and graphical plots of matter variables for PSR J1614-2230 are displayed. A detailed analysis of the physical features is presented. A brief conclusion is drawn in Sect. 6.

2 The model

The line element for static spherically symmetric spacetimes can be written in the form

$$\begin{aligned} \mathrm{d} s^2 = -e^{2\nu (r)} \mathrm{d} t^2 + e^{2\lambda (r)} \mathrm{d} r^2+r^2(\mathrm{d}\theta ^2 +\sin ^2\theta \mathrm{d}\phi ^2), \end{aligned}$$
(1)

in coordinates \((x^a) = (t,r,\theta , \phi ) \). The quantities \(\nu (r)\) and \(\lambda (r)\) are the gravitational potentials. The fluid 4-vector is comoving, unit and timelike. It has the form \(u^a = e^{-\nu } \delta ^a_0\). The matter distribution is anisotropic so that the energy momentum tensor has the form

$$\begin{aligned} T_{ab} = \text{ diag }\left( -\rho , p_{\mathrm{r}}, p_{\mathrm{t}}, p_{\mathrm{t}}\right) , \end{aligned}$$
(2)

where \(\rho , p_{\mathrm{r}}\) and \(p_{\mathrm{t}}\) are the energy density, radial pressure and tangential pressure, respectively. The difference \(p_\mathrm{r} - p_\mathrm{t} = \varDelta \) defines the anisotropy. When the anisotropy \(\varDelta \) vanishes, \(p_{\mathrm{r}} = p_{\mathrm{t}}\) and the pressure is isotropic. From (1) and (2) we find that the Einstein field equations are given by

$$\begin{aligned}&\frac{1}{r^2}\left[ r(1- e^{-2\lambda }) \right] ' = 8 \pi \rho , \end{aligned}$$
(3a)
$$\begin{aligned}&e^{-2\lambda }\left[ \frac{2\nu '}{r} + \frac{1}{r^2}\right] - \frac{1}{r^2} = 8 \pi p_\mathrm{r}, \end{aligned}$$
(3b)
$$\begin{aligned}&e^{-2\lambda } \left[ \nu ''+ {\nu '}^2 + \frac{\nu '}{r} - \frac{\lambda '}{r} - \nu ' \lambda '\right] = 8 \pi p_\mathrm{t }, \end{aligned}$$
(3c)

where primes denote differentiation with respect to the coordinate r. In the above we are using units where \(G = c =1\).

The field equations (3) are difficult in general. In this investigation we assume that the spacetime admits a conformal symmetry to find an exact solution. For a conformal Killing vector \( \mathbf {X} \) to exist the metric tensor field \( g_{ab}\) is Lie dragged such that

$$\begin{aligned} \mathscr {L}_ \mathbf X g_{ab} = 2\psi g_{ab} \end{aligned}$$
(4)

is satisfied. Here \(\mathscr {L}_ \mathbf X \) is the Lie derivative operator and \(\psi (x^a)\) is the conformal factor. Static spherically symmetric spacetimes with conformal motions have been comprehensively studied by Manjonjo et al. [9] by extending earlier treatments of Maartens et al. [6, 7] and Moopanar and Maharaj [18, 19]. They assumed the presence of a spherically symmetric conformal Killing vector

$$\begin{aligned} \mathbf {X} = \alpha (t,r) \frac{\partial }{\partial t} + \beta (t,r) \frac{\partial }{\partial r}, \end{aligned}$$
(5)

with the nonstatic conformal factor \( \psi = \psi (t,r) \). The existence of the conformal Killing vector \( \mathbf {X} \) given by (5) leads to a specific relationship between the gravitational potentials \( e^{2 \lambda (r)} \) and \( e^{2 \nu (r)} \). We find that the analysis in Manjonjo et al. [9] leads to the condition

$$\begin{aligned} e^{\nu } = B r\cosh \left( \sqrt{1+k} \int \frac{e^{\lambda }}{r} \mathrm{d} r + l \right) , \end{aligned}$$
(6)

where Bk and l are constants. When \( k = 0 \) then the spacetime is conformally flat, and \( k \ne 0 \) will lead to a non-conformally flat model. We impose condition (5) to find a gravitating anisotropic star.

The condition (6) allows us to rewrite the field equations (3) in the form

$$\begin{aligned} 8\pi \rho= & {} \frac{1-e^{-2\lambda }}{r^2} +\frac{2\lambda ^{\prime } e^{-2\lambda }}{r} , \end{aligned}$$
(7a)
$$\begin{aligned} 8\pi p_{\mathrm{r}}= & {} \frac{3 e^{-2\lambda }-1 }{r^2} \nonumber \\&+ \frac{2e^{-\lambda }\sqrt{1+k}\tanh \left( \sqrt{1+k} \int \frac{e^{\lambda }}{r} \mathrm{d} r + l \right) }{r^2}, \end{aligned}$$
(7b)
$$\begin{aligned} 8\pi p_{\mathrm{t}}= & {} \frac{1+k}{r^2}+\frac{(1 - 2\lambda ' r)e^{-2\lambda }}{r^2} \nonumber \\&+\frac{2 \sqrt{1+k} e^{-\lambda }\tanh \left( \sqrt{1+k} \int \frac{e^{\lambda }}{r} \mathrm{d} r + l \right) }{r^2}. \end{aligned}$$
(7c)

We find that all matter variables depend only on one metric function, namely \( e^{2 \lambda } \). A particular choice of \( \lambda (r) \) will lead to an exact solution of the field equations after integration. We demonstrate the existence of an exact solution in the next section. The mass of an uncharged compact object contained within a radius r of the relativistic sphere is

$$\begin{aligned} M(r)=4\pi \int ^{r}_{0}{\rho (\omega )} {\omega }^{2} \mathrm{d}\omega . \end{aligned}$$
(8)

3 Exact solution

We need to choose the function \(e^{\lambda }\) and complete the integration in (6) to generate a solution to the Einstein system. We perform this choice so that both metric functions remain regular at the centre \(r = 0\). We take \(e^{\lambda }\) in the form

$$\begin{aligned} e^{\lambda }= \frac{1}{\sqrt{k+1} - b r^2}, \end{aligned}$$
(9)

were b is a constant. Then (6) gives the second potential

$$\begin{aligned} e^{\nu } =\frac{B}{2 \sqrt{b} e^l} \left[ \frac{\left( e^{2l} - 1\right) b r^2 + \sqrt{1+k} }{ \sqrt{\sqrt{1+k} - b r^2}}\right] . \end{aligned}$$
(10)

At \( r=0 \) the potentials are regular at the stellar centre.

Then using the potentials (9) and (10), an exact solution to the Einstein system (7) is given by

$$\begin{aligned} \rho= & {} \frac{6b \sqrt{1+k} - 5b^2 r^2}{8 \pi } - \frac{k}{8 \pi r^2}, \end{aligned}$$
(11a)
$$\begin{aligned} p_{\mathrm{r}}= & {} \frac{3b^3 (n- 1)r^4 + b^2 \sqrt{1+k} (7 - 8 n) r^2 }{8 \pi \left[ \left( n - 1\right) b r^2 + \sqrt{1+k}\right] } \nonumber \\&+ \frac{(5k + 4)(n- 1)b r^2+ k \sqrt{1+k} }{8 \pi r^2 \left[ \left( n - 1\right) b r^2 + \sqrt{1+k}\right] }, \end{aligned}$$
(11b)
$$\begin{aligned} p_{\mathrm{t}}= & {} \frac{5b^3 (n - 1)r^4 + b^2 \sqrt{1+k} (9 - 8 n) r^2}{8 \pi \left[ \left( n - 1\right) b r^2 + \sqrt{1+k}\right] } \nonumber \\&+ \frac{4(k + 1)(n - 1)b }{8 \pi \left[ \left( n - 1\right) b r^2 + \sqrt{1+k}\right] } . \end{aligned}$$
(11c)

In (11) we have set \( n = e^{2l} \) for notational convenience. Equations (11) represent an anisotropic star which is gravitating in the presence of the conformal Killing vector (5). Note that the mass function (8) becomes

$$\begin{aligned} M(r)= b \sqrt{1+k} r^3 - \frac{b^2}{2} r^5 -\frac{k}{2} r, \end{aligned}$$
(12)

for the above density.

4 Physical features of the stellar model

4.1 Regularity conditions inside and at the boundary \(r=\mathscr {R}\)

For physical acceptability, the model should comply with several requirements throughout the star. These include: the gravitational potentials \(e^{2\nu }\) and \(e^{2\lambda }\) and the matter variables \(\rho , p_\mathrm{r}\), \(p_\mathrm{t}\) should be positive at the centre and regular throughout the star; at the centre \(\rho , p_\mathrm{r}\) and \(p_\mathrm{t}\) should be finite: \(\rho (r=0)=\rho _{\mathrm{c}}\), \(p_\mathrm{r}(r=0)={p_\mathrm{r}}_{\mathrm{c}}\) and \(p_\mathrm{t}(r=0)={p_\mathrm{t}}_{\mathrm{c}}\); the gradients \(\frac{d \rho }{\mathrm{d} r}\le 0 \), \(\frac{\mathrm{d} p_\mathrm{r}}{\mathrm{d} r}\le 0 \) and \(\frac{\mathrm{d} p_\mathrm{t}}{\mathrm{d} r}\le 0\) within the star. The anisotropy at the centre should vanish: \(\varDelta (r=0)= p_\mathrm{t}-p_\mathrm{r}=0\).

For a stable configuration we require that the speed of sound must be less than the speed of light. This implies that \(0\le v^2_\mathrm{r}=\frac{\mathrm{d} p_\mathrm{r}}{\mathrm{d} \rho }\le 1\) and \(0\le v^2_\mathrm{t}=\frac{\mathrm{d} p_\mathrm{t}}{\mathrm{d} \rho }\le 1\) inside the stellar body. To prevent cracking or overturning of the star we must have \( -1<v_\mathrm{t}^2 -v_\mathrm{r}^2<0\), \( 0<v_\mathrm{r}^2 -v_\mathrm{t}^2<1\). Another condition for the stability is the restriction on the adiabatic index \(\varGamma =\dfrac{\rho +p_\mathrm{r}}{p_\mathrm{r}}\dfrac{\mathrm{d}\rho }{\mathrm{d}p_\mathrm{r}}>\dfrac{4}{3}\).

The equilibrium condition for stability is related to the Tolman–Oppenheimer–Volkoff (TOV) equation. The TOV equation is given by

$$\begin{aligned} \frac{\mathrm{d} p_\mathrm{r}}{d \mathrm{r}} = -\nu ^{\prime }(\rho +p_\mathrm{r}) + \frac{2}{r}(p_\mathrm{t} - p_\mathrm{r}). \end{aligned}$$
(13)

It is convenient to introduce

$$\begin{aligned} F_\mathrm{g} = -\nu ^{\prime }(\rho +p_\mathrm{r}), \quad F_\mathrm{h} = -\frac{\mathrm{d} p_\mathrm{r}}{\mathrm{d} r}, \quad F_\mathrm{a} = \frac{2}{r}\left( p_\mathrm{t}-p_\mathrm{r}\right) , \end{aligned}$$

where \(F_\mathrm{g}\), \(F_\mathrm{h}\) and \(F_\mathrm{a}\) are known as gravitational, hydrostatic and anisotropic forces, respectively. Then (13) becomes

$$\begin{aligned} F_\mathrm{g} + F_\mathrm{h} + F_\mathrm{a}=0, \end{aligned}$$
(14)

so that the anisotropic gravitating sphere is in equilibrium.

Within the star, the dominant energy conditions require that \(\rho - p_\mathrm{r}\ge 0\), \(\rho - p_\mathrm{t}\ge 0\) and \(\rho - p_\mathrm{r} -2 p_\mathrm{t}\ge 0\). The metric functions \(e^{2\lambda }\) and \(e^{2\nu }\) at the boundary \(r={\mathscr {R}}\) should match smoothly to the Schwarzschild exterior metric:

$$\begin{aligned} e^{2\nu ({\mathscr {R}})} = 1-\frac{2M}{\mathscr {R}},\quad e^{2\lambda ({\mathscr {R}})} = \left( 1-\frac{2M}{\mathscr {R}}\right) ^{-1}. \end{aligned}$$
(15)

The radial pressure should vanish at the surface

$$\begin{aligned} p_{\mathrm{r}}({\mathscr {R}})=0. \end{aligned}$$
(16)

The mass–radius ratio and the surface redshift are also important physical quantities. The maximum limit of the mass–radius ratio for an uncharged compact star is given by the inequality \(\frac{2M}{\mathscr {R}} {<}\frac{8}{9}\) proposed by Buchdahl [20]. For a realistic compact object, the upper bound on the surface redshift is given by

$$\begin{aligned} Z_\mathrm{s}({\mathscr {R}})=\frac{1}{\sqrt{1-\frac{2M}{ {\mathscr {R}}}}}-1 \le 2. \end{aligned}$$
(17)

4.2 Model parameter constraints

The regularity of the model is based on the constraints choice of the parameters in the physical quantities arising in Sect. 4.1. The parameters are chosen so that the model is well behaved at the centre and within the stellar structure. Therefore we use the value \(k=0\) in the energy density (11a) for regularity at the centre. Also at the centre \((r = 0)\) we have the values

$$\begin{aligned} \rho _{\mathrm{c}}= & {} \frac{3b}{4\pi }, \end{aligned}$$
(18a)
$$\begin{aligned} {p_\mathrm{r}}_\mathrm{c}= & {} \frac{(n - 1)b}{2\pi }, \end{aligned}$$
(18b)
$$\begin{aligned} {p_\mathrm{t}}_\mathrm{c}= & {} \frac{(n - 1)b}{2\pi }, \end{aligned}$$
(18c)
$$\begin{aligned} {v_\mathrm{r}}^2_\mathrm{c}= & {} \frac{1}{5} ( 4 n^2 - 3 ), \end{aligned}$$
(18d)
$$\begin{aligned} {v_\mathrm{t}}^2_\mathrm{c}= & {} \frac{1}{5} ( 4 n^2 - 5 ). \end{aligned}$$
(18e)

The central values (18) restrict the parameter n to the range of \(\frac{\sqrt{5}}{2}< n < \sqrt{2} \).

We name a new constant \(\sqrt{H}=\frac{B}{2 \sqrt{b} e^l}\) and use the three boundary conditions (15), (16) with five unknowns \(M, {\mathscr {R}}, n, b\) and H. We can express particular parameters in terms of others. The physically relevant model quantities are the mass M and the radius \({\mathscr {R}}\), and the model parameters n and b of a compact object.

First we can write \({\mathscr {R}}\), M in terms of n, b. We obtain

$$\begin{aligned} {\mathscr {R}}= & {} 0.408248 \left[ \frac{8 n}{b (n-1)} \right. \nonumber \\&\left. -\frac{\sqrt{16 (n-1) n+1}}{b (n-1)} -\frac{7}{b (n-1)} \right] ^{1/2}, \end{aligned}$$
(19)

which is the radius of star. In addition we find the quantity

$$\begin{aligned} M = b {\mathscr {R}}^3 \left( 1-\frac{b {\mathscr {R}}^2}{2}\right) , \end{aligned}$$
(20)

which is the total mass of the star. Equation (20) restricts the parameter b in the range \(0<b<\frac{2}{{\mathscr {R}}^2}\). The parameter H can be written in terms of n, b as

$$\begin{aligned} H = \frac{\left( b {\mathscr {R}}^2- 1\right) (2(b {\mathscr {R}}^3-0.5b^2 {\mathscr {R}}^5)-{\mathscr {R}})}{{\mathscr {R}} \left( n b {\mathscr {R}}^2-b {\mathscr {R}}^2+1\right) ^2}, \end{aligned}$$
(21)

where H is a constant scaling in our static stellar model. Then the recipe for physical analysis of our model can be outlined as follows: select the central density \(\rho _\mathrm{c}=\frac{3b}{4\pi }\) and central pressure \({p_\mathrm{r}}_\mathrm{c} =\frac{(n - 1)b}{2\pi }\) with n in the range \(\frac{\sqrt{5}}{2}< n < \sqrt{2} \) and \(0<b<\frac{2}{{\mathscr {R}}^2}\); calculate \({\mathscr {R}}\) using (19); use (20) to calculate the mass M; the parameter H can be found from (21). The rest of the matter variables then follow.

Secondly, we can write b and n in terms of \({\mathscr {R}}\) and M. We obtain

$$\begin{aligned} b = \frac{{\mathscr {R}}^3-\sqrt{{\mathscr {R}}^5({\mathscr {R}}-2 M )}}{{\mathscr {R}}^5}, \end{aligned}$$
(22)

which is the model parameter linked to the central density. The parameter n is given by

$$\begin{aligned} n= & {} \frac{18 M^2-13 M {\mathscr {R}}+2 \mathcal{R}^2}{M (18 M-8 {\mathscr {R}})} -\frac{2 \sqrt{{\mathscr {R}}^5 ({\mathscr {R}}-2 M)}}{M {\mathscr {R}} (18 M-8 {\mathscr {R}})} \nonumber \\&+\frac{3 \sqrt{{\mathscr {R}}^5 ({\mathscr {R}}-2 M)}}{{\mathscr {R}}^2 (18 M-8 {\mathscr {R}})}, \end{aligned}$$
(23)

which is the parameter related to the matter variables except the central density. The parameter H for this case is in the form

$$\begin{aligned} H= & {} - \frac{M^2 \left( 1.125 \sqrt{{\mathscr {R}}^5 ({\mathscr {R}}-2 M)} + 1.5 {\mathscr {R}}^3\right) }{{\mathscr {R}}^4 (M-0.5 {\mathscr {R}})}\nonumber \\&- \frac{0.25 {\mathscr {R}}^2 \sqrt{{\mathscr {R}}^5 ({\mathscr {R}}-2 M)} +0.25 {\mathscr {R}}^5}{{\mathscr {R}}^4 (M-0.5 {\mathscr {R}})}\nonumber \\&+\frac{M \left( {\mathscr {R}} \sqrt{{\mathscr {R}}^5 ({\mathscr {R}}-2 M)} +1.25 {\mathscr {R}}^4\right) }{{\mathscr {R}}^4 (M-0.5 {\mathscr {R}})}. \end{aligned}$$
(24)

In Eqs. (22)–(24) we note the mass \(M< \frac{{\mathscr {R}}}{2}\) and \(M \ne \frac{4 {\mathscr {R}}}{9}\). Now the recipe for the physical analysis of our model can be outlined as follows: select the radius \( \mathscr {R} \) and mass M of a given star such that \(M< \frac{{\mathscr {R}}}{2}\) and \(M \ne \frac{4 {\mathscr {R}}}{9}\); calculate b using (22); use (23) to calculate n checking that \(\frac{\sqrt{5}}{2}< n < \sqrt{2} \) and \(0<b<\frac{2}{{\mathscr {R}}^2}\) holds; the parameter H can be calculated from (24). The remaining matter variables then follow.

5 Physical analysis

For physical acceptability of our model, it is interesting to investigate whether it can be applied to observed stars for some range of parameters presented above. To study the features of the model, we select four pulsars PSR J1614-2230, Vela X-1, PSR J1903+327 and Cen X-3. We use Eqs. (22)–(24) with the mass \(M=2.91 M_{\bigodot }\) and the corresponding radius \({\mathscr {R}}=10.30~\text{ km }\) for PSRJ 1614-2230. These values arise in the work of Mafa Takisa et al. [21] with a linear equation of state and Mafa Takisa et al. [22] with a quadratic equation of state as input in this investigation. The values of the constants calculated are \(b=0.0032063~\text{ km }^{-2}\), \(n=1.20921\) and \(H=0.250386\). Plugging these values in relevant equations, we obtain the central density \(\rho _{\mathrm{c}}=1.031 \times 10^{15}~\text{ g } \text{ cm }^{-3}\), the surface density \(\rho _{{\mathscr {R}}}=9.70 \times 10^{14}~\text{ g } \text{ cm }^{-3}\) and central radial and tangential pressures \({p_\mathrm{r}}_\mathrm{c}={p_\mathrm{t}}_\mathrm{c}=1.205 \times 10^{35}~ \text{ dyne } \text{ cm }^{-2}\).

Firstly, we allow simultaneously the parameters b and n in (19)–(21) to vary so that we can generate the masses and radii of the remaining stars Vela X-1, PSR J1903+327 and Cen X-3. The resulting values are presented in Table 1. We note that the central density decreases with the decrease of the mass; this feature was also reported in the work of Mafa Takisa et al. [21, 22]. Secondly, the parameter n has a fixed value but the parameter b is allowed to vary. We obtain different masses, radii and central densities for Vela X-1, PSR J1903+327 and Cen X-3. These results are given in Table 2. We note that the central density increases with the decrease of the mass; this feature is similar to the investigations of Sharma and Ratanpal [23], Singh et al. [24] and Kileba Matondo et al. [25]. For both scenarios, the central density is approximately in the order of \(10^{15} \text{ g } \text{ cm }^{-3}\), which is relevant for an anisotropic compact relativistic star as pointed out by Ruderman [26]. The surface density is in the order of \(10^{14}~ \text{ g } \text{ cm }^{-3}\) and the redshift is in the range 0.364–0.515. This range is close to the values found by Böhmer and Harko [27], Rahaman et al. [28, 29] and Kileba Matondo et al. [25]. Also, we could mention that the required upper bound of Buchdahl [20] which is equivalent to \(Z_\mathrm{s} \le 2\) for a realistic star has been fulfilled. The value of the stellar radius \({\mathscr {R}}\) is in the range of 7.80–10.30 km, and the mass in the range of 1.49–1.97 \(M_{\bigodot }\). Similar mass values were obtained by Gangopadhyay et al. [30] and Mafa Takisa et al. [21, 22]. The compactification factor \( \frac{M}{\mathscr {R}} \) is in the range of neutron stars and ultracompact stars.

Fig. 1
figure 1

Figures for PSRJ1614-2230

Fig. 2
figure 2

Figures for PSRJ1614-2230

Fig. 3
figure 3

Figures for PSRJ1614-2230

To illustrate the behaviour of the matter variables inside the stellar structure, we have plotted several profiles in Figs. 1, 2, and 3. All the matter variables are well behaved throughout the stellar structure. The matter density in Fig. 1a is decreasing and remains finite. In Fig. 1b we display the radial and tangential pressures and the anisotropy. We note that both tangential and radial pressures are monotonic decreasing outwards although the radial pressure vanishes at the boundary; the tangential pressure is still positive inside the star. The anisotropy is finite at the centre and remains positive within the star, and consequently the anisotropic force is repulsive in nature as stated by Gokhroo and Mehra [31]. The mass versus radius displayed in Fig. 1c is well behaved and increasing function throughout the compact object. In Fig. 1d, the gradients of density, radial pressure and tangential pressure are plotted. All the gradients profiles remain negative and regular as required for a realistic star. The square of radial and tangential speed of sound \(v^2_\mathrm{r}\), \(v^2_\mathrm{t}\) are shown in Fig. 2a and they satisfy the causality condition. The radial speed of sound is greater than the tangential speed of sound within the stellar structure. In Fig. 2b, the quantities \(v_\mathrm{t}^2 -v_\mathrm{r}^2\) and \(v_\mathrm{r}^2 -v_\mathrm{t}^2\) are plotted, showing that \(-1<v_\mathrm{t}^2 -v_\mathrm{r}^2<0\) and \( 0<v_\mathrm{r}^2 -v_\mathrm{t}^2<1\), which values comply with the cracking stability requirement; it is also observed that these two quantities do not change sign inside the fluid sphere; see Herrera [32]. The mass versus central density is provided in Fig. 2c. For the lower bound radius value \({\mathscr {R}}=7.80~\text{ km }\), the mass increases with central density and reaches the turning point at the central density value of \(\rho _\mathrm{c}=5.29 \times 10^{15} \text{ g } \text{ cm }^{-3}\) with corresponding value of mass \(M=2.642 M_{\bigodot }\). For the upper bound radius value \({\mathscr {R}}=10.30~\text{ km }\), the mass increases with central density and reaches the turning point at the central density value of \(\rho _\mathrm{c}=3.03 \times 10^{15} \text{ g } \text{ cm }^{-3}\) with corresponding value of mass \(M=3.489~M_{\bigodot }\). The stellar masses located on the left of these turning points are in the stable region and the unstable region corresponds to the right side of the turning point. Note that, for values greater than \({\mathscr {R}}=10.30~\text{ km }\), the maximum mass for a stable star is at the lower central density compared to the case for \({\mathscr {R}}=7.80 ~\text{ km }\).

The adiabatic indices \(\varGamma _\mathrm{r}\) and \(\varGamma _\mathrm{t}\) profiles are shown in Fig. 2d; indicating that \(\varGamma _\mathrm{r} >\frac{4}{3}\) and \(\varGamma _\mathrm{t}>\frac{4}{3}\) throughout the stellar structure. The profiles of gravitational, hydrostatic and anisotropic forces are plotted in Fig. 3a showing that anisotropic and hydrostatic forces are positive and balanced by the negative gravitational force. Interestingly the sum of all the forces is zero as required for the equilibrium of a static system. The energy conditions \(\rho - p_\mathrm{r}\), \(\rho - p_\mathrm{t}\) and \(\rho - p_\mathrm{r} -2 p_\mathrm{t}\) are plotted in Fig. 3b which remain positive thereby implying that the energy conditions are not violated in our model. The matching conditions are presented in Fig. 3c, the metric potentials \(e^{2\nu }\) and \(e^{2\lambda }\) are regular within the stellar object, with smooth matching to the Schwarzschild exterior at the radius \({\mathscr {R}}=10.30\) km. Moreover, at the centre the fluid sphere satisfies \(e^{2\nu (r=0)}\)= constant and \(e^{2\nu (r=0)}= 1\). The gravitational redshift is plotted in Fig. 3d, with a monotonically decreasing profile.

6 Conclusion

In this paper we have used a conformal symmetry to model compact stars with anisotropic pressure. The presence of a conformal symmetry leads to an integral relationship between the potentials; only one choice for the potentials has to be made. The exact solution exists for all values of the parameter k. When \( k=0 \) the model is conformally flat which ensures regularity at the centre. Furthermore, various parameter constraints are imposed so that the model is well behaved at the centre and within the star. We obtained different masses and radii of four stars, namely PSR J1614-2230, Vela X-1, PSR J1903+0327 and Cen X-3. We achieved this for two different scenarios. Firstly, we varied both parameters b and n simultaneously. We observe that the central density decreases with the decrease of the mass. Secondly, the parameter n was fixed and b was allowed to vary. In this situation the central density increases with a decrease in mass. The behaviour of decreasing central density is present in the investigations of Mafa Takisa et al. [21, 22] and Murad [33]. The behaviour of increasing central density is present in the work of Sharma and Ratanpal [23], Singh et al. [24] and Bhar [34]. It is interesting to observe that our model allows for both scenarios. These two different scenarios arise in the work of other researchers and we have made reference to their work. We then plotted the matter variables for the compact object PSR J1614-2230. Our analysis reveals that the matter variables and the metric potentials are well behaved within the star. In particular the model is stable and causality is maintained in the interior of the star. The values for the mass–radius ratio and surface redshift are consistent with observed values. In conclusion, the assumption of a conformal symmetry generates a realistic star in general relativity.