1 Introduction

It is well know that compact stars are astrophysical objects in whose interior matter can be found in extreme conditions, i.e., high densities, intense gravitational fields, strong magnetic fields and fast rotation. The high density matter in neutron stars can be studied using an equation of state (EoS), which is used as the main ingredient for the numerical integration of the stellar structure equations, the so called Tolman–Oppenheimer–Volkoff (TOV) equations. By using this system of equations, important quantities can be theoretically obtained, e.g., the mass and radius of a compact star, compacticity, gravitational redshift, among other. Recently there have been efforts in order to obtain better observational constraints on the mass an radius of compact stars and as consequence we have seen an improvement on the knowledge of the high density matter inside compact stars.

Another important source of information about compact stars comes from their gravitational wave emission. This information can be observed from two main channels: binary systems, in which a neutron star is one of the binary components and from neutron star oscillations. In the second case the neutron star is considered as an isolated system and can be set in an oscillatory state as a consequence of some internal or external perturbation. Those oscillation modes constitute the fingerprint of the compact star, each mode with a natural frequency corresponding to some characteristic or dynamics of the fluid. Among all possible oscillatory frequencies we have the fundamental mode which has been focus of intense investigation because it can be detected by future third generation gravitational wave detectors or because its effects can be observed when there exist resonance in a binary system.

All previously mentioned characteristics about compact stars are frequently studied for the case of a perfect isotropic fluid, but, at the same time, it is also very well know that the knowledge of the EoS in the inner core of neutron stars is very elusive. That difficulty has its origins in the uncertainty of the nuclear EoS at extreme high densities, and for this reason some authors have proposed that inside neutron stars could exist deconfined quark matter and others authors have even proposed the existence of anisotropic effects. The existence of anisotropy can be justified by many reasons, among them we have the possibility of a solid core or the presence of strong magnetic fields, and by this reason [1] the possibility of anisotropy inside neutron stars has been object of recent study, e.g., [2,3,4]. Recently, the conditions for the (in)stability of the isotropic pressure condition in collapsing spherically symmetric, dissipative fluid distributions have been investigated in [5]. In this seminal work, the author concluded that dissipative fluxes, and/or energy density inhomogeneities and/or the appearance of shear in the fluid flow, force any initially isotropic configuration to abandon such a condition, generating anisotropy in the pressure, i.e an initial fluid configuration with isotropic pressure would tend to develop an anisotropic pressure as it evolves, under conditions expected in stellar evolution. Therefore, we are forced to consider pressure anisotropy whenever relativistic fluids are involved.

It is very well know that the use of polytropic EoS reduce numerical computations and describe consistently many global properties of compact objects [6], therefore polytropic EoS can serve as an extension to produce realistic EoS [7]. For example, we can use a polytropic index of \(N = 0.5\,, 0.6\) in order to obtain a maximum neutron star mass above two solar masses and radius in the range of the NICER observations [8]. Additionally, several polytropic equations can be used to model different densities inside neutron stars, this is called the piecewise polytropic approximation. In Ref. [4], the authors used a polytropic EoS to study the non-radial oscillations (in Cowling approximation) of neutron stars in the presence of anisotropic pressure. Our objective here is to complement that work. To achieve this goal, we use EoS in the framework of a relativistic mean field theory [9] for hadronic stars and in the framework of the Mit bag model [10, 11] for quark stars.

The paper has the following structure: in Sect. 2 we recall the equilibrium configuration of anisotropic compact stars. In Sect. 3 we make a short explanation of the equations governing the oscillations of anisotropic stars. In section 4 we describe realistic equations of state that are used in order to model compact stars. In section 5 we discuss our results and perform a comparison of our results with observational data. Finally in Sect. 6 we give our final conclusions. Through our discussion we use relativistic units \(c=1\) and \(G=1\), where c is the speed of light and G is the gravitational constant, respectively.

2 Generalized Tolman–Oppenheimer–Volkoff (TOV) equations for an anisotropic fluid distribution

The Tolman–Oppenheimer–Volkoff (TOV) equations for an static and spherical star are derived from the standard general relativity Einstein field equations [12, 13]

$$\begin{aligned} G_{\mu \nu }=R_{\mu \nu }-\frac{1}{2}Rg_{\mu \nu }=8\pi T_{\mu \nu }, \end{aligned}$$
(1)

where \(R_{\mu \nu }\) is the Ricci tensor, \(R=g^{\mu \nu }R_{\mu \nu }\) is the scalar curvature, \(T_{\mu \nu }\) is the energy-momentum tensor and \(g_{\mu \nu }\) is the metric given by the coefficients of the line element below

