1 Introduction

Recently, a lot of interest has been developed in construction of solutions in Einstein’s theory with \((2+1)\) dimensional spacetime. In this framework, Newtonian theory can not be achieved, however, \((2+1)\) dimensional spacetime usually used in studying the cosmological models, star formation or blackhole phenomenon (Gurtug et al. 2012, and references therein; Meusburger 2009, and references therein). Moreover, this scenario yields some new features towards a better understanding of the physically relevant (\(3+1\)) dimensional gravity (Banados et al. 1992; Mann and Ross 1993; Lubo et al. 1999; Sakamoto et al. 1998; Cruz and Zanelli 1995; Cruz et al. 2004; Carlip 1995; Sharma et al. 2011). For instance, a concerning application of (\(2+1\))-dimensional spacetime in the exact solutions for point masses (Gott and Alpert 1984; Deser et al. 1984; Giddings et al. 1984) give directly the exact solutions for strings in (\(3+1\))-dimensional spacetime (Gott 1985).

Abbott (1884) was the first who look at (\(2+1\))-dimensional spacetime describing the whole universe with only two spatial dimensions. Rahaman et al. (2012a) suggested a new model of a gravastar in (\(2+1\))-dimensional anti-de Sitter spacetime as well as charged gravastar (Rahaman et al. 2014a). The wormhole solutions are also studied in (\(2+1\)) dimensional spacetime (Rahaman et al. 2007, 2012b; Jamil et al. 2010; Kim et al. 2004; Perry et al. 1992). Rahaman et al. (2013) investigated singularity-free star solutions in this spacetime. Rahaman et al. (2014b) provide a new class of exact solutions for the interior in \(2+1\)-dimensional spacetime. The solutions was obtained for the perfect fluid model both with and without cosmological constant \((\varLambda)\) are found to be regular and singularity free. The solution was obtained by assuming isotropic pressure. Solutions without \(\varLambda\) are found to be physically acceptable.

Bhar et al. (2014) provided a new class of interior solution of a (\(2+1\))-dimensional anisotropic star in Finch and Skea spacetime corresponding to the BTZ black hole. They developed the model by considering the MIT bag model EOS and a particular ansatz for the metric function \(g_{rr}\) proposed by Finch and Skea (1989). The model is free from central singularity and satisfies all the physical requirements for the acceptability of the model. Noncommutative geometry inspired 3-dimensional charged black hole solution in an anti-de Sitter background spacetime is studied by Rahaman et al. (2015). In this paper the authors report a 3-D charged black hole solution in an anti-de Sitter space inspired by noncommutative geometry. In this construction, the black hole exhibits two horizons, which turn into a single horizon in the extreme case. They investigate the impacts of electromagnetic field on the location of the event horizon, mass and thermodynamic properties such as Hawking temperature, entropy, and heat capacity of the black hole. The geodesics of the charged black hole are also analyzed. Stability of thin-shell wormholes from noncommutative BTZ black hole is studied by Bhar and Banerjee (2015). In this paper, the authors constructed thin-shell wormholes in (\(2+1\))-dimensions from noncommutative BTZ black hole by applying the cut-and-paste procedure implemented by Visser. The stability analysis of the thin shell wormhole is also discussed.

In recent past, Krori and Barua (KB) (1975) developed static, spherically symmetric solutions with particular choice of the metric components \(g_{00}\) and \(g_{11}\) in curvature coordinates. By following this approach, various interesting star models have been constructed (Rahaman et al. 2010, 2012c, 2012d; Monoar et al. 2012; Mehedi et al. 2012; Varela et al. 2010). There have been several investigations of the Einstein-Maxwell system of equations for static spherically symmetric gravitational fields usually with isotropic pressure to include the effects of the electromagnetic field. The purpose of the present work is also to find exact interior solutions for perfect fluid model with cosmological constant in the presence of electromagnetic field. Further, the assumption of equation of state (EoS), \(p = m\rho\), seems to be very reasonable for describing the matter distribution in the study of relativistic objects like stars (Varela et al. 2010; Rahaman et al. 2010), wormholes (Rahaman et al. 2012d; Burdyuzha 2009) and gravastars (Dymnikova 2002).