$$\begin{aligned} ds^2=-e^{2\varPhi (r)}dt^2+e^{2\varLambda (r)}dr^2+r^2(d\theta ^2+\sin ^2\theta d\phi ^2). \end{aligned}$$
(2)

The anisotropic fluid distribution in spherical symmetry can be represented by the following energy-momentum tensor

$$\begin{aligned} T_{\mu \nu }=\rho u_{\mu }u_{\nu }+p k_{\mu }k_{\nu }+q\left( g_{\mu \nu }+u_{\mu }u_{\nu }-k_{\mu }k_{\nu } \right) ,\ \end{aligned}$$
(3)

where \(u_{\mu }\) is the fluid 4-velocity (\(u^{\mu }u_{\mu }=-1\)), \(\rho \) is the fluid energy density, \(k^{\mu }\) is the unit radial vector (\(k^{\mu }k_{\mu }=1\)) and \(u^{\mu }k_{\mu }=0\). The quantities p and q are the radial and tangential pressures, respectively.

By solving the Einstein field equations for the anisotropic fluid distribution we can obtain the differential equations that govern the equilibrium configuration of the star

$$\begin{aligned} \frac{dm}{dr}= & {} 4\pi r^2\rho , \end{aligned}$$
(4)
$$\begin{aligned} \frac{dp}{dr}= & {} -(\rho +p)\frac{d\varPhi }{dr}-\frac{2\sigma }{r}, \end{aligned}$$
(5)
$$\begin{aligned} \frac{d\varPhi }{dr}= & {} \frac{m+4\pi r^3p}{r(r-2m)}, \end{aligned}$$
(6)

where m(r), p(r), \(\rho (r)\), \(\varPhi (r)\), \(\sigma (r)\) are quantities that depend on the radial coordinate r and \(\sigma =p-q\) is the anisotropic profile. For our purposes this profile will be defined as [4]

$$\begin{aligned} \sigma = \lambda p \mu =\lambda p\left( 1-\mathrm {e}^{-2\varLambda }\right) , \end{aligned}$$
(7)

where \(\lambda \) is a dimensionless parameter which controls the anisotropy and \(\mu \) is a quasilocal variable.

As we can see, there are 3 equations and 4 unknown functions. For this reason, in order to solve this system of equations, we need an equation of state \(p(\rho )\) and additionally suitable boundary conditions.

The integration of the differential equations above is made with the appropriate boundary conditions at \(r=0\):

$$\begin{aligned} \begin{aligned}&m(0)=0,\quad p(0)=p_c,\quad \varPhi (0)=\varPhi _c, \end{aligned} \end{aligned}$$
(8)

where \(p_c\) is the central pressure and \(\varPhi _c\) is the metric field value at the star center. The integration begins with the initial conditions mentioned above and proceeds with tiny steps in the radius r. Then when the integrated pressure is zero, the numerical integration stops and the radius R and mass M of the star are obtained.

It is also important to comment that the third boundary condition is a guess for the metric field at the center, therefore the metric has to be renormalized using the value of the vacuum Schwarzschild metric at \(r=R\). That procedure is necessary, because we need the correct metric values in order to obtain the coefficients of the oscillations equations, which are going to be discussed in the next section.

3 Cowling approximation for non-radial perturbations

This approximation was introduced by Cowling [14] for Newtonian stars and by McDermott for the case of neutron stars. This approximation consists in ignoring the coupling between the fluid motions and the metric perturbations. It means that we can completely neglect the metric perturbations (spacetime metric is kept fixed). In the next lines we will briefly explain how the equations that describe the perturbations equations in the Cowling formalism are obtained. For further details see [4],

To obtain the oscillation equations, we have to consider the perturbation of the conservation equation for the energy momentum tensor

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

We can project Eq. (9) along the \(u^{\mu }\) and obtain

$$\begin{aligned} u^{\nu }\nabla _{\nu }\delta \rho + \nabla _{\nu }\left\{ \left[ (\rho + q)\delta ^{\nu }_{\mu }+ \sigma k^{\nu }k_{\mu }\right] \delta u^{\mu }\right\} \nonumber \\ +\left( \rho + q\right) a_{\nu }\delta u^{\nu } + \nabla _{\nu }u_{\mu }\delta \,\left( \sigma k^{\nu }k^{\mu }\right) =0. \end{aligned}$$
(10)

Projecting orthogonally to the background 4-velocity by using the operator \(\mathcal{P}_{\mu }^{\nu }=\delta ^{\nu }_{\mu } + u^{\nu }u_{\mu }\), we obtain

$$\begin{aligned}&\left( \delta \rho + \delta q\right) a_{\mu } + \left( \rho + q\right) u^{\nu } \left( \nabla _{\nu }\delta u_{\mu } - \nabla _{\mu }\delta u_{\nu } \right) \nonumber \\&\quad +\nabla _{\mu }\delta q + u_{\mu } u^{\nu }\nabla _{\nu }\delta q + \mathcal{P}_{\mu }^{\nu }\nabla _{\alpha }\delta \left( \sigma k^{\alpha }k_{\nu } \right) =0, \end{aligned}$$
(11)

where \(a_{\mu }=u^{\nu }\nabla _{\nu }u_{\mu }\) is the background 4-acceleration.

As the star is oscillating, the elements of fluid move from their equilibrium position, that motion is represented by the displacements \(\xi ^{i}\), where \( i=1,2,3=r,\theta , \phi \). Additionally an integrability condition can be obtained from Eq. (11) from which the correct expressions for \(\xi _{\theta }\) and \(\xi _{\phi }\) can be calculated.

Using the Eq. (10) and \(\xi ^{i}\), we can explicitly write down the expressions for the density and pressure perturbations

$$\begin{aligned} \delta \rho= & {} -\left( \rho +p \right) \left[ \mathrm {e}^{-\varLambda }\frac{W^{\prime }}{r^2}+\frac{l(l+1)}{r^2}V \right] Y_{lm}-\frac{d\rho }{dr}\mathrm {e}^{-\varLambda }\frac{W}{r^2}Y_{lm}\nonumber \\&+\frac{2\sigma }{r^3}\mathrm {e}^{-\varLambda }WY_{lm}+\sigma \frac{l(l+1)}{r^2}VY_{lm}\,, \end{aligned}$$
(12)
$$\begin{aligned} \delta p= & {} -\frac{dp}{d\rho }\left\{ (\rho +p)\left[ \mathrm {e}^{-\varLambda }\frac{W^{\prime }}{r^2}+\frac{l(l+1)}{r^2}V \right] -\frac{2\sigma }{r^3}\mathrm {e}^{-\varLambda }W\right. \nonumber \\&-\left. \sigma \frac{l(l+1)}{r^2}V\right\} Y_{lm}-\frac{dp}{dr}\mathrm {e}^{-\varLambda }\frac{W}{r^2}Y_{lm}, \end{aligned}$$
(13)

where \(Y_{lm}\) are the spherical harmonics, W and V are perturbation functions and the symbol prime denotes the derivative with respect to the radial coordinate r.

For the perturbation of the anisotropic pressure \(\sigma =\sigma (p,\mu )\), we have

$$\begin{aligned} \delta \sigma =\frac{\partial \sigma }{\partial p}\delta p, \end{aligned}$$
(14)

where was considered \(\delta \mu =0\).

After considering a harmonic dependence on time for the perturbation functions \(W(r,t)=W(r)\mathrm {e}^{i\omega t}\) and \(V(r,t)=V(r)\mathrm {e}^{i\omega t}\), where \(\omega \) is the oscillation frequency, the oscillation equations in the Cowling approximation can be obtained

$$\begin{aligned} W^{\prime }&=\frac{d\rho }{dp}\left[ \omega ^2\frac{\rho +p-\sigma }{\rho +p}\left( 1-\frac{\partial \sigma }{\partial p} \right) ^{-1}\mathrm {e}^{\varLambda -2\varPhi }r^{2}V+\varPhi ^{\prime }W \right] \nonumber \\&\quad -l(l+1)\mathrm {e}^{\varLambda }V+\frac{\sigma }{\rho +p}\left[ \frac{2}{r}\left( 1+\frac{d\rho }{dp} \right) W \right. \nonumber \\&\quad +\left. l(l+1)\mathrm {e}^{\varLambda }V\right] ,\end{aligned}$$
(15)
$$\begin{aligned} V^{\prime }&=2V\varPhi ^{\prime }-\left( 1-\frac{\partial \sigma }{\partial p}\right) \frac{\rho +p}{\rho +p-\sigma }\frac{\mathrm {e}^{\varLambda }}{r^2}W\nonumber \\&\quad +\left[ \frac{\sigma ^{\prime }}{\rho +p-\sigma }+\left( \frac{d\rho }{dp}+1\right) \frac{\sigma }{\rho +p-\sigma } \left( \varPhi ^{\prime }+\frac{2}{r} \right) \right. \nonumber \\&\quad \left. -\frac{2}{r}\frac{\partial \sigma }{\partial p}-\left( 1-\frac{\partial \sigma }{\partial p}\right) ^{-1} \left( \frac{\partial ^{2}\sigma }{\partial p^2}p^{\prime }+\frac{\partial ^{2}\sigma }{\partial p\partial \mu }\mu ^{\prime } \right) \right] V.\nonumber \\ \end{aligned}$$
(16)