That is why, we assume the equation of state (EoS) of modified Chaplygin gas in the present work in order to find the new exact solutions in the scenario of KB as an interior spacetime with the inclusion of charge and cosmological constant. We also choose static and charged BTZ black hole as an exterior boundary of the fluid sphere. The paper is organized as follows: In Section 2, we elaborate the basic scenario. In Sect. 3, we extract the exact solutions through matching conditions. In Sects. 47, we discuss some physical properties of obtained solutions. In Sect. 8, we summarized our results.

2 Basic equations

Here, we consider the interior space-time of a fluid sphere described by KB metric which has (\(2+1\)) dimensional form as follows (Krori and Barua 1975)

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

where the functions \({\mu(r)}\) and \({\nu(r)}\) are defined as \(\mu(r)=Ar^{2}\) and \(\nu(r)=Br^{2}+C\), where \(A\), \(B\) and \(C\) appears as arbitrary constants and their values will be calculated with the help of different physical conditions.

Let us consider the charged fluid as anisotropic in nature. In this framework, the Einstein Maxwell equations in the presence of cosmological constant \(\varLambda<0\) turn out to be

$$\begin{aligned}& \frac{\mu'e^{-\mu}}{2r}=8\pi \rho +E^{2}+\varLambda, \end{aligned}$$
(2)
$$\begin{aligned}& \frac{\nu'e^{-\mu}}{2r}=8 \pi p_{r} -E^{2}- \varLambda, \end{aligned}$$
(3)
$$\begin{aligned}& \frac{e^{-\mu}}{2} \biggl(\frac{1}{2}\nu^{\prime\,2}+ \nu''-\frac{1}{2}\mu' \nu' \biggr)=8 \pi p_{t} +E^{2}-\varLambda, \end{aligned}$$
(4)
$$\begin{aligned}& \sigma(r)=\frac{e^{-\frac{\mu}{2}}}{4 \pi r}(r E)', \end{aligned}$$
(5)

where prime denotes the differentiation with respect to radial coordinate ‘\(r\)’. Here \(\rho\), \(p_{r}\) and \(p_{t}\) describe the energy density, radial pressure and transverse pressure, respectively, while \(E=E(r)\) represents the electric field which takes the following form

$$ E(r)=\frac{4\pi}{r}\int^{r}_{0}y \sigma(y)e^{\frac{\mu(y)}{2}}dy=\frac{q(r)}{r}. $$
(6)

where \(q(r)\) indicates the total charge of the sphere under consideration.

3 Solutions

The Chaplygin gas model is one of the predicting candidates to explain the present accelerated expansion of the universe. The interesting feature of Chaplygin gas is its connection to the string theory. It can be obtained from the Nambu-Goto action for a D-brane moving in a (\(\mbox{D}+2\))-dimensional spacetime in the light cone parametrization (Fabris et al. 2002; Bilic et al. 2002; Kamenshchik et al. 2000). The Chaplygin gas model represents first dust behavior and in late times as cosmological constant. It depicts like a mixture of cosmological constant and a perfect fluid with equation of state, \(p=-\frac{K}{\rho^{\alpha}}\) in intermediate stages. This parameter involves in this equation, makes the Chaplygin gas model as more flexible for comparison against observations. The equation of state which combines many models of Chaplygin gas model given by

$$ p=H\rho-\frac{K}{\rho^{\alpha}}, $$
(7)

where \(\alpha,~H\) and \(K\) are positive constants.

To solve the Einstein-Maxwell field equations, we assume the modified Chaplygin gas model with \(\alpha=1\). Solving Eqs. (2)–(6) with the help of Eq. (7) we obtain the model parameters as follows

$$\begin{aligned}& \rho=\frac{f+\sqrt{f^{2}+4hK}}{2h}, \end{aligned}$$
(8)
$$\begin{aligned}& p_{r}= f-\frac{f+\sqrt{f^{2}+4hK}}{2h}, \end{aligned}$$
(9)
$$\begin{aligned}& E^{2}=Ae^{-Ar^{2}}-8\pi \frac{f+\sqrt{f^{2}+4hK}}{2h}- \varLambda, \end{aligned}$$
(10)
$$\begin{aligned}& p_{t}=\frac{1}{8\pi} \biggl[e^{-Ar^{2}}(B-A) \bigl(1+Br^{2}\bigr)+\varLambda \\ & \phantom{ p_{t}=\,\,}{}+8 \pi \biggl(\frac{f+\sqrt{f^{2}+4hK}}{2h} \biggr) \biggr], \end{aligned}$$
(11)
$$\begin{aligned}& q^{2}=Ar^{2}e^{-Ar^{2}}-8\pi r^{2} \frac{f+\sqrt{f^{2}+4hK}}{2h}, \end{aligned}$$
(12)

where \(h=1+H\) and \(f(r)=\frac{(A+B)}{8\pi}e^{-Ar^{2}}\).

The profile of matter density \((\rho)\) and radial pressure \((p_{r})\) and transverse pressure \((p_{t})\) are shown in Fig. 1(left) and Fig. 1 (right) respectively. Figure 1 indicates that \(\rho,p_{r}\) and \(p_{t}\) all are positive inside the stellar interior. We note that as density and radial pressure are decreasing with the radial coordinate ‘\(r\)’ which are the common features, however, transverse pressure is increasing which is very unusual. Apart this lone drawback our model consists with very much attractive results which are discussed in the subsequent sections.

Fig. 1
figure 1

(Left) Variation density against the radius \(r\) is shown in the figure. (Right) Variation of the radial pressure \(p_{r}\) and transverse pressure \(p_{t} \) against the radius \(r\) is shown in the figure

3.1 Matching condition

In this section we match our interior solution to the exterior charged BTZ black hole solution as an electrovacuum exterior (\(p=\rho=0\)) which is given by line element

$$\begin{aligned} ds^{2} =&-\bigl(-M_{0}-\varLambda r^{2}-Q^{2}\ln r\bigr)dt^{2} \\ &{}+\bigl(M_{0}- \varLambda r^{2}-Q^{2}\ln r\bigr)^{-1}dr^{2}+r^{2}d \theta^{2} \end{aligned}$$
(13)

To match our interior solution to the exterior metric we impose the continuity of \(g_{tt}\),\(g_{rr}\) and \(\frac{\partial g_{tt}}{\partial r} \) across a surface (\(S\)), at \(r=a\).

Which gives,

$$\begin{aligned}& \begin{aligned} &e^{Ba^{2}+C}=-M_{0}-\varLambda a^{2}-Q^{2} \ln a,\\ & e^{Aa^{2}}=\bigl(-M_{0}-\varLambda a^{2}-Q^{2}\ln a\bigr)^{-1},\\& -2a\varLambda- \frac{Q^{2}}{a}=2aB e^{Ba^{2}+C} \end{aligned} \end{aligned}$$
(14)

These equations yield the values of \(A\), \(B\) and \(C\)

$$\begin{aligned}& A=-\frac{1}{a^{2}}\ln \bigl(-M_{0}-\varLambda a^{2}-Q^{2}\ln a\bigr), \end{aligned}$$
(15)
$$\begin{aligned}& B=\frac{1}{2a} \biggl[\frac{2a \varLambda+\frac{Q^{2}}{a}}{M_{0}+\varLambda a^{2}+Q^{2}\ln a} \biggr], \end{aligned}$$
(16)
$$\begin{aligned}& C=\ln\bigl(-M_{0}-\varLambda a^{2}-Q^{2} \ln a\bigr) \\& \phantom{ C=\,\,}{}-\frac{a}{2} \biggl[\frac{2a \varLambda+\frac{Q^{2}}{a}}{M_{0}+\varLambda a^{2}+Q^{2}\ln a} \biggr] \end{aligned}$$
(17)

On the boundary conditions \(r=0\) and \(r=a\), \(\rho(0)=\rho_{0}\) and \(p_{r}(a)=0\) which yield the following two expressions

$$\begin{aligned}& \frac{A-\varLambda}{8 \pi}=\frac{Fe^{Aa^{2}}+\sqrt{(Fe^{Aa^{2}})^{2}+4hK}}{2h}=\rho_{0}, \end{aligned}$$
(18)
$$\begin{aligned}& F-\frac{F+\sqrt{F^{2}+4hK}}{2h}=0, \end{aligned}$$
(19)

where \(F=f(a)=\frac{A+B}{8\pi}e^{-Aa^{2}}\). Solving the above two equations, we get

$$ H=\frac{(A-\varLambda)2Fe^{Aa^{2}}-\frac{(A-\varLambda)^{2}}{16\pi^{2}}}{ \frac{(A-\varLambda)^{2}}{16\pi^{2}}-4F^{2}} $$
(20)

and

$$ K=F^{2}\frac{(A-\varLambda)2Fe^{Aa^{2}}-\frac{(A-\varLambda)^{2}}{16\pi^{2}}}{ \frac{(A-\varLambda)^{2}}{16\pi^{2}}-4F^{2}} $$
(21)

Thus we obtain the values of \(H\) and \(K\) in terms of the known quantities \(A\), \(a\), \(\varLambda\) and \(F\).

4 Physical property

Here, we discuss the physical properties of our solutions. Firstly, we differentiate (8) with respect to radial parameter which takes the following form

$$\begin{aligned} \frac{d\rho}{dr} =&-\frac{Ar}{h}\frac{A+B}{8\pi}e^{-Ar^{2}} \\ &{}\times\biggl[1+\frac{A+B}{ 8\pi}\frac{e^{-Ar^{2}}}{\sqrt{ (\frac{A+B}{8\pi} )^{2}e^{-2Ar^{2}}+4hK}} \biggr]< 0 \end{aligned}$$
(22)

and at the point \(r=0 \)

$$\begin{aligned}& \frac{d\rho}{dr}=0\quad \mbox{and} \\& \frac{d^{2}\rho}{dr^{2}}=- \frac{A(A+B)}{8h\pi} \biggl[1 +\frac{A+B}{8\pi}\frac{1}{\sqrt{ (\frac{A+B}{8\pi} )^{2}+4hK}} \biggr]< 0. \end{aligned}$$
(23)

Also,

$$\begin{aligned} \frac{dp_{r}}{dr} =&-2Ar\frac{A+B}{8\pi}e^{-Ar^{2}}+\frac{Ar}{h} \frac{A+B}{8\pi}e^{-Ar^{2}} \\ &{}\times \biggl[1+\frac{A +B}{8\pi}\frac{e^{-Ar^{2}}}{\sqrt{ (\frac{A+B}{8\pi} )^{2}e^{-2Ar^{2}}+4hK}} \biggr], \end{aligned}$$
(24)

at the point \(r=0\)

$$\begin{aligned}& \frac{dp_{r}}{dr}=0\quad \mbox{and} \\& \frac{d^{2}p_{r}}{dr^{2}}=-\frac{A(A+B)}{8\pi} \\& \phantom{\frac{d^{2}p_{r}}{dr^{2}}=\,\,}{}\times\biggl[2+ \frac{A}{h} \biggl\{ 1+\frac{A+B}{8\pi} \frac{1}{\sqrt{ (\frac{A+B}{8\pi} )^{2}+4hK}} \biggr\} \biggr]< 0. \end{aligned}$$
(25)

Which shows that both the matter density and radial pressure is monotonic decreasing function of ‘\(r\)’, i.e., they have maximum value at the center of the fluid sphere and it decreases radially to the boundary and at the boundary of the fluid sphere the radial pressure vanishes. This condition is also verified by Fig. 1.

The anisotropy factor \(\Delta = p_{t}-p_{r} \) is given by

$$\begin{aligned} \Delta =&\frac{1}{8\pi}e^{-Aa^{2}}(B-A) \bigl(1+Br^{2}\bigr)+ \frac{\varLambda}{8\pi}-f \\ &{}+2 \biggl(\frac{f+\sqrt{f^{2}+4hK}}{2h} \biggr). \end{aligned}$$
(26)

The profile of the anisotropic factor \(\Delta\) is shown in Fig. 2. From the figure it is clear that \(\Delta>0\) in the stellar interior which indicates that the anisotropic force is repulsive in nature. It is also noted that \(E(0)=0,\rho(0)=\frac{A-\varLambda}{8\pi},p_{r}(0)=\frac{B+\varLambda}{8 \pi}, p_{t}(0)=\frac{B+\varLambda}{8\pi}\) . Which shows that at the point \(r=0\) all the model parameters are regular. consequently our solutions are regular at the center. Figures 1 and 2 also support this.

Fig. 2
figure 2

Variation anisotropy against the radius \(r\) is shown in the figure

Further, the equations of state parameter along the transverse and radial directions are

$$\begin{aligned}& \omega_{t} = \frac{p_{t}}{\rho} \\& \phantom{\omega_{t} }=\frac{ [e^{-Ar^{2}} \{(B-A)(Br^{2}+1) \} {+} \varLambda {+} 8 \pi (\frac{f+\sqrt{f^{2} +4hK}}{2h} ) ]}{8\pi (\frac{f+\sqrt{f^{2}+4hK}}{2h} )}, \\& \end{aligned}$$
(27)
$$\begin{aligned}& \omega_{r} = \frac{p_{r}}{\rho}=\frac{f- (\frac{f+\sqrt{f^{2}+4hK}}{2h} )}{ (\frac{f+\sqrt{f^{2}+4hK}}{2h} )}. \end{aligned}$$
(28)

Figure 3 shows the variations of equations of state parameter along the radial and transverse directions.

Fig. 3
figure 3

(Left) Variation of radial equation state parameter \(\omega_{r}\) against the radius \(r\) is shown in the figure. (Right) Variation of radial equation state parameter \(\omega_{t}\) against the radius \(r\) is shown in the figure

Figure 3 indicates that \(\omega_{r}\) is monotonic decreasing function of ‘\(r\)’ and \(0\leq \omega_{r} \leq 1\) whenever \(\omega_{t}\) is ever increasing.

5 TOV equation

To check the stability condition of our present model under gravitational \((F_{g})\), hydrostatics \((F_{h})\), anisotropic \((F_{a})\) and electric forces \((F_{e})\) let us consider the generalized TOV equation given by,

$$ -\frac{M_{G}(\rho+p_{r})}{r^{2}}e^{\frac{\mu-\nu}{2}}-\frac{dp_{r}}{dr}+\sigma \frac{q}{r^{2}} e^{\frac{\mu}{2}}+\frac{2}{r}(p_{t}-p_{r})=0 $$
(29)

where \(M_{G} = M_{G}(r)=\frac{1}{2}r^{2}e^{\frac{\mu-\nu}{2}}\nu'\) represents the gravitational mass inside a sphere of radius \(r\). The above equation can also be written as

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

where

$$\begin{aligned}& F_{g}=-Br(\rho+p_{r})=-Br \frac{A+B}{8\pi}e^{-Ar^{2}}, \\& F_{h}=-\frac{dp_{r}}{dr}=2Ar\frac{A+B}{8\pi}e^{-Ar^{2}}- \frac{Ar}{h}\frac{A+B}{8\pi} \\& \phantom{F_{h}=\,\,}{}\times e^{-Ar^{2}} \biggl[1 +\frac{A+B}{8\pi} \frac{e^{-Ar^{2}}}{\sqrt{ (\frac{A+B}{8\pi} )^{2}e^{-2Ar^{2}}+4hK}} \biggr], \\& F_{e}=\sigma E e^{\frac{Ar^{2}}{2}}, \\& F_{a}=\frac{2}{r}(p_{t}-p_{r}). \end{aligned}$$

Due to the complexity of the expression we will discuss the stability of our present model with the help of graphical representation. The variation of above forces \((F_{g},F_{h},F_{e},F_{a})\) along radial direction is shown in Fig. 4 for a particular stellar configuration. The figure provides the information of the static equilibrium since the combined effects of pressure anisotropy and hydrostatic forces are counterbalanced by the combine effects of gravitational electric forces.

Fig. 4
figure 4

Variation of forces against the radius \(r\) is shown in the figure

6 Energy conditions

In order to show the viability of our solutions, we check the null energy condition (NEC), weak energy condition (WEC), strong energy condition (SEC) and dominant energy condition (DEC) which are given by

$$\begin{aligned}& \widetilde{\rho}+\frac{\widetilde{E}^{2}}{8 \pi}\geq 0, \end{aligned}$$
(31)
$$\begin{aligned}& \widetilde{\rho}+\widetilde{p_{r}}\geq 0, \end{aligned}$$
(32)
$$\begin{aligned}& \widetilde{\rho}+\widetilde{p_{t}}+\frac{\widetilde{E}^{2}}{4\pi} \geq 0, \end{aligned}$$
(33)
$$\begin{aligned}& \widetilde{\rho}+\widetilde{p_{r}}+2 \widetilde{p_{t}}+\frac{\widetilde{E}^{2}}{4\pi}\geq 0, \end{aligned}$$
(34)

respectively. To check whether our present model satisfies all the energy conditions we plot the LHS of (31)–(34) versus \(r\) as shown in Fig. 5. It can be observed that the plot shows the consistency with the above inequalities.

Fig. 5
figure 5

Variation of energy against the radius \(r\) is shown in the figure

7 Mass radius relation and redshift

In this section we will obtain the mass function,compactness and surface redshift of our present model.

The mass function \(m(r)\) within the radius ‘\(r\)’ can be calculated as follows

$$ m(r)=2\pi\int_{0}^{r} \biggl[\rho+ \frac{E^{2}}{8\pi} \biggr]\widetilde{r}d\widetilde{r} =\frac{1}{8} \bigl(1- \varLambda r^{2}-e^{-Ar^{2}} \bigr) $$
(35)

The profile of the mass function \(m(r)\) versus ‘\(r\)’ is shown in Fig. 6 (left). Now as \(r\rightarrow 0\), \(m(r)\rightarrow 0\) i.e., mass function is regular at the center of the fluid sphere. Moreover \(m(r)>0\) inside the stellar interior and \(m(r)\) is monotonic increasing function of ‘\(r\)’.

Fig. 6
figure 6

(Left) Variation of mass function against the radius \(r\) is shown in the figure. (Middle) Variation of compactness against the radius \(r\) is shown in the figure. The values of the parameters are taken as \(r_{0}=1\), \(\rho_{0}=0.0001\). (Right) Variation of redshift function against the radius \(r\) is shown in the figure

The compactness of the fluid sphere is given as

$$ u= \frac{ m(r)}{r}= \frac{1}{8r} \bigl(1-\varLambda r^{2}-e^{-Ar^{2}} \bigr), $$
(36)

and correspondingly the surface redshift (\(z\)) is given by

$$ z= ( 1-2 u)^{-\frac{1}{2}} - 1, $$
(37)

where

$$ z= \biggl[ 1- \frac{1}{4r} \bigl(1-\varLambda r^{2}-e^{-Ar^{2}} \bigr) \biggr]^{-\frac{1}{2}} - 1 . $$
(38)

The plots of \(\frac{m(r)}{r}\) against \(r\) is shown in Fig. 6 (middle) which indicates that the ratio \(\frac{m(r)}{r}\) are increasing functions of the radial coordinate. Interestingly, one can note that maximum allowed mass-radius ratio in this model falls within the limit of the (\(3+1\)) dimensional case for the isotropic fluid sphere i.e., \((\frac{m(r)}{r} )_{\max} = 0.064 < \frac{4}{9}\) .

Thus, the maximum surface redshift of our (\(2+1\)) dimensional fluid sphere of radius 10.365 km is calculated as \(Z_{s} = 0.072\). Figure 6 (right) shows the variation of redshift function \(z\) with respect to radial coordinate.

8 Conclusion

In our present paper we obtained a new class of exact interior solution of Einstein-Maxwell field equations in (\(2+1\)) dimensional spacetime by assuming KB metric corresponding to the exterior charged BTZ spacetime. Our proposed model is free from central singularities, i.e., density, radial and transverse pressure all are regular at the center of the fluid sphere. We have shown that density (\(\rho\)), radial pressure (\(p_{r}\)), transverse pressure \((p_{t})\) all are non negative inside the stellar interior which is expected to model a compact star. Both density and radial pressure are monotonic decreasing function of ‘\(r\)’, i.e., they have maximum value at the center and it decreases radially outwards. We have matched our interior solution to the exterior BTZ metric. For our model we have shown that the anisotropic factor \(\Delta=p_{t}-p_{r}>0\) i.e., anisotropic force is repulsive in nature. By assuming generalized TOV equation we have shown that our model is potentially stable under gravitational \(F_{g}\), hydrostatics \(F_{h}\) and anisotropic \(F_{a}\) and electric forces \(F_{e}\).

All the energy conditions namely null energy conditions, weak energy conditions,strong energy conditions are satisfied by our model. We have also calculated the mass function, compactness and surface redshift of our present model. From our result we have shown that mass function is regular at the center of the fluid sphere and it is monotonic increasing function of ‘\(r\)’.

To get an idea about the physical characteristics of the charged fluid sphere in \((2+1)\) dimension, we have taken the data from usual four dimensional fluid sphere i.e. a 3 spatial dimensional object. Even though we don’t have exact physical meaning by considering stelar objects of 2 spatial dimensions, however, for the observer sitting in the plane, \(\theta\) = constant sees all characteristics as a (\(2+1\)) dimensional picture. It seems that we can use all the parameters which are more or less the same for both spacetimes. Therefore, our studied fluid sphere in \((2+1)\) dimension may reflect the properties of usual compact stars. For the specific values of the parameters, we have found the radius of the fluid sphere is 10.365 km and mass \(0.97~\mathrm{M}_{\odot}\). Also, by plugging in G and c in the relevant equations, we have estimated the central density \(\rho_{0} = 1.158 \times 10^{16}~\mbox{gm}\,\mbox{cm}^{-3}\), surface density \(\rho_{s} = 1.143 \times 10^{16}~\mbox{gm}\,\mbox{cm}^{-3}\), central pressure \(p_{r}(r = 0) = p_{t}(r = 0) = 8.03 \times 10^{36}~\mbox{dyne}\,\mbox{cm}^{-2} \). These results reflect the characteristics of compact star. The compactification factor of our model is calculated as \((\frac{m(r)}{r} )_{\max} = 0.064 < \frac{4}{9}\), lies in the range of (\(3+1\))D star and the maximum surface redshift of our (\(2+1\)) dimensional fluid sphere of radius 10.365 km is calculated as \(Z_{s} = 0.072\).