In order to solve the equations above we have to consider boundary conditions at the center and surface of the star. The boundary condition at the star surface furnishes

$$\begin{aligned} \omega ^{2}\frac{\rho +p-\sigma }{\rho +p}\left( 1-\frac{\partial \sigma }{\partial p} \right) ^{-1}\mathrm {e}^{-2\varPhi }V\nonumber \\ +\left( \varPhi ^{\prime }+\frac{2}{r}\frac{\sigma }{\rho +p} \right) \mathrm {e}^{-\varLambda }\frac{W}{r^2}=0\,, \end{aligned}$$
(17)

and the boundary condition at the star center (\(r=0\)) satisfies

$$\begin{aligned} {\tilde{W}}=-l{\tilde{V}}, \end{aligned}$$
(18)

where it was introduced the new functions defined by \(W={\tilde{W}}r^{l+1}\) and \(V={\tilde{V}}r^{l}\). Hereafter, for all our results, we will consider \(l=2\), i.e., we restrict to the quadrupolar modes.

4 Equation of state

As mentioned in the Introduction, depending on their possible interior composition, neutron stars can be classified as hadronic stars with or without hyperons, hybrid stars containing hadronic and quark phases and quark stars (strange star). In this work, we will consider hadronic stars without hyperons and quark stars.

4.1 Hadronic stars

For the description of the EoS of hadronic matter, we employ the relativistic nonlinear Walecka model (NLW) [9]. The total Lagrangian density reads

$$\begin{aligned} {\mathcal {L}}_{H}=\sum _{b}{\mathcal {L}}_{b}+{\mathcal {L}}_{m}+\sum _{L}{\mathcal {L}}_{L}\,, \end{aligned}$$
(19)

where \({\mathcal {L}}_{b}\), \({\mathcal {L}}_{m}\) and \({\mathcal {L}}_{L}\) are the baryons, mesons and leptons Lagrangians, respectively, and are given by

$$\begin{aligned} {\mathcal {L}}_{b}= & {} {\bar{\psi }}_{b}\left( i\gamma _{\mu }\partial ^{\mu }-m_{b}+g_{\sigma b}\sigma \right. \nonumber \\&\left. -g_{\omega b}\gamma _{\mu }\omega ^{\mu }-\frac{1}{2}g_{\rho b}\gamma _{\mu }\mathbf {\tau }\cdot \mathbf {\rho }^{\mu }\right) \psi _{b}\,, \end{aligned}$$
(20)
$$\begin{aligned} {\mathcal {L}}_{m}= & {} \frac{1}{2}\left( \partial _{\mu }\sigma \partial ^{\mu }\sigma -m_{\sigma }^{2}\sigma ^{2}\right) -U(\sigma )+ \frac{1}{2}m_{\omega }^{2}\omega _{\mu }\omega ^{\mu } \nonumber \\&-\frac{1}{4}\omega _{\mu \nu }\omega ^{\mu \nu }+ \frac{1}{2}m_{\rho }^{2}\mathbf {\rho }_{\mu }\cdot \mathbf {\rho }^{\mu }-\frac{1}{4}\mathbf {\rho }^{\mu \nu }\cdot \mathbf {\rho }_{\mu \nu }, \end{aligned}$$
(21)
$$\begin{aligned} {\mathcal {L}}_{L}= & {} {\bar{\psi }}_{L}\left( i\gamma _{\mu }\partial ^{\mu }-m_{L}\right) \psi _{L}, \end{aligned}$$
(22)

where the b sum runs over the nucleons \(b\equiv p,n\), and \(\psi _{b}\) is the corresponding baryon Dirac field, whose interactions are mediated by the \(\sigma \) scalar, \(\omega _{\mu }\) isoscalar-vector, and \(\rho _{\mu }\) isovector-vector meson fields. The baryon mass and isospin are denoted by \(m_{b}\) and \(\mathbf {\tau }\), respectively. The term

$$\begin{aligned} U(\sigma )=\frac{1}{3}\,bm_{n}(g_{\sigma }\sigma )^{3}-\frac{1}{4}\,c(g_{\sigma }\sigma )^{4}, \end{aligned}$$
(23)

denotes the scalar self-interactions. The mesonic tensors are given by their usual expressions \(\omega _{\mu \nu }=\partial _{\mu }\omega _{\nu }-\partial _{\nu }\omega _{\mu }\) and \(\mathbf {\rho }_{\mu \nu }=\partial _{\mu }\mathbf {\rho }_{\nu }-\partial _{\nu }\mathbf {\rho }_{\mu }-g_{\rho b}\left( \mathbf {\rho }_{\mu }\times \mathbf {\rho }_{\nu } \right) \). The L sum runs over the two lightest leptons \(L\equiv e,\mu \) and \(\psi _{L}\) is the lepton Dirac field. For more details about the EoS obtained from the Lagrangian (19) see Ref. [15] and references therein.

The coupling constants adopted in this work are given by the GM1 [16] and NL3 [17] parametrizations (see Table 1).

Table 1 Coupling constants for the GM1 and NL3 parametrizations

4.2 Quark stars

For the description of the EoS of quark matter, we consider the phenomelogical MIT bag model, which characterizes a degenerated Fermi gas of quarks up, down and strange [10, 11]. The EoS is given by a linear relationship which relates the pressure and the energy density, that is

$$\begin{aligned} p=\frac{1}{3}\left( \rho -4B \right) , \end{aligned}$$
(24)

where B is the bag constant. For stable strange quark matter the bag constant values ranges from 57  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) to 92  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) [18]. It is worth to mention that a more recently work reports a slightly different range 58.926  \(\mathrm {MeV}\mathrm {fm}^{-3}\) to 91.5  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) [19].

5 Results

We used the non-radial oscillations equations from Doneva’s work [4]. At first, before using realistic equations of state, we reproduced Doneva’s results and those calculations can be considered as a strong test for our code. In this section we show different profiles: mass-radius, frequency-mass, mass-redshift, mass-density, normalized frequency-mass, and frequency-mean density of compact stars. Those results for hadronic stars were obtained using two parametrizations: GM1 and NL3 (see Table 1) and for quark stars were obtained using two different values for the bag constant: \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) and \(B=90\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\). For reasons of comparison we also show the case of isotropic stars, which correspond to the black full lines (\(\lambda =0\)).

5.1 Hadronic stars

As a first result, in Fig. 1 we observe, as expected, that the maximum mass of the models are different for each value of the \(\lambda \) parameter. We remark that smaller negative \(\lambda \) values favor the pressure of the fluid to support stars with larger masses and in contrast, a large positive \(\lambda \) value produces stellar configurations with smaller masses. When the GM1 model is employed, we observe that for hadronic masses below \(0.3~M_{\odot }\) and radii greater than 13.2 km, the anisotropy does not have important effects. A similar situation can be seen for the NL3 model, this behavior can be observed for stars with masses smaller than \(0.3~M_{\odot }\) and radii greater than 14.5 km. In conclusion, hadronic stars with smaller masses are not affected by anisotropy when they are described by the GM1 or the NL3 model. Therefore, if we want to detect anisotropic effects, we have to focus our attention on region of massive stars.

Fig. 1
figure 1

Mass-radius curves for anisotropic hadronic stars using the GM1 (left panel) and NL3 (right panel) parametrizations for different values of the parameter \(\lambda \). Black lines (\(\lambda = 0\)) correspond to isotropic hadronic stars

Fig. 2
figure 2

The frequency f of the fundamental mode as a function of the mass M using GM1 (left panel) and NL3 (right panel) parametrizations. The results are shown for different values of the parameter \(\lambda \)

In the sequence, we show the results for the frequency of the fundamental mode as a function of the mass M, these results are presented on the Fig. 2. According to the GM1 parameterization (Fig. 2a), we observe that for masses below \(1.5~M_{\odot }\), the fundamental mode frequencies of anisotropic hadronic stars do not have big difference when compared with the frequencies of isotropic hadronic stars (\(\lambda =0\)). For masses above \(1.5~M_{\odot }\), it is clear that as the \(\vert \lambda \vert \) increases, the frequencies change significantly. The same behavior can be observed for hadronic stars build with the NL3 parametrization, as can be seen in the Fig. 2b. We can conclude the GM1 model gives greater frequencies when compared with the NL3 model.

As it is well know in general relativity, an important quantity is the surface gravitational redshift. In fact the gravitational redshift Z, which is predicted by Einstein’s general relativity, expresses that light emitted from the surface of a compact object is expected to be displaced towards longer wavelengths of the electromagnetic spectrum. The results for the gravitational redshift as a function of the mass are showed in Fig. 3, for different values of \(\lambda \). From the two figures, we observe that the gravitational redshift increases linearly for masses smaller than \(\approx 1.5~M_{\odot }\), this means that for low mass configurations, the values of the gravitational redshift becomes independent of the parameter \(\lambda \). For stars with masses greater than \(1.5~M_{\odot }\), the anisotropy produces significant changes for any \(\lambda \). It is also clear that lower negative values of \(\lambda \) give greater gravitational redshifts.

Fig. 3
figure 3

The total mass of the anisotropic hadronic stars as a function of the gravitational redshift \(Z(R)=\mathrm {e}^{-\varPhi (R)/2}-1\) for several values of the parameter \(\lambda \). We use GM1 (left panel) and NL3 (right panel) parametrizations

In Fig. 4, the mass M of anisotropic hadronic stars is shown as a function of the central density \(\rho _c\). We observe that for both the GM1 and NL3 models, the properties of hadronic stars vary significantly as we change the parameter \(\lambda \). In fact, for central densities less than 200  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\), the masses of the anisotropic stars do not have a visible change, in contrast for values greater than 200  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\), the stellar masses change considerably.

Fig. 4
figure 4

The total mass of anisotropic hadronic stars versus the central density \(\rho _{c}\) using GM1 (left panel) and NL3 (right panel) parametrizations for different values of the parameter \(\lambda \)

In Fig. 5 we show the normalized frequency \(\omega \sqrt{R^{3}/M}\) as a function of the stellar mass, obtained for the GM1 (Fig. 5a) and NL3 (Fig. 5b) parameterizations. In both figures, we note that the normalized frequency can be higher (lower) when the parameter \(\lambda \) is negative (positive). Consequently, for large values of \(\vert \lambda \vert \) and large masses, the oscillation frequencies differ significantly from the case of the isotropic hadronic stars (\(\lambda =0\)). That result is observed for the GM1 and NL3 models.

Fig. 5
figure 5

The normalized frequency \(\omega \) as a function of the mass M of anisotropic hadronic stars. The results are shown for several values of the parameter \(\lambda \) using GM1 (left panel) and NL3 (right panel) parametrizations

Finally in Fig. 6 we show the frequency of the fundamental mode as a function of the square root of the average density. The figure shows that the frequency does not change significantly for values lower than 0.02 \(\mathrm {km}^{-1}\) in the average density, i.e., in that region it is not possible to discriminate between isotropic and anisotropic hadronic stars by the use of the fundamental mode frequencies. Concerning the GM1 model (Fig. 6a), we realize that for average densities above 0.02 \(\mathrm {km}^{-1}\) and for large positive values of \(\lambda \), the deviation of the anisotropic curves from the isotropic curves becomes more significant. Likewise, for the NL3 model (Fig. 6b), as the square root of the stellar average density grows for large positive values of \(\lambda \), the deviation of the fundamental mode frequencies begins to be noticed. It is interesting to see that for negative values of \(\lambda \), the fundamental mode frequency of anisotropic hadronic stars does not exhibit an important deviation with respect to the frequency of the isotropic stars, provided \(0.01<\sqrt{M/R^3}<0.035\).

Fig. 6
figure 6

The fundamental mode frequency f as a function of square root of the average density \(\sqrt{M/R^3}\) for several values of the parameter \(\lambda \). The results are shown for GM1 (left panel) and NL3 (right panel) parametrizations

5.2 Quark stars

In Fig. 7 we illustrate the mass-radius relation for anisotropic stars using the MIT bag model. In order to elaborate our results we employed two different values for the bag constant: \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (Fig. 7a) and \(B=90\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (Fig. 7b). From that figure, we can appreciate how the equilibrium profile for strange stars is affected due to the anisotropy. For example, for the case \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\), the anisotropy has a much greater effect on masses above \(1.0 M_{\odot }\). We observe that when the parameter \(\lambda \) changes, the values for the maximum mass change significantly. Similar results can be observed for the case of \(B=90\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\).

Fig. 7
figure 7

Mass-radius curves for anisotropic quark stars with Mit bag constant \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (left panel) and 90  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (right panel) for different values of the parameter \(\lambda \)

In Fig. 8 we show the profile of the frequency of the fundamental mode as a function of the stellar mass M. We observe that, when the absolute value of the \(\lambda \) parameter changes, there is a considerable effect in anisotropic stars when compared with the curves corresponding to isotropic (i.e. \(\lambda =0\)) stars. Thus, the frequencies can be significantly higher or lower than in the case of isotropic strange stars, if \(\lambda \) is slightly negative or positive. For example, for a bag constant value of \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) we see that the fundamental mode frequencies range from 2.3 to 3.0 kHz. For the case of positive values of the \(\lambda \) parameter, anisotropic strange stars have low frequencies that decrease with the mass until some minimum value is reached. For the case of negative values of the \(\lambda \) parameter, the frequencies behave nearly constant with the mass. Even though the anisotropic frequencies suffer big changes due to \(\lambda \), the frequencies are lower than 4 kHz [20].

Fig. 8
figure 8

The fundamental mode frequency f as a function of the mass M with Mit bag constant \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (left panel) and 90  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (right panel). Results are plotted for different values of the parameter \(\lambda \)

Now we discuss the behavior of the gravitational redshift. The results for the gravitational redshift as a function of the mass are showed in Fig. 9, for different values of \(\lambda \). From the left panel, for \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) , in Fig. 9a, we observe that the gravitational redshift increases linearly for masses smaller than \(\approx 1.4~M_{\odot }\), this means that for low mass configurations, the values of the the gravitational redshift becomes independent of the parameter \(\lambda \). For stars with masses greater than \(1.4~M_{\odot }\), the anisotropy produces significant changes for any \(\lambda \). From the right panel, \(B=90\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\), in Fig. 9b, we observe that the gravitational redshift increases linearly for masses smaller than \(\approx 1.1~M_{\odot }\), this means that for low mass configurations, the values of the the gravitational redshift becomes independent of the parameter \(\lambda \). For stars with masses greater than \(1.1~M_{\odot }\), the anisotropy produces significant changes for any \(\lambda \). It is also clear that lower negative values of \(\lambda \) give greater gravitational redshifts.

Fig. 9
figure 9

The total mass of anisotropic quark stars as a function of the redshift function \(Z(R)=\mathrm {e}^{-\varPhi (R)/2}-1\) for several values of the parameter \(\lambda \). We use the Mit bag constant \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (left panel) and 90  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (right panel)

In Fig. 10, the mass M of anisotropic quark stars is shown as a function of the central density \(\rho _c\) for different values of the parameter \(\lambda \). For example, for the constant bag \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\), the anisotropic quark mass does not change considerably when \(\lambda \) is changed for central densities below 300 \(\mathrm {MeV\,fm}^{-3}\). The stellar mass changes significantly for central densities above \(\approx 300\) \(\mathrm {MeVfm}^{-3}\) for any \(\lambda \). Similar results can be observed for \(B=90\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\).

Fig. 10
figure 10

The total mass of anisotropic quark stars versus the central density \(\rho _{c}\) with Mit bag constant \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (left panel) and 90  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (right panel) for different values of the parameter \(\lambda \)

In Fig. 11 we show the results for the normalized frequency of the fundamental mode \(\omega \sqrt{R^3/M}\) as a function of the stellar mass . The analysis in this case is similar to the case considered in the Fig. 5 (hadronic case), i.e., the frequencies change considerably when we increase the absolute value of \(\lambda \). Also, we can say that for a fixed value of \(\lambda \) and considering larger masses, any anisotropic curve is very different from the isotropic case. Consequently, the oscillation frequencies for massive stars can deviate considerably from the case of the isotropic strange stars whenever \(\vert \lambda \vert \) takes large values. On the other hand, by comparing the frequency and the normalized frequency, we can notice that the maximum frequency value is \(\approx 3.6\) kHz, while the maximum normalized frequency \(\omega \approx 1.4\) kHz. Moreover, both the fundamental mode frequency and the normalized frequency decrease as the total mass increases for any value of \(\lambda \). Later, they reach a minimum point and the star becomes unstable. While the decrease of anisotropic frequencies are a bit inclined, the anisotropic normalized frequencies are abruptly inclined for any \(\lambda \). Another interesting observation is that, here, the curves don’t overlap as it is shown for hadronic stars in the Fig. 5.

Fig. 11
figure 11

The normalized frequency \(\omega \) as a function of the mass M of anisotropic quark stars. The results are shown for several values of the parameter \(\lambda \) with Mit bag constant \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (left panel) and 90  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (right panel)

Fig. 12
figure 12

The fundamental mode frequency f as a function of square root of the average density \(\sqrt{M/R^3}\) for several values of the parameter \(\lambda \). The results are shown for Mit bag constant \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (left panel) and 90  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (right panel)

Table 2 Neutron stars main properties for each one of the EoS used in the article

The oscillation frequency of the fundamental mode as a function of the square root of the average density is shown in Fig. 12, for some values of the parameter \(\lambda \). On the left panel (Fig. 12a), the plot shows small (big) changes of the frequencies from the isotropic (i.e., \(\lambda =0\)) strange stars only when \(\lambda \) takes negative (positive) values and for small average density. However, the effect of anisotropy on the frequency begins to be noticed for any large value of the average density and for any negative \(\lambda \). On the right panel (Fig. 12b), The situation of the deviation for the fundamental mode frequencies from the isotropic frequency curve are visualized better when the bag constant is increased, for any value of the parameter \(\lambda \) and for any range along the average density.

Our main results for each one of the EoS used in this work are summarized in Table 2.

Fig. 13
figure 13

Comparison of mass-radius curves for anisotropic hadronic stars with observational data using the GM1 (left panel) and NL3 (right panel) parametrizations for different values of the parameter \(\lambda \). Black lines (\(\lambda = 0\)) correspond to isotropic hadronic stars

Fig. 14
figure 14

Comparison of mass-radius curves for anisotropic quark stars with observational data using Mit bag constant \(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (left panel) and 90  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\) (right panel) for different values of the parameter \(\lambda \)

5.3 Comparison between theory and observations

Comparing the theory and its predictions with the observational data is an interesting test that validates whether or not an EoS is adequate to describe a realistic neutron star. In Figs. 13 and 14, we compared our results with the NICER constraints obtained from the pulsars PSRJ\(0030+0451\) [21, 22] and PSR J\(0740+6620\) [23, 24] for hadronic and quark stars, respectively. We also show the corresponding bands of the pulsars PSRJ\(0740+6620\) [25], PSRJ\(0348+0432\) [26] and PSRJ\(1614+2230\) [27] and an error bar corresponding to the binary system GW170817 [28]. For hadronic stars within the NL3 model, Fig. 13b, the curve related to the anisotropic factor \(\lambda =1.0\) is the unique that satisfies the constraints obtained from Pulsars observations. Additionally, we can note that the decrease in the anisotropic factor produces an increase in the radius for the same stellar mass, this behaviour pushes out the models from the more central regions. The same effect can be observed for the GM1 model, but in this case an approximately vanishing anisotropic factor can be fulfil the above mentioned constraints shown in Fig. 13a. A good perspective can be found out when we look at Fig. 14a, where we test MIT bag model (\(B=60\)  \(\mathrm {MeV}\,\mathrm {fm}^{-3}\)). Clearly, when \(\lambda \) decreases the MIT bag model will tend to correspond to all observables. One can see that some of our results related to hadronic stars are more accurate and closer to empirical evidence of the neutron stars and therefore these EoS are great candidates for describing a realistic neutron star. At this stage, an interesting aspect related to our results is the fact that the anisotropic parameter \(\lambda \) controls the values of the maximum star masses and the corresponding radii. This lead us to conclude that parameter \(\lambda \) can be used as a tuning parameter to reproduce observational data of neutron stars for the observable mass and radius.

6 Summary and final remarks

In this article we examined how the non-radial oscillations of hadronic and quark stars are affected by anisotropic effects. The results for hadronic stars were elaborated using two different parameterizations which are special cases of a relativistic mean field model and for the case of quark stars we employed the MIT bag model.

All our analysis was made in the framework of the relativistic Cowling approximation, which means that the metric perturbations do not have dynamics when the stellar fluid is perturbed. Then we integrated numerically the non-radial oscillation equations obtaining the frequency of the fundamental mode, which it is considered to be more important for astrophysical applications. We even obtained more information by combining the frequency value of the fundamental mode with other physical properties of the star.

As far as we are concerned on hadronic and quark stars, we found that the anisotropy alters the following stellar properties: the frequency of oscillation of the fundamental mode, the total mass, total radius, the square root of the average density, the central density, the normalized frequency, and the surface redshift. Depending on the type of star to be considered, the influence of anisotropy is more obvious in some cases than in others, for instance, the frequency of the fundamental mode for hadronic stars has deviated slightly for small average density. The same small effect is observed to the gravitational redshift for both strange and hadronic masses below \(1.5~M_{\odot }\); that is, it is not possible to distinguish between hadronic and quark stars. The same situation has happened for small quark masses as a relationship of the total radius. However, a big impact of anisotropy is clearly visualized on other relationships, such as, the frequency of the fundamental mode as function of the total mass has modified significantly the quark stars; and the same result is viewed for hadronic stars within the GM1 model. Another major impact exists for the normalized frequency as a function of mass as a result of anisotropy. Additionally, we have found noticeable effects of the anisotropy when we illustrate the hadronic total mass for radius lesser 14 km within the GM1 model and a radius lesser 15 km under the NL3 model. A similar situation is perceived for the total mass as a function of central density. One interesting feature that allows us to differentiate between strange stars and hadronic stars is that the former stars emit higher gravitational waves than the hadronic stars, i.e., anisotropy boosts higher values for the quark frequency of the frequency of the fundamental mode than hadronic frequency. In conclusion, all features mentioned lines above suggest that the anisotropic parameter \(\lambda \) monitors all stellar properties of compact stars and it can be used as a tuning parameter to reproduce mass and radius observational data. From the comparison of our results with observational data, one can see that some of our theoretical results are in agreement with the empirical evidence of neutron stars, i.e. some EoS used in this work are great candidates for describing a realistic neutron star. In spite of some of our results related to hadronic stars are more accurate and closer to empirical evidence of the neutron stars, it is possible to realize the results with the MIT bag model can be favored depending on the bag constant B. The anisotropic factor \(\lambda \) leads those curves to observable regions of the mass-radius diagram. Softer EoS, when not figured in experimental ranges, clearly can be favored when \(\lambda \) decreases, which opens new possibilities for analysis of those EoS.